From: Niels Thykier Date: Sat, 6 Jun 2015 10:25:22 +0000 (+0200) Subject: utils: Add a quiet=False parameter to check_reverse_depends X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=3d982ca701456924aa064caa16a52c10cd4a1384;p=dak.git utils: Add a quiet=False parameter to check_reverse_depends Signed-off-by: Niels Thykier --- diff --git a/dak/auto_decruft.py b/dak/auto_decruft.py index 0f807147..159ca359 100644 --- a/dak/auto_decruft.py +++ b/dak/auto_decruft.py @@ -78,7 +78,7 @@ def remove_sourceless_cruft(suite_name, suite_id, session, dryrun): message = '[auto-cruft] no longer built from source and no reverse dependencies' for row in rows: package = row[0] - if utils.check_reverse_depends([package], suite_name, [], session, True): + if utils.check_reverse_depends([package], suite_name, [], session, cruft=True, quiet=True): continue if dryrun: @@ -117,7 +117,7 @@ def removeNBS(suite_name, suite_id, session, dryrun): arch2ids = {} for row in rows: (pkg_list, arch_list, source, _) = row - if utils.check_reverse_depends(pkg_list, suite_name, arch_list, session, True): + if utils.check_reverse_depends(pkg_list, suite_name, arch_list, session, cruft=True, quiet=True): continue arch_string = ','.join(arch_list) message = '[auto-cruft] NBS (no longer built by %s and had no reverse dependencies)' % source diff --git a/daklib/utils.py b/daklib/utils.py index 64f75fbe..a3762811 100644 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -1123,7 +1123,7 @@ def call_editor(text="", suffix=".txt"): ################################################################################ -def check_reverse_depends(removals, suite, arches=None, session=None, cruft=False): +def check_reverse_depends(removals, suite, arches=None, session=None, cruft=False, quiet=False): dbsuite = get_suite(suite, session) overridesuite = dbsuite if dbsuite.overridesuite is not None: @@ -1211,7 +1211,7 @@ def check_reverse_depends(removals, suite, arches=None, session=None, cruft=Fals all_broken.setdefault(source, {}).setdefault(package, set()).add(architecture) dep_problem = 1 - if all_broken: + if all_broken and not quiet: if cruft: print " - broken Depends:" else: @@ -1282,7 +1282,7 @@ def check_reverse_depends(removals, suite, arches=None, session=None, cruft=Fals all_broken.setdefault(key, set()).add(pp_deps(dep)) dep_problem = 1 - if all_broken: + if all_broken and not quiet: if cruft: print " - broken Build-Depends:" else: