X-Git-Url: https://git.decadent.org.uk/gitweb/?p=dak.git;a=blobdiff_plain;f=dak%2Frm.py;h=7c192a544caa6300be75e1929b1d9ca6bb51522d;hp=15f65727090f3cfdb2bc212e347a82d5f236d4ca;hb=17c5cab4eb8d5181ec7a81267a4e2e6b43c0fc65;hpb=0d69fff35ef45fda573467873ae2f01ca1954650 diff --git a/dak/rm.py b/dak/rm.py index 15f65727..7c192a54 100755 --- a/dak/rm.py +++ b/dak/rm.py @@ -65,6 +65,8 @@ def usage (exit_code=0): print """Usage: dak rm [OPTIONS] PACKAGE[...] Remove PACKAGE(s) from suite(s). + -A, --no-arch-all-rdeps Do not report breaking arch:all packages + or Build-Depends-Indep -a, --architecture=ARCH only act on this architecture -b, --binary PACKAGE are binary packages to remove -B, --binary-only remove binaries only @@ -100,9 +102,9 @@ def game_over(): ################################################################################ -def reverse_depends_check(removals, suite, arches=None, session=None): +def reverse_depends_check(removals, suite, arches=None, session=None, include_arch_all=True): print "Checking reverse dependencies..." - if utils.check_reverse_depends(removals, suite, arches, session): + if utils.check_reverse_depends(removals, suite, arches, session, include_arch_all=include_arch_all): print "Dependency problem found." if not Options["No-Action"]: game_over() @@ -118,6 +120,7 @@ def main (): cnf = Config() Arguments = [('h',"help","Rm::Options::Help"), + ('A','no-arch-all-rdeps','Rm::Options::NoArchAllRdeps'), ('a',"architecture","Rm::Options::Architecture", "HasArg"), ('b',"binary", "Rm::Options::Binary"), ('B',"binary-only", "Rm::Options::Binary-Only"), @@ -133,7 +136,8 @@ def main (): ('S',"source-only", "Rm::Options::Source-Only"), ] - for i in [ "architecture", "binary", "binary-only", "carbon-copy", "component", + for i in [ 'NoArchAllRdeps', + "architecture", "binary", "binary-only", "carbon-copy", "component", "done", "help", "no-action", "partial", "rdep-check", "reason", "source-only", "Do-Close" ]: if not cnf.has_key("Rm::Options::%s" % (i)): @@ -337,7 +341,8 @@ def main (): if Options["Rdep-Check"]: arches = utils.split_args(Options["Architecture"]) - reverse_depends_check(removals, suites[0], arches, session) + include_arch_all = Options['NoArchAllRdeps'] == '' + reverse_depends_check(removals, suites[0], arches, session, include_arch_all=include_arch_all) # If -n/--no-action, drop out here if Options["No-Action"]: