]> git.decadent.org.uk Git - dak.git/blobdiff - dak/cruft_report.py
Use more https://
[dak.git] / dak / cruft_report.py
index a64692bc1750ddb88675803b36bdcee976923bc5..a960a686717cbedf881d07317cad2078e08aa4ab 100755 (executable)
@@ -60,8 +60,8 @@ Check for obsolete or duplicated packages.
   -h, --help                show this help and exit.
   -m, --mode=MODE           chose the MODE to run in (full, daily, bdo).
   -s, --suite=SUITE         check suite SUITE.
-  -R, --rdep-check           check reverse dependencies
-  -w, --wanna-build-dump    where to find the copies of http://buildd.debian.org/stats/*.txt"""
+  -R, --rdep-check          check reverse dependencies
+  -w, --wanna-build-dump    where to find the copies of https://buildd.debian.org/stats/*.txt"""
     sys.exit(exit_code)
 
 ################################################################################
@@ -244,7 +244,7 @@ def reportWithoutSource(suite_name, suite_id, session, rdeps=False):
         print "    dak rm -m %s -s %s -a all -p -R -b %s" % \
             (message, suite_name, package)
         if rdeps:
-            if utils.check_reverse_depends([package], suite_name, ["all"], session, True):
+            if utils.check_reverse_depends([package], suite_name, [], session, True):
                 print
             else:
                 print "  - No dependency problem found\n"
@@ -680,20 +680,20 @@ def main ():
     # Checks based on the Sources files
     components = get_component_names(session)
     for component in components:
-        filename = "%s/dists/%s/%s/source/Sources.gz" % (cnf["Dir::Root"], suite_name, component)
-        # apt_pkg.ParseTagFile needs a real file handle and can't handle a GzipFile instance...
+        filename = "%s/dists/%s/%s/source/Sources.gz" % (suite.archive.path, suite_name, component)
+        # apt_pkg.TagFile needs a real file handle and can't handle a GzipFile instance...
         (fd, temp_filename) = utils.temp_filename()
         (result, output) = commands.getstatusoutput("gunzip -c %s > %s" % (filename, temp_filename))
         if (result != 0):
             sys.stderr.write("Gunzip invocation failed!\n%s\n" % (output))
             sys.exit(result)
         sources = utils.open_file(temp_filename)
-        Sources = apt_pkg.ParseTagFile(sources)
-        while Sources.Step():
-            source = Sources.Section.Find('Package')
-            source_version = Sources.Section.Find('Version')
-            architecture = Sources.Section.Find('Architecture')
-            binaries = Sources.Section.Find('Binary')
+        Sources = apt_pkg.TagFile(sources)
+        while Sources.step():
+            source = Sources.section.find('Package')
+            source_version = Sources.section.find('Version')
+            architecture = Sources.section.find('Architecture')
+            binaries = Sources.section.find('Binary')
             binaries_list = [ i.strip() for i in  binaries.split(',') ]
 
             if "bnb" in checks:
@@ -729,8 +729,8 @@ def main ():
         for architecture in architectures:
             if component == 'main/debian-installer' and re.match("kfreebsd", architecture):
                 continue
-            filename = "%s/dists/%s/%s/binary-%s/Packages.gz" % (cnf["Dir::Root"], suite_name, component, architecture)
-            # apt_pkg.ParseTagFile needs a real file handle
+            filename = "%s/dists/%s/%s/binary-%s/Packages.gz" % (suite.archive.path, suite_name, component, architecture)
+            # apt_pkg.TagFile needs a real file handle
             (fd, temp_filename) = utils.temp_filename()
             (result, output) = commands.getstatusoutput("gunzip -c %s > %s" % (filename, temp_filename))
             if (result != 0):
@@ -742,11 +742,11 @@ def main ():
                 nfu_entries = parse_nfu(architecture)
 
             packages = utils.open_file(temp_filename)
-            Packages = apt_pkg.ParseTagFile(packages)
-            while Packages.Step():
-                package = Packages.Section.Find('Package')
-                source = Packages.Section.Find('Source', "")
-                version = Packages.Section.Find('Version')
+            Packages = apt_pkg.TagFile(packages)
+            while Packages.step():
+                package = Packages.section.find('Package')
+                source = Packages.section.find('Source', "")
+                version = Packages.section.find('Version')
                 if source == "":
                     source = package
                 if bin2source.has_key(package) and \