diff options
Diffstat (limited to 'draklive')
-rwxr-xr-x | draklive | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -50,9 +50,13 @@ $::verbose = 1; sub clean { my ($build) = @_; - # Make sure no filesystems are mounted in the chroot before cleaning. - umount_all_in_chroot($build); - rm_rf($_) foreach grep { -e $_ } $build->get_builddir, $build->get_system_root; + + if (-e ($build->get_system_root)) { + # Make sure there's nothing left mounted in the chroot. + umount_all_in_chroot($build); + system('sudo rm -rf ' . $build->get_system_root); + } + system('rm -rf ' . $build->get_builddir) if -e ($build->get_builddir); } sub prepare_root { |