summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpm.pm10
-rw-r--r--urpm/sys.pm8
2 files changed, 9 insertions, 9 deletions
diff --git a/urpm.pm b/urpm.pm
index 1750d9a1..565a9a45 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -79,14 +79,6 @@ sub db_open_or_die {
$db;
}
-sub clean_dir {
- my ($dir) = @_;
-
- require File::Path;
- File::Path::rmtree([$dir]);
- mkdir $dir, 0755;
-}
-
sub remove_obsolete_headers_in_cache {
my ($urpm) = @_;
my %headers;
@@ -492,7 +484,7 @@ sub get_source_packages {
if ($options{clean_all}) {
#- clean download directory, do it here even if this is not the best moment.
- clean_dir("$urpm->{cachedir}/partial");
+ urpm::sys::clean_dir("$urpm->{cachedir}/partial");
}
my ($error, @list_error, @list, %examined);
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 /