[Piuparts-commits] [SCM] piuparts git repository branch, piatti, updated. 0.48-78-g1d4b0ea

Andreas Beckmann debian at abeckmann.de
Thu Jan 3 15:40:21 UTC 2013


The following commit has been merged in the piatti branch:
commit d83b02f931ec8484c24f96bb2f5f77bfb1fb5661
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Sun Dec 16 22:24:21 2012 +0100

    p: use the testdebs-repo in install_package_files
    
    If available, use the testdebs-repo in install_package_files to install
    the packages via apt-get.
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/piuparts.py b/piuparts.py
index cd7b57e..d0998e3 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -1103,6 +1103,9 @@ class Chroot:
             self.install_packages_by_name(packages, with_scripts=with_scripts)
 
     def install_package_files(self, package_files, packages=None, with_scripts=False):
+        if packages and settings.testdebs_repo:
+            self.install_packages_by_name(packages)
+            return
         if package_files:
             self.copy_files(package_files, "tmp")
             tmp_files = [os.path.basename(a) for a in package_files]
@@ -2117,6 +2120,8 @@ def install_purge_test(chroot, chroot_state, package_files, packages):
     # Install packages into the chroot.
     os.environ["PIUPARTS_PHASE"] = "install"
 
+    chroot.enable_testdebs_repo()
+
     chroot.run_scripts("pre_install")
 
     if settings.warn_on_others or settings.install_purge_install:
@@ -2202,6 +2207,8 @@ def install_purge_test(chroot, chroot_state, package_files, packages):
 
     file_owners = chroot.get_files_owned_by_packages()
 
+    chroot.disable_testdebs_repo()
+
     # Remove all packages from the chroot that weren't there initially.
     chroot.restore_selections(chroot_state["selections"], packages)
 
@@ -2232,6 +2239,8 @@ def install_upgrade_test(chroot, chroot_state, package_files, packages, old_pack
     # Then from the package files.
     os.environ["PIUPARTS_PHASE"] = "upgrade"
 
+    chroot.enable_testdebs_repo()
+
     chroot.install_packages(package_files, packages)
 
     chroot.check_for_no_processes()
@@ -2239,6 +2248,8 @@ def install_upgrade_test(chroot, chroot_state, package_files, packages, old_pack
 
     file_owners = chroot.get_files_owned_by_packages()
 
+    chroot.disable_testdebs_repo()
+
     # Remove all packages from the chroot that weren't there initially.
     chroot.restore_selections(chroot_state["selections"], packages)
 

-- 
piuparts git repository



More information about the Piuparts-commits mailing list