[Piuparts-commits] [SCM] piuparts git repository branch, piatti, updated. 0.49-113-g2c98b1d

Andreas Beckmann anbe at debian.org
Sun Mar 3 09:14:06 UTC 2013


The following commit has been merged in the piatti branch:
commit c3c7c022f16197bdeb6642d8564b6d9c4b880e75
Author: Andreas Beckmann <anbe at debian.org>
Date:   Sat Mar 2 13:45:18 2013 +0100

    p-s: use DistroConfig
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>

diff --git a/debian/changelog b/debian/changelog
index 59828cc..feeccd5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -43,6 +43,7 @@ piuparts (0.50) UNRELEASED; urgency=low
       (piuparts.conf global setting slave-load-max) is exceeded. Operation
       will be resumed after load drops below 'slave-load-max - 1.0'. Disabled
       by default.
+    - Use distros.conf to compute URLs.
   * piuparts-analyze.py:
     - Add support for magic "$DISTRO/None" versions.
   * piuparts-report.py:
diff --git a/piuparts-slave.py b/piuparts-slave.py
index 7d2d9d6..edb77e1 100644
--- a/piuparts-slave.py
+++ b/piuparts-slave.py
@@ -39,6 +39,7 @@ import piupartslib.packagesdb
 
 
 CONFIG_FILE = "/etc/piuparts/piuparts.conf"
+DISTRO_CONFIG_FILE = "/etc/piuparts/distros.conf"
 MAX_WAIT_TEST_RUN = 45*60
 
 interrupted = False
@@ -434,6 +435,8 @@ class Section:
                      % (action, self._config.section, self.precedence()))
         self._config = Config(section=self._config.section, defaults_section="global")
         self._config.read(CONFIG_FILE)
+        self._distro_config = piupartslib.conf.DistroConfig(
+                DISTRO_CONFIG_FILE, self._config["mirror"])
 
         if int(self._config["max-reserved"]) == 0:
             logging.info("disabled")
@@ -553,7 +556,8 @@ class Section:
         for distro in distros:
             if distro not in packages_files:
                 try:
-                    packages_url = self._config.get_packages_url(distro)
+                    packages_url = self._distro_config.get_packages_url(
+                            distro, self._config.get_area(), self._config.get_arch())
                     logging.debug("Fetching %s" % packages_url)
                     f = piupartslib.open_packages_url(packages_url)
                     packages_files[distro] = piupartslib.packagesdb.PackagesFile(f)

-- 
piuparts git repository



More information about the Piuparts-commits mailing list