[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.48-19-g93bfc2b

Andreas Beckmann debian at abeckmann.de
Sat Dec 1 10:50:54 UTC 2012


The following commit has been merged in the develop branch:
commit 8a717fbbac3406a80db3b40a80ffd74c394f98a3
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Fri Nov 30 16:43:28 2012 +0100

    lib/conf: add optional distro argument to get_mirror() method
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/debian/changelog b/debian/changelog
index c030fd0..4079fe6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ piuparts (0.49) UNRELEASED; urgency=low
   * piuparts.conf:
   * piupartslib/conf.py:
     - Add get_final_distro() method.
+    - Add optional distro argument to get_mirror() method.
   * piuparts-master.py:
   * piuparts-slave.py:
     - Disable X forwarding while connecting to master.
diff --git a/piupartslib/conf.py b/piupartslib/conf.py
index c705ad6..cbf92c8 100644
--- a/piupartslib/conf.py
+++ b/piupartslib/conf.py
@@ -54,7 +54,7 @@ class Config(UserDict.UserDict):
             elif key in self._mandatory:
                 raise MissingMandatorySetting(filename, key)
 
-    def get_mirror(self):
+    def get_mirror(self, distro=None):
         if self["mirror"] is not None:
             return self["mirror"]
         return "http://cdn.debian.net/debian"
@@ -92,10 +92,10 @@ class Config(UserDict.UserDict):
         if distro is None:
             distro = self.get_distro()
         return "%s/dists/%s/%s/binary-%s/Packages.bz2" % \
-                (self.get_mirror(), distro, self.get_area(), self.get_arch())
+                (self.get_mirror(distro), distro, self.get_area(), self.get_arch())
 
     def get_sources_url(self):
         return "%s/dists/%s/%s/source/Sources.bz2" % \
-                (self.get_mirror(), self.get_distro(), self.get_area())
+                (self.get_mirror(self.get_distro()), self.get_distro(), self.get_area())
 
 # vi:set et ts=4 sw=4 :

-- 
piuparts git repository



More information about the Piuparts-commits mailing list