[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.49-135-g41bea98
Andreas Beckmann
anbe at debian.org
Sun Mar 3 17:22:19 UTC 2013
The following commit has been merged in the develop branch:
commit 0e0e6ed2e6f7af1cb1666c63d66657cfee7e56be
Author: Andreas Beckmann <debian at abeckmann.de>
Date: Sun Mar 3 17:22:34 2013 +0100
p-m: load dependency sections
Signed-off-by: Andreas Beckmann <debian at abeckmann.de>
diff --git a/debian/changelog b/debian/changelog
index cb1cc0f..3e0c095 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -40,6 +40,7 @@ piuparts (0.50) UNRELEASED; urgency=low
- Sort packages to be tested by importance, i.e. descending waiting_count.
- Use piuparts.conf global proxy setting as http_proxy.
- Use distros.conf to compute URLs.
+ - Load depends-sections for package lookup in partial distros.
* piuparts-slave.py:
- Tarball recreation can be disabled by setting max-tgz-age to 0.
- Relax package existence checks to allow distupgrading to backports.
diff --git a/piuparts-master.py b/piuparts-master.py
index f643962..ef7cea9 100644
--- a/piuparts-master.py
+++ b/piuparts-master.py
@@ -63,6 +63,7 @@ class Config(piupartslib.conf.Config):
"area": None,
"arch": None,
"upgrade-test-distros": None,
+ "depends-sections": None,
},
defaults_section=defaults_section)
@@ -152,6 +153,9 @@ class Master(Protocol):
self._binary_db = self._package_databases[self._section]
def _load_package_database(self, section):
+ if section in self._package_databases:
+ return
+
config = Config(section=section, defaults_section="global")
config.read(CONFIG_FILE)
distro_config = piupartslib.conf.DistroConfig(DISTRO_CONFIG_FILE, config["mirror"])
@@ -159,6 +163,11 @@ class Master(Protocol):
if self._recycle_mode and self._section == section:
db.enable_recycling()
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 = 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