summaryrefslogtreecommitdiffstats
path: root/drakclassic
diff options
context:
space:
mode:
Diffstat (limited to 'drakclassic')
-rwxr-xr-xdrakclassic8
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);
}
###############################################################################