return errors
def upgrade_from_batch(r, b):
- f = chroot.popen("rpm --test -F %s 2>&1" % string.join(b.files), user = "root")
+ f = chroot.popen("rpm --test -F %s 2>&1" % b.files.join(), user = "root")
killset = {}
rx = re.compile(r' \(installed\) (?P<name>[^\s]+)-[^-]+-[^-]+$')
for l in f:
util.append_to(b.logfile, err)
log.notice("cannot upgrade rpms")
return False
- k = string.join(killset.keys())
+ k = killset.keys().join()
if True:
b.log_line("upgrade requires removal of %s" % k)
res = chroot.run("rpm -e %s" % k, logfile = b.logfile, user = "root")
return False
b.log_line("upgrading packages")
logbuf = StringIO.StringIO()
- res = chroot.run("rpm -Fvh %s" % string.join(b.files), user = "root", logfile = b.logfile)
+ res = chroot.run("rpm -Fvh %s" % b.files.join(), user = "root", logfile = b.logfile)
if res != 0:
b.log_line("package upgrade failed")
logbuf.close()
nbr = ""
for bre in needed.keys():
nbr = nbr + " " + re.escape(bre)
- br = string.strip(nbr)
+ br = nbr.strip()
b.log_line("updating poldek cache...")
chroot.run("poldek --up --upa", user = "root", logfile = b.logfile)
# check conflicts in BRed packages
nbr = ""
for bre in needed.keys():
nbr = nbr + " " + re.escape(bre)
- br = string.strip(nbr)
+ br = nbr.strip()
b.log_line("installing BR: %s" % br)
res = chroot.run("set -x; poldek --noask --caplookup -Q -v %s --upgrade %s" % (b.ignores(), br),