diff options
Diffstat (limited to 'drakclassic')
-rwxr-xr-x | drakclassic | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drakclassic b/drakclassic index da1f875..e120402 100755 --- a/drakclassic +++ b/drakclassic @@ -51,7 +51,13 @@ $::force = 0; sub clean { my ($build) = @_; - rm_rf($_) foreach grep { -e $_ } $build->get_builddir, $build->get_system_root; + + if (-e ($build->get_system_root)) { + # There shouldn't be anything mounted in the chroot, but play it safe... + umount_all_in_chroot($build); + system('sudo rm -rf ' . $build->get_system_root); + } + system('rm -rf ' . $build->get_builddir) if -e ($build->get_builddir); } ############################################################################### |