diff options
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | lib/Iurt/Chroot.pm | 8 |
2 files changed, 4 insertions, 5 deletions
@@ -1,4 +1,5 @@ - ulri: ignore failures when cancelling build +- iurt: kill processes before unmounting in clean_chroot 0.7.7 - ulri: only use mandatory archs for noarch builds diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm index 480fae4..1427aa3 100644 --- a/lib/Iurt/Chroot.pm +++ b/lib/Iurt/Chroot.pm @@ -33,6 +33,8 @@ sub clean_chroot { plog('DEBUG', "clean chroot"); if (-d $chroot) { + # This also kills any process in the associated namespace + sudo($config, '--netns_delete', $chroot); _clean_mounts($run, $config, $chroot); # Do not run rm if there is something still mounted there @@ -230,7 +232,7 @@ sub clean_all_chroot_tmp { } foreach (readdir($dir)) { /$prefix/ or next; - delete_chroot($run, $config, "$chroot_dir/$_"); + clean_chroot($run, $config, "$chroot_dir/$_"); } closedir $dir; } @@ -238,10 +240,6 @@ sub clean_all_chroot_tmp { sub delete_chroot { my ($run, $config, $chroot) = @_; - # This also kills any process in the associated namespace - sudo($config, '--netns_delete', $chroot); - _clean_mounts($run, $config, $chroot); - plog(1, "cleaning $chroot"); # Needs to be added to iurt_root_command # system("$sudo /sbin/fuser -k $chroot &> /dev/null"); |