mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 23:51:08 +00:00
ubuntutools.builder: Use sbuild-update and friends instead of calling schroot directly
This commit is contained in:
parent
ac1260b163
commit
6961cbfb3c
@ -93,14 +93,12 @@ class Sbuild(Builder):
|
||||
else:
|
||||
return 1
|
||||
|
||||
chroot_cmd = ["sudo", "schroot", "-c", chroot, "-u", "root", "--"]
|
||||
commands = [["apt-get", "-q", "update"],
|
||||
["apt-get", "-q", "-y", "dist-upgrade"],
|
||||
["apt-get", "-q", "-y", "autoremove"],
|
||||
["apt-get", "-q", "clean"]]
|
||||
commands = [["sbuild-update"],
|
||||
["sbuild-distupgrade"],
|
||||
["sbuild-clean", "-a", "-c"]]
|
||||
for cmd in commands:
|
||||
Logger.command(chroot_cmd + cmd)
|
||||
ret = subprocess.call(chroot_cmd + cmd)
|
||||
Logger.command(cmd + [chroot])
|
||||
ret = subprocess.call(cmd + [chroot])
|
||||
if ret != 0:
|
||||
return ret
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user