[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.45-63-g397f4e3

Andreas Beckmann debian at abeckmann.de
Thu Jul 19 17:43:55 UTC 2012


The following commit has been merged in the develop branch:
commit e83b643f212de60c68498dddfa71c57e72bf6fde
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Sun Jul 8 00:37:33 2012 +0200

    p: add --install-purge-install option
    
    - test purging the package with all dependencies still installed
    - test installing the package again after purge
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/debian/changelog b/debian/changelog
index 80b33b8..c87fbb1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,8 @@ piuparts (0.46) UNRELEASED; urgency=low
       + /var/lib/onioncat/
     - Fix some leftover directories getting incorrectly accounted to the
       package being tested instead of the dependencies in --warn-on-others mode.
+    - Implement --install-purge-install option: test purging with all
+      dependencies still installed; re-install after purge.
   * piupartslib/dependencyparser.py:
     - Package names may now have a ":any" qualification in some cases.  Extend
       the parser to recognize and discard this suffix.
diff --git a/piuparts.1.txt b/piuparts.1.txt
index 9aef03c..835a50d 100644
--- a/piuparts.1.txt
+++ b/piuparts.1.txt
@@ -82,6 +82,12 @@ The tarball can be created with the '-s' option, or you can use one that *pbuild
 *-I* 'regexp', *--ignore-regexp*='regexp'::
   Add a regular expression pattern to the list of patterns for filenames to be ignored when comparing changes before and after installation. This option can be used as many times as necessary.
 
+*--install-purge-install*::
+  Purge package after installation and reinstall. All depedencies are installed during purge.
+
+*--install-remove-install*::
+  Remove package after installation and reinstall. For testing installation in config-files-remaining state.
+
 *-k, --keep-tmpdir*::
   Don't remove the temporary directory for the chroot when the program ends.
 
diff --git a/piuparts.py b/piuparts.py
index 5ad2ce6..8e9be3f 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -2074,8 +2074,14 @@ def install_purge_test(chroot, chroot_state, package_files, packages):
 
     chroot.install_packages(package_files, packages)
 
+    if settings.install_purge_install:
+        chroot.purge_packages(packages)
+        logging.info("Reinstalling after purge")
+        chroot.install_packages(package_files, packages)
+
     if settings.install_remove_install:
         chroot.remove_packages(packages)
+        logging.info("Reinstalling after remove")
         chroot.install_packages(package_files, packages)
 
     chroot.check_for_no_processes()
@@ -2428,6 +2434,10 @@ def parse_command_line():
                       action="store_true", default=False,
                       help="Skip install and purge test.")
 
+    parser.add_option("--install-purge-install",
+                      action="store_true", default=False,
+                      help="Purge package after installation and reinstall.")
+
     parser.add_option("--install-remove-install",
                       action="store_true", default=False,
                       help="Remove package after installation and reinstall. For testing installation in config-files-remaining state.")
@@ -2551,6 +2561,7 @@ def parse_command_line():
     # tests and checks
     settings.no_install_purge_test = opts.no_install_purge_test
     settings.no_upgrade_test = opts.no_upgrade_test
+    settings.install_purge_install = opts.install_purge_install
     settings.install_remove_install = opts.install_remove_install
     settings.list_installed_files = opts.list_installed_files
     [settings.extra_old_packages.extend([i.strip() for i in csv.split(",")]) for csv in opts.extra_old_packages]

-- 
piuparts git repository



More information about the Piuparts-commits mailing list