add hook scripts at the following locations: * post_install: at the end of install_packages_by_name() (Closes: #628077) * post_upgrade: in the install-upgrade-purge test between upgrade and removal * post_purge: in the "empty distupgrade loop" to cleanup things done by pre_distupgrade/post_distupgrade scripts
Signed-off-by: Andreas Beckmann <[email protected]> --- piuparts.py | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/piuparts.py b/piuparts.py index e1946bf..88be2c5 100644 --- a/piuparts.py +++ b/piuparts.py @@ -976,6 +976,8 @@ class Chroot: 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.""" (status, output) = run(["lsof", "-w", "+D", self.name], ignore_errors=True) @@ -1763,6 +1765,8 @@ def install_upgrade_test(chroot, root_info, selections, package_list, package_na file_owners = chroot.get_files_owned_by_packages() + chroot.run_scripts("post_upgrade") + # Remove all packages from the chroot that weren't there # initially. changes = diff_selections(chroot, selections) @@ -1834,6 +1838,8 @@ def install_and_upgrade_between_distros(filenames, packages): chroot.upgrade_to_distros(settings.debian_distros[1:], []) chroot.run(["apt-get", "clean"]) + chroot.run_scripts("post_purge") + chroot.check_for_no_processes() # set root_info and selections -- tg: (4dfeb8c..) t/feat/yet-more-hooks (depends on: t/style/centralize-scriptsdir-check t/feat/check-broken-symlinks-after-upgrade) -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

