[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.45-63-g397f4e3
Andreas Beckmann
debian at abeckmann.de
Thu Jul 19 17:43:54 UTC 2012
The following commit has been merged in the develop branch:
commit 78356f6060b04226d1fa6a4eed53e57178ccfa1f
Author: Andreas Beckmann <debian at abeckmann.de>
Date: Sun Jul 8 00:07:52 2012 +0200
p: factor out Chroot.install_packages()
Signed-off-by: Andreas Beckmann <debian at abeckmann.de>
diff --git a/piuparts.py b/piuparts.py
index 76131ad..5ad2ce6 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -1071,6 +1071,12 @@ class Chroot:
logging.debug("The package did not modify any file.\n")
+ def install_packages(self, package_files, packages):
+ if package_files:
+ self.install_package_files(package_files, packages)
+ else:
+ self.install_packages_by_name(packages)
+
def install_package_files(self, package_files, packages = None):
if package_files:
self.copy_files(package_files, "tmp")
@@ -2066,17 +2072,11 @@ def install_purge_test(chroot, chroot_state, package_files, packages):
else:
deps_info = None
- if package_files:
- chroot.install_package_files(package_files, packages)
- else:
- chroot.install_packages_by_name(packages)
+ chroot.install_packages(package_files, packages)
if settings.install_remove_install:
chroot.remove_packages(packages)
- if package_files:
- chroot.install_package_files(package_files)
- else:
- chroot.install_packages_by_name(packages)
+ chroot.install_packages(package_files, packages)
chroot.check_for_no_processes()
chroot.check_for_broken_symlinks()
@@ -2111,7 +2111,7 @@ def install_upgrade_test(chroot, chroot_state, package_files, packages, old_pack
# Then from the package files.
os.environ["PIUPARTS_PHASE"] = "upgrade"
- chroot.install_package_files(package_files, packages)
+ chroot.install_packages(package_files, packages)
chroot.check_for_no_processes()
chroot.check_for_broken_symlinks()
@@ -2242,7 +2242,7 @@ def install_and_upgrade_between_distros(package_files, packages_qualified):
if settings.install_remove_install:
chroot.install_packages_by_name(packages)
- chroot.install_package_files(package_files, packages_qualified)
+ chroot.install_packages(package_files, packages_qualified)
chroot.check_for_no_processes()
--
piuparts git repository
More information about the Piuparts-commits
mailing list