[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.48-34-g4fdde9d
Holger Levsen
holger at layer-acht.org
Tue Dec 11 16:34:50 UTC 2012
The following commit has been merged in the develop branch:
commit 4fdde9df502a8cc3221d918ddf8bce97ecbc191b
Author: Andreas Beckmann <debian at abeckmann.de>
Date: Sat Dec 1 19:17:58 2012 +0100
p: add --extra-repo option
Add option --extra-repo=<sources.list line>, can be given multiple times.
Allows to add additional (unparsed) lines to be appended to sources.list, e.g.
deb <URL> <distrib> <components>
deb file://</bind/mount> ./
Be careful to include proper whitespace.
Signed-off-by: Andreas Beckmann <debian at abeckmann.de>
diff --git a/debian/changelog b/debian/changelog
index 2a617eb..5ffc541 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,10 @@ piuparts (0.49) UNRELEASED; urgency=low
* piuparts.py:
- Run custom scripts only once if dependencies are installed via a
metapackage.
+ - Add --extra-repo=<sources.list line> option for adding extra
+ package sources, e.g. backports, security or local repositories.
+ The argument must be a valid line (including whitespace) that is added
+ to sources.list verbatim. The option may be repeated to add more lines.
* piuparts.conf:
* piupartslib/conf.py:
- Add get_final_distro() method.
diff --git a/piuparts.1.txt b/piuparts.1.txt
index 0fd20cb..7c51975 100644
--- a/piuparts.1.txt
+++ b/piuparts.1.txt
@@ -76,6 +76,13 @@ The tarball can be created with the '-s' option, or you can use one that *pbuild
a new one with debootstrap. This is similar to '--basetgz', but the contents
are not archived.
+*--extra-repo*='deb-line'::
+ Provide an additional (unparsed) line to be appended to sources.list, e.g.
+ 'deb <URL> <distrib> <components>' or
+ 'deb file:// </bind/mount> ./'
+ Useful for e.g. backports, security or local repositories that cannot be
+ handled by '--mirror'. May be repeated to add more than one line.
+
*-i* 'filename', *--ignore*='filename'::
Add a filename to the list of filenames to be ignored when comparing changes before and after installation. By default, piuparts ignores files that always change during a package installation and uninstallation, such as *dpkg* status files. The filename should be relative to the root of the chroot (e.g., _var/lib/dpkg/status_). This option can be used as many times as necessary.
diff --git a/piuparts.py b/piuparts.py
index 6cff1f5..c120f21 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -138,6 +138,7 @@ class Settings:
self.args_are_package_files = True
# distro setup
self.debian_mirrors = []
+ self.extra_repos = []
self.debian_distros = []
self.keep_sources_list = False
self.do_not_verify_signatures = False
@@ -901,6 +902,8 @@ class Chroot:
for mirror, components in settings.debian_mirrors:
lines.append("deb %s %s %s\n" %
(mirror, distro, " ".join(components)))
+ for repo in settings.extra_repos:
+ lines.append(repo + "\n")
create_file(self.relative("etc/apt/sources.list"),
"".join(lines))
@@ -2505,6 +2508,11 @@ def parse_command_line():
default=[],
help="Which Debian mirror to use.")
+ parser.add_option("--extra-repo", action="append",
+ default=[],
+ help="Additional (unparsed) lines to be appended to sources.list, e.g. " +
+ "'deb <URL> <distrib> <components>' or 'deb file://</bind/mount> ./'")
+
parser.add_option("--no-diversions", action="store_true",
default=False,
help="Don't check for broken diversions.")
@@ -2677,6 +2685,8 @@ def parse_command_line():
if not settings.pedantic_purge_test:
settings.ignored_patterns += settings.non_pedantic_ignore_patterns
+ settings.extra_repos = opts.extra_repo
+
log_file_name = opts.log_file
defaults = DefaultsFactory().new_defaults()
--
piuparts git repository
More information about the Piuparts-commits
mailing list