From b7e872963ed3267dd33855abd1c34bdfd3720764 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Mon, 8 Jul 2013 14:19:28 +0200 Subject: [PATCH] teach dd-schroot-cmd apt-get build-dep about --arch-only MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Héctor Orón Martínez --- modules/porterbox/files/dd-schroot-cmd | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/porterbox/files/dd-schroot-cmd b/modules/porterbox/files/dd-schroot-cmd index 76f3c9d11..e2d2111ef 100755 --- a/modules/porterbox/files/dd-schroot-cmd +++ b/modules/porterbox/files/dd-schroot-cmd @@ -154,7 +154,12 @@ class AptSchroot: elif op == "install": self.apt_install(args) elif op == "build-dep": - self.apt_build_dep(args) + try: + args.remove("--arch-only") + archonly = True + except ValueError: + archonly = False + self.apt_build_dep(args, archonly) else: die("Invalid operation %s"%(op,)) @@ -174,8 +179,9 @@ class AptSchroot: def apt_install(self, packages): self.apt_simulate_and_ask(['install', '--'] + packages) - def apt_build_dep(self, packages): - self.apt_simulate_and_ask(['build-dep', '--'] + packages) + def apt_build_dep(self, packages, archonly=False): + cmd = ['build-dep'] + (['--arch-only'] if archonly else []) + ['--'] + self.apt_simulate_and_ask(cmd + packages) def apt_simulate_and_ask(self, cmd, split_download=True, run_clean=True): if not self.assume_yes: -- 2.20.1