[Piuparts-commits] [SCM] piuparts git repository branch, master, updated. 0.47-41-ga9fc1b0
Andreas Beckmann
debian at abeckmann.de
Fri Nov 30 11:20:35 UTC 2012
The following commit has been merged in the master branch:
commit c6395b51d5d233f9b9d51f1012e4bf90a1a6fcbe
Author: Andreas Beckmann <debian at abeckmann.de>
Date: Sat Nov 3 17:41:32 2012 +0100
p: move around install_packages_by_name()
put it next to install_packages() and install_package_files()
Signed-off-by: Andreas Beckmann <debian at abeckmann.de>
diff --git a/piuparts.py b/piuparts.py
index 389fcd7..15238f2 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -1109,6 +1109,23 @@ class Chroot:
remove_files([self.relative(name) for name in tmp_files])
+ def install_packages_by_name(self, packages):
+ if packages:
+ self.run_scripts("pre_install")
+
+ self.run(["apt-cache", "policy"])
+ self.run(["apt-cache", "policy"] + [p.split("=", 1)[0].strip() for p in packages])
+
+ if settings.list_installed_files:
+ pre_info = self.save_meta_data()
+ self.run(["apt-get", "-y", "install"] + packages)
+ self.list_installed_files (pre_info, self.save_meta_data())
+ else:
+ self.run(["apt-get", "-y", "install"] + packages)
+
+ self.run_scripts("post_install")
+
+
def get_selections(self):
"""Get current package selections in a chroot."""
(status, output) = self.run(["dpkg", "--get-selections", "*"])
@@ -1279,22 +1296,6 @@ class Chroot:
f.close()
return vdict
- def install_packages_by_name(self, packages):
- if packages:
- self.run_scripts("pre_install")
-
- self.run(["apt-cache", "policy"])
- self.run(["apt-cache", "policy"] + [p.split("=", 1)[0].strip() for p in packages])
-
- if settings.list_installed_files:
- pre_info = self.save_meta_data()
- self.run(["apt-get", "-y", "install"] + packages)
- self.list_installed_files (pre_info, self.save_meta_data())
- else:
- self.run(["apt-get", "-y", "install"] + packages)
-
- self.run_scripts("post_install")
-
def check_for_no_processes(self):
"""Check there are no processes running inside the chroot."""
--
piuparts git repository
More information about the Piuparts-commits
mailing list