summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-21 17:45:02 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-21 17:45:02 +0000
commit3519a709524f3c8b4ea550838bcb863fe7e4a2c0 (patch)
tree6bfdcea83e14772a16916f79dcb43c753824a579 /urpm
parent871705259637a1b980f74fe118c5a23a0674b283 (diff)
downloadurpmi-3519a709524f3c8b4ea550838bcb863fe7e4a2c0.tar
urpmi-3519a709524f3c8b4ea550838bcb863fe7e4a2c0.tar.gz
urpmi-3519a709524f3c8b4ea550838bcb863fe7e4a2c0.tar.bz2
urpmi-3519a709524f3c8b4ea550838bcb863fe7e4a2c0.tar.xz
urpmi-3519a709524f3c8b4ea550838bcb863fe7e4a2c0.zip
move clean_dir()
Diffstat (limited to 'urpm')
-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 /