summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/urpm.pm b/urpm.pm
index 8f830013..4690ece8 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -155,6 +155,7 @@ sub init_dir {
$dir;
}
+
sub userdir_prefix {
my ($_urpm) = @_;
'/tmp/.urpmi-';
@@ -176,6 +177,7 @@ sub userdir {
my $dir = ($urpm->{urpmi_root} || '') . userdir_prefix($urpm) . $<;
init_dir($urpm, $dir);
}
+
sub ensure_valid_cachedir {
my ($urpm) = @_;
if (my $dir = userdir($urpm)) {
@@ -183,6 +185,7 @@ sub ensure_valid_cachedir {
}
-w "$urpm->{cachedir}/partial" or $urpm->{fatal}(1, N("Can not download packages into %s", "$urpm->{cachedir}/partial"));
}
+
sub valid_cachedir {
my ($urpm) = @_;
userdir($urpm) || $urpm->{cachedir};