summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpm.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/urpm.pm b/urpm.pm
index 5ec416a7..8f830013 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -159,6 +159,15 @@ sub userdir_prefix {
my ($_urpm) = @_;
'/tmp/.urpmi-';
}
+
+sub valid_statedir {
+ my ($urpm) = @_;
+ $< or return;
+
+ my $dir = ($urpm->{urpmi_root} || '') . userdir_prefix($urpm) . $< . "/lib";
+ init_dir($urpm, $dir);
+}
+
sub userdir {
#mdkonline uses userdir because it runs as user
my ($urpm) = @_;