[Piuparts-commits] rev 197 - in trunk: . debian

Holger Levsen holger at alioth.debian.org
Tue Mar 10 15:27:45 UTC 2009


Author: holger
Date: 2009-03-10 15:27:45 +0000 (Tue, 10 Mar 2009)
New Revision: 197

Modified:
   trunk/debian/changelog
   trunk/piuparts.py
Log:
Copy scriptsdir to chroot also when doing upgrade tests.

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2009-03-10 14:37:17 UTC (rev 196)
+++ trunk/debian/changelog	2009-03-10 15:27:45 UTC (rev 197)
@@ -1,6 +1,7 @@
 piuparts (0.36) UNRELEASED; urgency=low
 
   * Add check whether scriptsdir exits, to fail gracefully if not. 
+  * Copy scriptsdir to chroot also when doing upgrade tests.
 
  -- Holger Levsen <holger at debian.org>  Tue, 10 Mar 2009 15:23:59 +0100
 

Modified: trunk/piuparts.py
===================================================================
--- trunk/piuparts.py	2009-03-10 14:37:17 UTC (rev 196)
+++ trunk/piuparts.py	2009-03-10 15:27:45 UTC (rev 197)
@@ -554,6 +554,15 @@
         self.minimize()
         self.run(["apt-get", "clean"])
 
+        #copy scripts dir into the chroot
+        if settings.scriptsdir is not None:
+            dest = self.relative("tmp/scripts/")
+            os.mkdir(dest)
+            logging.debug("Copying scriptsdir to %s" % dest)
+            for file in os.listdir(settings.scriptsdir):
+                if (file.startswith("post_") or file.startswith("pre_")) and os.path.isfile(os.path.join((settings.scriptsdir), file)):
+                    shutil.copy(os.path.join((settings.scriptsdir), file), dest) 
+
         if settings.savetgz:
             self.pack_into_tgz(settings.savetgz)
 
@@ -1893,14 +1902,6 @@
 
         root_info = chroot.save_meta_data()
         selections = chroot.get_selections()
-    
-        #copy scripts dir into the chroot
-        if settings.scriptsdir is not None:
-            dest = chroot.relative("tmp/scripts/")
-            os.mkdir(dest)
-            for file in os.listdir(settings.scriptsdir):
-                if (file.startswith("post_") or file.startswith("pre_")) and os.path.isfile(os.path.join((settings.scriptsdir), file)):
-                    shutil.copy(os.path.join((settings.scriptsdir), file), dest) 
 
         if not install_purge_test(chroot, root_info, selections,
 				  args, packages):




More information about the Piuparts-commits mailing list