summaryrefslogtreecommitdiffstats
path: root/urpm/sys.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm/sys.pm')
-rw-r--r--urpm/sys.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/urpm/sys.pm b/urpm/sys.pm
index 5254fb95..e1d83f20 100644
--- a/urpm/sys.pm
+++ b/urpm/sys.pm
@@ -182,6 +182,14 @@ sub fix_fd_leak() {
}
}
+sub clean_dir {
+ my ($dir) = @_;
+
+ require File::Path;
+ File::Path::rmtree([$dir]);
+ mkdir $dir, 0755;
+}
+
#- lock policy concerning chroot :
# - lock rpm db in chroot
# - lock urpmi db in /