[Piuparts-commits] [piuparts] 08/17: p-s: new components setting

Holger Levsen holger at alioth.debian.org
Wed Nov 6 09:45:53 UTC 2013


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch develop
in repository piuparts.

commit 7b2413e86c53dc15551da2666d65bb4967310d13
Author: Andreas Beckmann <anbe at debian.org>
Date:   Tue Nov 5 20:54:37 2013 +0100

    p-s: new components setting
    
    to restrict the components (archive ares) used in the generated sources.list
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
 README_server.txt |   13 ++++++++++---
 debian/changelog  |    5 +++++
 piuparts-slave.py |   11 +++++++++--
 3 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/README_server.txt b/README_server.txt
index 287e0ac..4a24fab 100644
--- a/README_server.txt
+++ b/README_server.txt
@@ -388,10 +388,17 @@ section, too, and will serve as defaults for all other sections
  stable to backports to testing).
 
 * "area" is the archive area to use, set to one of main, contrib,
- non-free. Default: "main".
+ non-free. This is used for loading Packages files to get the list
+ of packages to be tested. Default: "main".
 
-* "arch" is the architecture to use. Default: dpkg
- --print-architecture.
+* "components" restricts the archive areas that will be used in
+ the generated sources.list. Further restrictions may be set in
+ distros.conf. Defaults to "", which means all components will be
+ available. Useful setting: "main" with area = main to avoid using
+ packages outside main.
+
+* "arch" is the architecture to use.
+ Default: dpkg --print-architecture.
 
 * "chroot-tgz" is the name of the file the slave should use for
  the tarball containing the base chroot. The default name is
diff --git a/debian/changelog b/debian/changelog
index 05c4e2a..c7b065f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,11 +5,16 @@ piuparts (0.56) UNRELEASED; urgency=low
     - Add to ignored_files:
       + /etc/apt/apt.conf.d/01autoremove-kernels
     - Use temporary files while creating basetgz and rename afterwards.
+  * piuparts.conf:
+    - New per-section settings:
+      + components
   * piupartslib/__init__.py:
     - open_packages_url(): Try Packages.gz if Packages.bz2 is not available.
       (Closes: #711157)
   * piuparts-slave.py:
     - Use locking to prevent concurrent basetgz creation.  (Closes: #708287)
+    - Use the "components" setting to restrict the archive areas being used
+      in the generated sources.list.
   * piuparts-report.py:
     - Report URLs of all Packages files used for a section.
     - Avoid reporting duplicate dependencies after stripping versioning.
diff --git a/piuparts-slave.py b/piuparts-slave.py
index 39b5ed5..8f7498f 100644
--- a/piuparts-slave.py
+++ b/piuparts-slave.py
@@ -88,6 +88,7 @@ class Config(piupartslib.conf.Config):
                 "tmpdir": None,
                 "distro": None,
                 "area": None,
+                "components": None,
                 "chroot-tgz": None,
                 "upgrade-test-distros": None,
                 "basetgz-directory": ".",
@@ -626,7 +627,10 @@ class Section:
         if "http_proxy" in os.environ:
             command.extend(["--proxy", os.environ["http_proxy"]])
         if self._config["mirror"]:
-            command.extend(["--mirror", self._config["mirror"]])
+            mirror = self._config["mirror"]
+            if self._config["components"]:
+                mirror += " " + self._config["components"]
+            command.extend(["--mirror", mirror])
         if self._config["tmpdir"]:
             command.extend(["--tmpdir", self._config["tmpdir"]])
         command.extend(["--arch", self._config.get_arch()])
@@ -808,7 +812,10 @@ def create_chroot(config, tarball, distro):
     if "http_proxy" in os.environ:
         command.extend(["--proxy", os.environ["http_proxy"]])
     if config["mirror"]:
-        command.extend(["--mirror", config["mirror"]])
+        mirror = self._config["mirror"]
+        if self._config["components"]:
+            mirror += " " + self._config["components"]
+        command.extend(["--mirror", mirror])
     if config["tmpdir"]:
         command.extend(["--tmpdir", config["tmpdir"]])
     command.extend(["--arch", config.get_arch()])

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git



More information about the Piuparts-commits mailing list