[Piuparts-devel] Bug#628077: piuparts: piuparts does not execute post_install script when testing package by name (-a switch)

Scott Schaefer saschaefer at neurodiverse.org
Thu May 26 22:55:53 UTC 2011


Package: piuparts
Version: 0.38  ( from reportbug, but actual executing code is from SVN r889)
Severity: normal

A. Compare using -a to install package by name ...

$ sudo python piuparts.py -b TARBALL.tgz --scriptsdir=...  -a openssl > 
openssl.log 2>&1
$ grep "Running scripts" openssl.log
0m36.5s INFO: Running scripts post_setup
0m38.2s INFO: Running scripts pre_install
0m52.7s INFO: Running scripts pre_remove        **** no post_install 
script run
0m53.7s INFO: Running scripts post_remove
0m55.6s INFO: Running scripts post_purge

B. ... to installing from package file

$ sudo python piuparts.py -b TARBALL.tgz --scriptsdir=...  
/var/cache/apt/archives/openssl_1.0.0d-2_i386.deb > openssl.log 2>&1
$ grep "Running scripts" openssl.log
0m40.0s INFO: Running scripts post_setup
0m42.2s INFO: Running scripts pre_install
1m0.4s INFO: Running scripts post_install           *** post_install is 
run here
1m1.6s INFO: Running scripts pre_remove
1m2.5s INFO: Running scripts post_remove
1m4.4s INFO: Running scripts post_purge
1m7.8s INFO: Running scripts pre_install
1m16.2s INFO: Running scripts pre_upgrade
1m16.6s INFO: Running scripts pre_install        *** should this be 
called again
1m20.8s INFO: Running scripts post_install
1m21.0s INFO: Running scripts pre_remove
1m22.0s INFO: Running scripts post_remove
1m24.7s INFO: Running scripts post_purge

The patch below would cause the script to run using -a, but I am not 
certain it has undesirable consequences.

Furthermore, I am not certain whether calling the pre-install script(s) 
both before and after pre-upgrade is correct.


diff --git a/piuparts.py b/piuparts.py
--- a/piuparts.py
+++ b/piuparts.py
@@ -963,7 +963,10 @@
                  self.list_installed_files (pre_info, 
self.save_meta_data())
              else:
                  self.run(["apt-get", "-y", "install"] + packages)
-
+
+        if packages:
+            if settings.scriptsdir is not None:
+                self.run_scripts("post_install")

      def check_for_no_processes(self):
          """Check there are no processes running inside the chroot."""
s



-- System Information:
Debian Release: 6.0.1
   APT prefers stable
   APT policy: (990, 'stable')
Architecture: i386 (i686)

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

Versions of packages piuparts depends on:
ii  apt                     0.8.10.3         Advanced front-end for dpkg
ii  debootstrap             1.0.26+squeeze1  Bootstrap a basic Debian system
ii  lsb-release             3.2-23.2squeeze1 Linux Standard Base version 
report
ii  lsof                    4.81.dfsg.1-1    List open files
ii  python                  2.6.6-3+squeeze6 interactive high-level 
object-orie
ii  python-debian           0.1.18           Python modules to work with 
Debian

piuparts recommends no packages.

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

-- no debconf information






More information about the Piuparts-devel mailing list