Hi Holger (2011.08.28_19:23:20_+0200) > Maybe you can come up with an enhanced patch which gracefully deals with the > non-existance of eatmydata, so we can turn the depends into a recommends > without annoying people who dont install recommends...
Non-existance of eatmydata in the chroot was already dealt with. Although non-existance of eatmydata when creating the chroot (i.e. pre-squeeze / pre-maverick) isn't dealt with. That is best worked around by the user using --no-eatmydata. Additional patch for non-existance of eatmydata on the host attached (and in my branch on alioth http://anonscm.debian.org/gitweb/?p=users/stefanor/piuparts.git) For future maintainability, can I also suggest my "whitespace" branch on alioth? It's equivalent to $ sed -i -e 's/\t/ /g; s/ *$//' piuparts.py $ wrap-and-sort -s SR -- Stefano Rivera http://tumbleweed.org.za/ H: +27 21 465 6908 C: +27 72 419 8559 UCT: x3127
commit 55181612611760f6b4f0bed7d9eca7617a5c4729 Author: Stefano Rivera <stef...@rivera.za.net> Date: Thu Sep 1 18:06:35 2011 +0200 move eatmydata to Recommends diff --git a/debian/control b/debian/control index 7559426..97ea27c 100644 --- a/debian/control +++ b/debian/control @@ -14,7 +14,8 @@ X-Python-Version: >= 2.6 Package: piuparts Architecture: all Depends: apt, ${python:Depends}, debootstrap, lsof, lsb-release, - python-debian, ${misc:Depends}, python-debianbts, python-apt, eatmydata + python-debian, ${misc:Depends}, python-debianbts, python-apt +Recommends: eatmydata Suggests: python-rpy, ghostscript Description: .deb package installation, upgrading, and removal testing tool piuparts tests that .deb packages (as used by Debian) handle diff --git a/piuparts.py b/piuparts.py index 11ee012..3a335ca 100644 --- a/piuparts.py +++ b/piuparts.py @@ -651,7 +651,7 @@ class Chroot: """Unpack a tarball to a chroot.""" logging.debug("Unpacking %s into %s" % (tarball, self.name)) prefix = [] - if settings.eatmydata: + if settings.eatmydata and os.path.isfile('/usr/bin/eatmydata'): prefix.append('eatmydata') run(prefix + ["tar", "-C", self.name, "-zxf", tarball]) @@ -738,14 +738,15 @@ class Chroot: """Set up a minimal Debian system in a chroot.""" logging.debug("Setting up minimal chroot for %s at %s." % (settings.debian_distros[0], self.name)) + prefix = [] + if settings.eatmydata and os.path.isfile('/usr/bin/eatmydata'): + prefix.append('eatmydata') if settings.do_not_verify_signatures: logging.info("Warning: not using --keyring option when running debootstrap!") - prefix = [] options = [settings.keyringoption] if settings.eatmydata: options.append('--include=eatmydata') options.append('--components=%s' % ','.join(settings.debian_mirrors[0][1])) - prefix.append('eatmydata') run(prefix + ["debootstrap", "--variant=minbase"] + options + [settings.debian_distros[0], self.name, settings.debian_mirrors[0][0]])