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:
|
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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user