[Piuparts-commits] [piuparts] 07/07: p: fall back to on-the-fly generation if --end-meta file is missing
Holger Levsen
holger at layer-acht.org
Mon Mar 6 12:25:15 UTC 2017
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch develop
in repository piuparts.
commit defa2bdc17ce23b7dbac2331c40de6669b12b42a
Author: Andreas Beckmann <anbe at debian.org>
Date: Mon Mar 6 00:05:50 2017 +0100
p: fall back to on-the-fly generation if --end-meta file is missing
Signed-off-by: Andreas Beckmann <anbe at debian.org>
Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
debian/changelog | 2 ++
piuparts.py | 11 ++++++++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 3f2cf1a..8cfa305 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,8 @@ piuparts (0.76) UNRELEASED; urgency=medium
- Make install_over_symlink tests fail by default, add
--warn-on-install-over-symlink option to demote this to a warning.
- Add --install-suggests option.
+ - Fall back to generating the reference chroot state on-the-fly if the
+ --end-meta file is missing.
* piuparts.conf:
- Use --warn-on-install-over-symlink for tests ending before stretch.
- Enable scripts-log-alternatives for [sid] and [stretch]. (See: #850917)
diff --git a/piuparts.py b/piuparts.py
index 4e0904c..ee21aa8 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -2630,10 +2630,15 @@ def install_and_upgrade_between_distros(package_files, packages_qualified):
chroot = get_chroot()
chroot.create()
+ chroot_state = None
if settings.end_meta:
- # load root_info and selections
- chroot_state = load_meta_data(settings.end_meta)
- else:
+ if os.path.exists(settings.end_meta):
+ # load root_info and selections
+ chroot_state = load_meta_data(settings.end_meta)
+ else:
+ logging.info("Cannot load chroot state from %s - generating it on-the-fly." % settings.end_meta)
+
+ if chroot_state is None:
temp_tgz = None
if chroot.was_bootstrapped():
temp_tgz = chroot.create_temp_tgz_file()
--
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