Package: piuparts
Version: 0.38
Severity: wishlist
Tags: patch

Hi,

the attached patch adds a command line option to disable the install and
purge test. This may be helpful if the package has passed the test
already and you want to test multiple upgrade scenarios. I currently use
the name --no-install-purge-test, but if you think something else fits
better, feel free to rename it.

Patch is vs. SVN r690.

Andreas

-- System Information:
Debian Release: squeeze/sid
  APT prefers stable
  APT policy: (800, 'stable'), (700, 'testing'), (600, 'unstable'), (130, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages piuparts depends on:
ii  apt                        0.7.25.3      Advanced front-end for dpkg
ii  debootstrap                1.0.23        Bootstrap a basic Debian system
ii  lsb-release                3.2-23.1      Linux Standard Base version report
ii  lsof                       4.81.dfsg.1-1 List open files
ii  python                     2.6.5-5       An interactive high-level object-o
ii  python-debian              0.1.16        Python modules to work with Debian

piuparts recommends no packages.

Versions of packages piuparts suggests:
ii  ghostscript                 8.71~dfsg2-3 The GPL Ghostscript PostScript/PDF
pn  python-rpy                  <none>       (no description available)

-- no debconf information
Index: piuparts.py
===================================================================
--- piuparts.py	(revision 700)
+++ piuparts.py	(working copy)
@@ -149,6 +149,7 @@
         self.keep_sources_list = False
         self.skip_minimize = True
         self.list_installed_files = False
+        self.no_install_purge_test = False
         self.no_upgrade_test = False
         self.skip_cronfiles_test = False
         self.skip_logrotatefiles_test = False
@@ -1933,6 +1934,10 @@
                       default=False,
                       help="Don't check for broken symlinks.")
 
+    parser.add_option("--no-install-purge-test", 
+                      action="store_true", default=False,
+                      help="Skip the basic install and purge test.")
+
     parser.add_option("--no-upgrade-test", 
                       action="store_true", default=False,
                       help="Skip testing the upgrade from an existing version " +
@@ -2026,6 +2031,7 @@
     settings.skip_minimize = opts.skip_minimize
     settings.minimize = opts.minimize
     settings.list_installed_files = opts.list_installed_files
+    settings.no_install_purge_test = opts.no_install_purge_test
     settings.no_upgrade_test = opts.no_upgrade_test
     settings.skip_cronfiles_test = opts.skip_cronfiles_test
     settings.skip_logrotatefiles_test = opts.skip_logrotatefiles_test
@@ -2137,11 +2143,12 @@
         root_info = chroot.save_meta_data()
         selections = chroot.get_selections()
 
-        if not install_purge_test(chroot, root_info, selections,
-                  package_list, packages):
-            logging.error("FAIL: Installation and purging test.")
-            panic()
-        logging.info("PASS: Installation and purging test.")
+        if not settings.no_install_purge_test:
+            if not install_purge_test(chroot, root_info, selections,
+                      package_list, packages):
+                logging.error("FAIL: Installation and purging test.")
+                panic()
+            logging.info("PASS: Installation and purging test.")
 
         if not settings.no_upgrade_test:
             if not settings.args_are_package_files:

Reply via email to