ubuntutools.builder: Use sbuild-update and friends instead of calling schroot directly

This commit is contained in:
Evan Broder 2010-12-13 10:47:26 -08:00
parent ac1260b163
commit 6961cbfb3c

View File

@ -93,14 +93,12 @@ class Sbuild(Builder):
else: else:
return 1 return 1
chroot_cmd = ["sudo", "schroot", "-c", chroot, "-u", "root", "--"] commands = [["sbuild-update"],
commands = [["apt-get", "-q", "update"], ["sbuild-distupgrade"],
["apt-get", "-q", "-y", "dist-upgrade"], ["sbuild-clean", "-a", "-c"]]
["apt-get", "-q", "-y", "autoremove"],
["apt-get", "-q", "clean"]]
for cmd in commands: for cmd in commands:
Logger.command(chroot_cmd + cmd) Logger.command(cmd + [chroot])
ret = subprocess.call(chroot_cmd + cmd) ret = subprocess.call(cmd + [chroot])
if ret != 0: if ret != 0:
return ret return ret