diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-10-11 15:49:57 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-10-11 15:49:57 +0000 |
commit | 3c45eb4fc32b4c7c92465b3d1d64aa593af65600 (patch) | |
tree | 671a57bbf3f503b2b7a321d5be8f70e1849f420a /urpm.pm | |
parent | bf13bd767bcf38fd60ab7fc43420cae35d6b0897 (diff) | |
download | urpmi-3c45eb4fc32b4c7c92465b3d1d64aa593af65600.tar urpmi-3c45eb4fc32b4c7c92465b3d1d64aa593af65600.tar.gz urpmi-3c45eb4fc32b4c7c92465b3d1d64aa593af65600.tar.bz2 urpmi-3c45eb4fc32b4c7c92465b3d1d64aa593af65600.tar.xz urpmi-3c45eb4fc32b4c7c92465b3d1d64aa593af65600.zip |
(valid_statedir) introduce it
similar to valid_cachedir, so that urpm[fq] --use-distrib works
as user
Diffstat (limited to 'urpm.pm')
-rw-r--r-- | urpm.pm | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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) = @_; |