[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.49-135-g41bea98

Andreas Beckmann anbe at debian.org
Sun Mar 3 17:22:20 UTC 2013


The following commit has been merged in the develop branch:
commit 4fa39c791253a8516a1089770e030890d70bb085
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Sun Mar 3 17:25:02 2013 +0100

    p-r: load dependency sections
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/debian/changelog b/debian/changelog
index 3e0c095..d4e1387 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -61,6 +61,7 @@ piuparts (0.50) UNRELEASED; urgency=low
     - Use piuparts.conf global proxy setting as http_proxy.
     - Use distros.conf to compute URLs.
     - Generate/prepend/append a default description.
+    - Load depends-sections for package lookup in partial distros.
   * Makefile:
     - Add DESTDIR support.
     - Overhaul. Add dependencies between build and install targets.
diff --git a/piuparts-report.py b/piuparts-report.py
index bc88230..c3fa96a 100644
--- a/piuparts-report.py
+++ b/piuparts-report.py
@@ -397,6 +397,7 @@ class Config(piupartslib.conf.Config):
                 "sections": "report",
                 "output-directory": "html",
                 "master-directory": ".",
+                "depends-sections": None,
                 "description": "",
                 "proxy": None,
                 "mirror": None,
@@ -607,10 +608,18 @@ class Section:
         self._log_name_cache = {}
 
     def _load_package_database(self, section):
+        if section in self._package_databases:
+            return
+
         config = Config(section=section, defaults_section="global")
         config.read(CONFIG_FILE)
         db = piupartslib.packagesdb.PackagesDB(prefix=section)
         self._package_databases[section] = db
+        if config["depends-sections"]:
+            deps = config["depends-sections"].split()
+            for dep in deps:
+                self._load_package_database(dep)
+            db.set_dependency_databases([self._package_databases[dep] for dep in deps])
         packages_url = self._distro_config.get_packages_url(
                 config.get_distro(), config.get_area(), config.get_arch())
         logging.info("Fetching %s" % packages_url)

-- 
piuparts git repository



More information about the Piuparts-commits mailing list