[Piuparts-commits] [SCM] piuparts git repository branch, master, updated. 0.48-79-gdf94975

Andreas Beckmann debian at abeckmann.de
Sat Jan 12 11:33:18 UTC 2013


The following commit has been merged in the master branch:
commit 3abf6ab27b4ca79cbc0e04f43978425aa1a70130
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Wed Dec 19 00:36:34 2012 +0100

    p: rename --no-debsums option to --warn-on-debsums-errors
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/TODO b/TODO
index 3dcc5bc..9ad552e 100644
--- a/TODO
+++ b/TODO
@@ -7,6 +7,7 @@ wishlist!
 
 for 0.49:
 
+*** Q: What is the problem with a Depends: debsums ? ***
 - turn debsums dependency into a recommends and make piuparts.py refuse to run
   if debsums is not installed and no --no-debsums options is given.
 
diff --git a/debian/changelog b/debian/changelog
index 5ffc541..f7d0c80 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,7 @@ piuparts (0.49) UNRELEASED; urgency=low
   * piuparts.py:
     - Run custom scripts only once if dependencies are installed via a
       metapackage.
+    - Rename --no-debsums option to --warn-on-debsums-errors.
     - Add --extra-repo=<sources.list line> option for adding extra
       package sources, e.g. backports, security or local repositories.
       The argument must be a valid line (including whitespace) that is added
diff --git a/piuparts.1.txt b/piuparts.1.txt
index 7c51975..8c1a005 100644
--- a/piuparts.1.txt
+++ b/piuparts.1.txt
@@ -132,9 +132,6 @@ The 'components' that are used for a mirror can also be set with this option: a
 +
 Note that file: addresses works if the directories are made accessible from within the chroot with '--bindmount'.
 
-*--no-debsums*::
-  Don't run debsums to check for modified or missing files.
-
 *--no-diversions*::
   Don't check for broken diversions.
 
@@ -200,6 +197,9 @@ Note: the temporary directory must *not* be mounted with the _nodev_ or _nosuid_
 *-V, --version*::
   Write out the version number of the program.
 
+*--warn-on-debsums-errors*::
+  Print a warning rather than failing if debsums reports modified files.
+
 *--warn-on-leftovers-after-purge*::
   Print a warning rather than failing if files are left behind after purge.
 
diff --git a/piuparts.py b/piuparts.py
index c120f21..15f8b26 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -163,12 +163,12 @@ class Settings:
         self.extra_old_packages = []
         self.skip_cronfiles_test = False
         self.skip_logrotatefiles_test = False
-        self.check_debsums = True
         self.check_broken_diversions = True
         self.check_broken_symlinks = True
         self.warn_broken_symlinks = True
         self.warn_on_others = False
         self.warn_on_leftovers_after_purge = False
+        self.warn_on_debsums_errors = False
         self.ignored_files = [
             # piuparts state
             "/usr/sbin/policy-rc.d",
@@ -1161,14 +1161,12 @@ class Chroot:
         added = [ln for ln in post_install_diversions if not ln in pre_install_diversions]
         return (removed, added)
 
-    def check_debsums(self, ignore_errors=False):
-        if not settings.check_debsums:
-            return
+    def check_debsums(self):
         (status, output) = run(["debsums", "--root", self.name, "-ac"], ignore_errors=True)
         if status != 0:
             logging.error("FAIL: debsums reports modifications inside the chroot:\n%s" %
                           indent_string(output.replace(self.name, "")))
-            if not ignore_errors:
+            if not settings.warn_on_debsums_errors:
                 panic()
 
     def list_paths_with_symlinks(self):
@@ -2579,10 +2577,6 @@ def parse_command_line():
                       action="store_true", default=False,
                       help="Skip testing the output from the logrotate files.")
 
-    parser.add_option("--no-debsums",
-                      action="store_true", default=False,
-                      help="Skip running debsums in the chroot.")
-
     parser.add_option("--skip-minimize",
                       action="store_true", default=True,
                       help="Skip minimize chroot step. This is the default now.")
@@ -2620,6 +2614,11 @@ def parse_command_line():
                       help="Print a warning rather than failing if "
                            "files are left behind after purge.")
 
+    parser.add_option("--warn-on-debsums-errors",
+                      action="store_true", default=False,
+                      help="Print a warning rather than failing if "
+                           "debsums reports modified files.")
+
     parser.add_option("--fail-on-broken-symlinks", action="store_true",
                       default=False,
                       help="Fail if broken symlinks are detected.")
@@ -2673,12 +2672,12 @@ def parse_command_line():
     [settings.extra_old_packages.extend([i.strip() for i in csv.split(",")]) for csv in opts.extra_old_packages]
     settings.skip_cronfiles_test = opts.skip_cronfiles_test
     settings.skip_logrotatefiles_test = opts.skip_logrotatefiles_test
-    settings.check_debsums = not opts.no_debsums
     settings.check_broken_diversions = not opts.no_diversions
     settings.check_broken_symlinks = not opts.no_symlinks
     settings.warn_broken_symlinks = not opts.fail_on_broken_symlinks
     settings.warn_on_others = opts.warn_on_others
     settings.warn_on_leftovers_after_purge = opts.warn_on_leftovers_after_purge
+    settings.warn_on_debsums_errors = opts.warn_on_debsums_errors
     settings.ignored_files += opts.ignore
     settings.ignored_patterns += opts.ignore_regex
     settings.pedantic_purge_test = opts.pedantic_purge_test

-- 
piuparts git repository



More information about the Piuparts-commits mailing list