[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.44-780-ga363455

Andreas Beckmann debian at abeckmann.de
Mon Jun 18 20:52:43 UTC 2012


The following commit has been merged in the develop branch:
commit 1a1dddfefa89ce5ce953f7462bcead2ceaaa619d
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Sat Jun 2 15:45:00 2012 +0200

    p-r: compute the Packages and Sources file URLs
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/piuparts-report.py b/piuparts-report.py
index a597e2f..62b0dfb 100644
--- a/piuparts-report.py
+++ b/piuparts-report.py
@@ -421,10 +421,12 @@ class Config(piupartslib.conf.Config):
             {
                 "sections": "report",
                 "output-directory": "html",
-                "packages-url": None,
-                "sources-url": None,
                 "master-directory": ".",
                 "description": "",
+                "mirror": None,
+                "distro": None,
+                "area": None,
+                "arch": None,
                 "max-reserved": 1,
                 "doc-root": "/",
             },
@@ -604,20 +606,19 @@ class Section:
         self._doc_root = doc_root
 
         logging.debug("Loading and parsing Packages file")
-        logging.info("Fetching %s" % self._config["packages-url"])
-        packages_file = piupartslib.open_packages_url(self._config["packages-url"])
+        logging.info("Fetching %s" % self._config.get_packages_url())
+        packages_file = piupartslib.open_packages_url(self._config.get_packages_url())
         self._binary_db = piupartslib.packagesdb.PackagesDB(prefix=self._master_directory)
         self._binary_db.read_packages_file(packages_file)
         self._binary_db.calc_rrdep_counts()
 
         packages_file.close()
 
-        if self._config["sources-url"]:
-          logging.info("Fetching %s" % self._config["sources-url"])
-          sources_file = piupartslib.open_packages_url(self._config["sources-url"])
-          self._source_db = piupartslib.packagesdb.PackagesDB()
-          self._source_db.read_packages_file(sources_file)
-          sources_file.close()
+        logging.info("Fetching %s" % self._config.get_sources_url())
+        sources_file = piupartslib.open_packages_url(self._config.get_sources_url())
+        self._source_db = piupartslib.packagesdb.PackagesDB()
+        self._source_db.read_packages_file(sources_file)
+        sources_file.close()
 
         self._log_name_cache = {}
 
@@ -1136,7 +1137,7 @@ class Section:
             "section": html_protect(self._config.section),
             "description": html_protect(self._config["description"]),
             "tablerows": tablerows,
-            "packagesurl": html_protect(self._config["packages-url"]),
+            "packagesurl": html_protect(self._config.get_packages_url()),
             "doc_root": self._doc_root,
            }))
 
@@ -1252,8 +1253,7 @@ class Section:
 
         total_packages = self.write_counts_summary()
 
-        if self._config["sources-url"]:
-            self.create_package_summaries(logs_by_dir)
+        self.create_package_summaries(logs_by_dir)
 
         logging.debug("Writing section index page")
         self.write_section_index_page(dirs, total_packages)

-- 
piuparts git repository



More information about the Piuparts-commits mailing list