[Piuparts-commits] [SCM] piuparts git repository branch, master, updated. 0.48-79-gdf94975
Andreas Beckmann
debian at abeckmann.de
Sat Jan 12 11:33:15 UTC 2013
The following commit has been merged in the master branch:
commit 39eb4c09c570269974d5b8586b2779462715b61e
Author: Andreas Beckmann <debian at abeckmann.de>
Date: Sun Dec 16 22:12:00 2012 +0100
p: add --testdebs-repo option
--testdebs-repo=deb-line
A repository that contains the packages to be tested, e.g.
'deb <URL> <distrib> <components>...' or 'deb file://</bind/mount> ./'
Signed-off-by: Andreas Beckmann <debian at abeckmann.de>
diff --git a/debian/changelog b/debian/changelog
index cbf5317..2cb334c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -16,6 +16,10 @@ piuparts (0.49) UNRELEASED; urgency=low
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.
- Qualify to the package names extracted from .debs with the version.
+ - Add --testdebs-repo=<sources.list line> option. Provide the package(s)
+ to be tested (and additional dependencies that are not yet in the
+ archive) in a repository to enable dependency resolution with apt-get.
+ Use for complex install and upgrade scenarios.
* piuparts.conf:
* piupartslib/conf.py:
- Add get_final_distro() method.
diff --git a/piuparts.1.txt b/piuparts.1.txt
index 7c51975..0e29186 100644
--- a/piuparts.1.txt
+++ b/piuparts.1.txt
@@ -189,6 +189,19 @@ Note that file: addresses works if the directories are made accessible from with
*--skip-logrotatefiles-test*::
Skip testing the output from the logrotate files left in the system after remove a package.
+*--testdebs-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> ./'
+ The "testdebs" repository provides the packages to be tested (and some
+ additional dependencies, if needed, e.g. all packages built from the same
+ source package as the (binary) package being tested) and can be used for
+ testing complex installation and upgrade scenarios involving dependencies
+ that are not yet in the archive. This repository will be available only
+ for installing the target packages. Dependency resolution will be done by
+ apt-get. The packages to be tested can be passed as .debs or as package
+ names (with '--apt').
+
*-t directory, --tmpdir*='directory'::
Use directory as the place where temporary files and directories are created. The default is the environment variable *TMPDIR*, or _/tmp_ if not set.
+
diff --git a/piuparts.py b/piuparts.py
index 687d872..cd7b57e 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -139,6 +139,7 @@ class Settings:
# distro setup
self.debian_mirrors = []
self.extra_repos = []
+ self.testdebs_repo = None
self.debian_distros = []
self.keep_sources_list = False
self.do_not_verify_signatures = False
@@ -907,6 +908,18 @@ class Chroot:
create_file(self.relative("etc/apt/sources.list"),
"".join(lines))
+ def enable_testdebs_repo(self, update=True):
+ if settings.testdebs_repo:
+ logging.debug("enabling testdebs repository '%s'" % settings.testdebs_repo)
+ create_file(self.relative("etc/apt/sources.list.d/piuparts-testdebs-repo.list"), settings.testdebs_repo + "\n")
+ if update:
+ self.run(["apt-get", "update"])
+
+ def disable_testdebs_repo(self):
+ if settings.testdebs_repo:
+ logging.debug("disabling testdebs repository")
+ remove_files([self.relative("etc/apt/sources.list.d/piuparts-testdebs-repo.list")])
+
def create_apt_conf(self):
"""Create /etc/apt/apt.conf.d/piuparts inside the chroot."""
lines = ['APT::Get::Assume-Yes "yes";\n']
@@ -2522,6 +2535,10 @@ def parse_command_line():
help="Additional (unparsed) lines to be appended to sources.list, e.g. " +
"'deb <URL> <distrib> <components>' or 'deb file://</bind/mount> ./'")
+ parser.add_option("--testdebs-repo",
+ help="A repository that contains the packages to be tested, 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.")
@@ -2695,6 +2712,7 @@ def parse_command_line():
settings.ignored_patterns += settings.non_pedantic_ignore_patterns
settings.extra_repos = opts.extra_repo
+ settings.testdebs_repo = opts.testdebs_repo
log_file_name = opts.log_file
--
piuparts git repository
More information about the Piuparts-commits
mailing list