summaryrefslogtreecommitdiffstats
path: root/mgaapplet_urpm.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-08-31 16:45:42 +0000
committerThierry Vignaud <tv@mageia.org>2012-08-31 16:45:42 +0000
commit23fbc6fbd353c88c1331b1ae84ca8e968bcfc5ec (patch)
treee82a458de5e8eeebc17284cd8038dc94e29b46e4 /mgaapplet_urpm.pm
parent6af7d70dfb75823e3d442de018eb9ef572f0be0e (diff)
downloadmgaonline-23fbc6fbd353c88c1331b1ae84ca8e968bcfc5ec.tar
mgaonline-23fbc6fbd353c88c1331b1ae84ca8e968bcfc5ec.tar.gz
mgaonline-23fbc6fbd353c88c1331b1ae84ca8e968bcfc5ec.tar.bz2
mgaonline-23fbc6fbd353c88c1331b1ae84ca8e968bcfc5ec.tar.xz
mgaonline-23fbc6fbd353c88c1331b1ae84ca8e968bcfc5ec.zip
do not reinvent urpm::userdir_prefix()
Diffstat (limited to 'mgaapplet_urpm.pm')
-rw-r--r--mgaapplet_urpm.pm6
1 files changed, 1 insertions, 5 deletions
diff --git a/mgaapplet_urpm.pm b/mgaapplet_urpm.pm
index 304f3352..0212e395 100644
--- a/mgaapplet_urpm.pm
+++ b/mgaapplet_urpm.pm
@@ -5,15 +5,11 @@ package mgaapplet_urpm;
use MDK::Common;
use urpm::download;
-sub userdir_prefix {
- my ($_urpm) = @_;
- '/tmp/.urpmi-';
-}
sub userdir {
my ($urpm) = @_;
$< or return;
- my $dir = ($urpm->{urpmi_root} || '') . userdir_prefix($urpm) . $<;
+ my $dir = ($urpm->{urpmi_root} || '') . urpm::userdir_prefix($urpm) . $<;
mkdir $dir, 0755; # try to create it
-d $dir && ! -l $dir or $urpm->{fatal}(1, sprintf("fail to create directory %s", $dir));