[Piuparts-commits] rev 925 - in trunk: . debian
Holger Levsen
holger at alioth.debian.org
Sun Jul 10 14:05:52 UTC 2011
Author: holger
Date: 2011-07-10 14:05:52 +0000 (Sun, 10 Jul 2011)
New Revision: 925
Modified:
trunk/TODO
trunk/debian/changelog
trunk/piuparts.1.txt
trunk/piuparts.py
Log:
run dpkg with --force-unsafe-io by default and introduce new option
"--dpkg-noforce-unsafe-io" to disable this feature. (Closes: #633033)
Thanks to Scott once more!
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2011-07-10 14:03:36 UTC (rev 924)
+++ trunk/TODO 2011-07-10 14:05:52 UTC (rev 925)
@@ -32,7 +32,8 @@
altogether. also remove "fixed".
- use libeatmydata - either install it in all chroots or find a
- better way to use it.
+ better way to use it. Since 0.41 there is --force-unsafe-io
+ but libeatmydata should be even faster.
- generate piuparts.1.txt automatically from piuparts.py - see
this blog post for a nice howto:
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2011-07-10 14:03:36 UTC (rev 924)
+++ trunk/debian/changelog 2011-07-10 14:05:52 UTC (rev 925)
@@ -28,6 +28,9 @@
- Thanks to Scott Schaefer for the patch. (Closes: #632046)
- new option "--no-install-purge-test" to only do upgrade tests
- Thanks to Andreas Bergmann for the patch (Closes: #588482)
+ - run dpkg with --force-unsafe-io by default and introduce new option
+ "--dpkg-noforce-unsafe-io" to disable this feature. (Closes: #633033)
+ Thanks to Scott once more!
* piuparts-slave:
- check if chroot-tgz is older than MAX_TGZ_AGE (currently
hardcoded to 30) and recreate it, if it is. Keep backup and put in back
Modified: trunk/piuparts.1.txt
===================================================================
--- trunk/piuparts.1.txt 2011-07-10 14:03:36 UTC (rev 924)
+++ trunk/piuparts.1.txt 2011-07-10 14:05:52 UTC (rev 925)
@@ -62,6 +62,9 @@
*--dpkg-force-confdef*::
Make dpkg use --force-confdef, which lets dpkg always choose the default action when a modified conffile is found. This option will make piuparts ignore errors it was designed to report and therefore should only be used to hide problems in depending packages. 'This option shall normally not be used.' (See #466118.)
+*--dpkg-noforce-unsafe-io*::
+ Prevent running dpkg with --force-unsafe-io. --force-unsafe-io causes dpkg to skip certain file system syncs known to cause substantial performance degradation on some filesystems. Thus, including this option reverts to safe but slower behavior.
+
*-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.
Modified: trunk/piuparts.py
===================================================================
--- trunk/piuparts.py 2011-07-10 14:03:36 UTC (rev 924)
+++ trunk/piuparts.py 2011-07-10 14:05:52 UTC (rev 925)
@@ -699,6 +699,8 @@
proxy = m.group(1)
if proxy:
lines.append('Acquire::http::Proxy "%s";\n' % proxy)
+ if settings.dpkg_force_unsafe_io:
+ lines.append('Dpkg::Options {"--force-unsafe-io";};\n')
if settings.dpkg_force_confdef:
lines.append('Dpkg::Options {"--force-confdef";};\n')
@@ -707,10 +709,15 @@
def create_dpkg_conf(self):
"""Create /etc/dpkg/dpkg.cfg.d/piuparts inside the chroot."""
+ lines = []
+ if settings.dpkg_force_unsafe_io:
+ lines.append('force-unsafe-io\n')
if settings.dpkg_force_confdef:
+ lines.append('force-confdef\n')
+ logging.info("Warning: dpkg has been configured to use the force-confdef option. This will hide problems, see #466118.")
+ if lines:
create_file(self.relative("etc/dpkg/dpkg.cfg.d/piuparts"),
- 'force-confdef\n')
- logging.info("Warning: dpkg has been configured to use the force-confdef option. This will hide problems, see #466118.")
+ "".join(lines))
def create_policy_rc_d(self):
"""Create a policy-rc.d that prevents daemons from running."""
@@ -1954,6 +1961,11 @@
default="-o MaxPriority=required -o UseRecommends=no -f -n apt debfoster",
help="Run debfoster with different parameters (default: -o MaxPriority=required -o UseRecommends=no -f -n apt debfoster).")
+ parser.add_option("--dpkg-noforce-unsafe-io",
+ default=False,
+ action='store_true',
+ help="Default is to run dpkg with --force-unsafe-io option, which causes dpkg to skip certain file system syncs known to cause substantial performance degradation on some filesystems. This option turns that off and dpkg will use safe I/O operations.")
+
parser.add_option("--dpkg-force-confdef",
default=False,
action='store_true',
@@ -2148,6 +2160,7 @@
settings.warn_on_others = opts.warn_on_others
settings.warn_on_leftovers_after_purge = opts.warn_on_leftovers_after_purge
settings.debfoster_options = opts.debfoster_options.split()
+ settings.dpkg_force_unsafe_io = not opts.dpkg_noforce_unsafe_io
settings.dpkg_force_confdef = opts.dpkg_force_confdef
if opts.adt_virt is None:
More information about the Piuparts-commits
mailing list