]> git.decadent.org.uk Git - dak.git/commitdiff
utils: Add a quiet=False parameter to check_reverse_depends
authorNiels Thykier <niels@thykier.net>
Sat, 6 Jun 2015 10:25:22 +0000 (12:25 +0200)
committerNiels Thykier <niels@thykier.net>
Sat, 6 Jun 2015 10:29:06 +0000 (10:29 +0000)
Signed-off-by: Niels Thykier <niels@thykier.net>
dak/auto_decruft.py
daklib/utils.py

index 0f80714789fb6947ea98af809698d9a1d8d1cb75..159ca3599b99cb4b0b2a937c88d8e5e24de2cc87 100644 (file)
@@ -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
index 64f75fbe11fa106c222ff55b907e954a26dfd55f..a37628111c93299e859725620fe3a55c7a349716 100644 (file)
@@ -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: