From: Marcin Krol Date: Mon, 22 Mar 2021 19:16:27 +0000 (+0100) Subject: - doh, fix join() again X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=c4d0706eae2dd9530000a8ad8b62188c417c2caa;p=tld-builder.git - doh, fix join() again --- diff --git a/TLD_Builder/build.py b/TLD_Builder/build.py index 5585411..350e92b 100644 --- a/TLD_Builder/build.py +++ b/TLD_Builder/build.py @@ -117,4 +117,4 @@ def build_all(r, build_fnc): notify.add_batch(batch, "SKIP") buildlogs.flush() - chroot.run("rm -f %s" % r.chroot_files.join()) + chroot.run("rm -f %s" % ' '.join(r.chroot_files)) diff --git a/TLD_Builder/file_sender.py b/TLD_Builder/file_sender.py index d60b59e..737dfcb 100644 --- a/TLD_Builder/file_sender.py +++ b/TLD_Builder/file_sender.py @@ -197,7 +197,7 @@ def flush_queue(dir): emails[d['Requester']] = 1 e = emails.keys() m = mailer.Message() - m.set_headers(to = e.join(", "), + m.set_headers(to = ", ".join(e), subject = "[%s] builder queue problem" % config.builder) m.write("there were problems sending files from queue %s:\n" % dir) m.write("problems:\n") diff --git a/TLD_Builder/install.py b/TLD_Builder/install.py index 3ee53e7..02cdfd7 100644 --- a/TLD_Builder/install.py +++ b/TLD_Builder/install.py @@ -53,7 +53,7 @@ def close_killset(killset): return errors def upgrade_from_batch(r, b): - f = chroot.popen("rpm --test -F %s 2>&1" % b.files.join(), user = "root") + f = chroot.popen("rpm --test -F %s 2>&1" % ' '.join(b.files), user = "root") killset = {} rx = re.compile(r' \(installed\) (?P[^\s]+)-[^-]+-[^-]+$') for l in f: @@ -66,7 +66,7 @@ def upgrade_from_batch(r, b): util.append_to(b.logfile, err) log.notice("cannot upgrade rpms") return False - k = killset.keys().join() + k = ' '.join(killset.keys()) if True: b.log_line("upgrade requires removal of %s" % k) res = chroot.run("rpm -e %s" % k, logfile = b.logfile, user = "root") @@ -80,7 +80,7 @@ def upgrade_from_batch(r, b): return False b.log_line("upgrading packages") logbuf = StringIO.StringIO() - res = chroot.run("rpm -Fvh %s" % b.files.join(), user = "root", logfile = b.logfile) + res = chroot.run("rpm -Fvh %s" % ' '.join(b.files), user = "root", logfile = b.logfile) if res != 0: b.log_line("package upgrade failed") logbuf.close() diff --git a/TLD_Builder/request.py b/TLD_Builder/request.py index efedbb9..149557a 100644 --- a/TLD_Builder/request.py +++ b/TLD_Builder/request.py @@ -110,7 +110,7 @@ class Group: def dump(self, f): f.write("group: %d (id=%s pri=%d)\n" % (self.no, self.id, self.priority)) f.write(" from: %s\n" % self.requester) - f.write(" flags: %s\n" % self.flags.join()) + f.write(" flags: %s\n" % ' '.join(self.flags)) f.write(" time: %s\n" % time.asctime(time.localtime(self.time))) for b in self.batches: b.dump(f) @@ -148,7 +148,7 @@ class Group: 'requester': escape(self.requester), 'priority': self.priority, 'max_jobs': self.max_jobs, - 'flags': self.flags.join() + 'flags': ' '.join(self.flags) }) f.write("
    \n") for b in self.batches: @@ -162,7 +162,7 @@ class Group: %s %d - %d\n""" % (self.id, self.no, self.flags.join(), + %d\n""" % (self.id, self.no, ' '.join(self.flags), escape(self.requester_email), escape(self.requester), self.time, self.priority, self.max_jobs)) for b in self.batches: @@ -294,7 +294,7 @@ class Batch: builders = [] for b in self.builders: builders.append("%s:%s" % (b, self.builders_status[b])) - f.write(" builders: %s\n" % builders.join()) + f.write(" builders: %s\n" % ' '.join(builders)) def is_command(self): return self.command != "" @@ -401,7 +401,7 @@ class Batch: 'tooltip' : cgi.escape(tooltip, True), } + link_post) - f.write("%s]\n" % builders.join()) + f.write("%s]\n" % ' '.join(builders)) def rpmbuild_opts(self): """ @@ -501,7 +501,7 @@ class Batch: %s %s %s\n""" % (self.b_id, - list(map(lambda b: b.b_id, self.depends_on)).join(), + ' '.join(list(map(lambda b: b.b_id, self.depends_on))), escape(self.src_rpm), escape(' '.join(self.command_flags)), escape(self.command), escape(self.spec), escape(self.branch), escape(self.info))) diff --git a/TLD_Builder/request_handler.py b/TLD_Builder/request_handler.py index b6c67a5..de48d9e 100644 --- a/TLD_Builder/request_handler.py +++ b/TLD_Builder/request_handler.py @@ -104,7 +104,7 @@ def handle_group(r, user): batch.builders_status_time[bld] = time.time() if bld not in config.binary_builders and bld != config.builder: fail_mail("I (src rpm builder '%s') do not handle binary builder '%s', only '%s'" % \ - (config.builder, bld, config.binary_builders.join())) + (config.builder, bld, ' '.join(config.binary_builders))) lockf.close() return if batch.is_command(): diff --git a/TLD_Builder/rpm_builder.py b/TLD_Builder/rpm_builder.py index 4c4bf1f..f9f4dda 100644 --- a/TLD_Builder/rpm_builder.py +++ b/TLD_Builder/rpm_builder.py @@ -283,7 +283,7 @@ def build_rpm(r, b): b.log_line("copy rpm files to cache_dir: %s" % rpm_cache_dir) chroot.run( "cp -f %s %s && poldek --mo=nodiff --mkidxz -s %s/" % \ - (b.files.join(), rpm_cache_dir, rpm_cache_dir), + (' '.join(b.files), rpm_cache_dir, rpm_cache_dir), logfile = b.logfile, user = "root" ) else: