[Piuparts-commits] [SCM] piuparts git repository branch, feature/eatmydata, updated. 9c9001df8eb4ee0c3453a62f0474a1a6ac0a74cc
Holger Levsen
holger at layer-acht.org
Mon Sep 26 21:31:58 UTC 2011
The following commit has been merged in the feature/eatmydata branch:
commit 9c9001df8eb4ee0c3453a62f0474a1a6ac0a74cc
Author: Holger Levsen <holger at layer-acht.org>
Date: Mon Sep 26 23:31:26 2011 +0200
debian/control: Add eatmydata to recommends.
diff --git a/debian/changelog b/debian/changelog
index 9704054..55c550c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,7 +12,7 @@ piuparts (0.42) UNRELEASED; urgency=low
[ Stefano Rivera ]
* piuparts.py: use eatmydata by default, add option --no-eatmydata. (This
was discussed in #633033.)
- * debian/control: Add eatmydata to depends.
+ * debian/control: Add eatmydata to recommends.
-- Holger Levsen <holger at debian.org> Sun, 28 Aug 2011 09:50:12 +0200
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]])
--
piuparts git repository
More information about the Piuparts-commits
mailing list