summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-09-04 14:19:52 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-09-04 14:19:52 +0000
commit8f410f4fa0080b8c189a075dbadf08a6af72b453 (patch)
treec256b8fbdab8a63b512953f3ea9af7aa9dc58c2a
parent55208824334294d60c0cda65e0f245f8831a6ace (diff)
downloadurpmi-8f410f4fa0080b8c189a075dbadf08a6af72b453.tar
urpmi-8f410f4fa0080b8c189a075dbadf08a6af72b453.tar.gz
urpmi-8f410f4fa0080b8c189a075dbadf08a6af72b453.tar.bz2
urpmi-8f410f4fa0080b8c189a075dbadf08a6af72b453.tar.xz
urpmi-8f410f4fa0080b8c189a075dbadf08a6af72b453.zip
- library:
o modify urpm::download::get_content() to work as non-superuser
-rw-r--r--NEWS2
-rw-r--r--urpm/download.pm2
2 files changed, 3 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index d6c770e0..8da4a56e 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,8 @@
- remove rsync mirrors when calling aria2
- gurpmi, gurpmi2:
o silence perl warnings (ie remove "use warnings")
+- library:
+ o modify urpm::download::get_content() to work as non-superuser
Version 6.7 - 3 September 2008, Pascal "Pixel" Rigaux
diff --git a/urpm/download.pm b/urpm/download.pm
index 696e22cc..e9a37531 100644
--- a/urpm/download.pm
+++ b/urpm/download.pm
@@ -810,7 +810,7 @@ sub sync {
sub get_content {
my ($urpm, $url) = @_;
- my $file = "$urpm->{cachedir}/partial/" . basename($url);
+ my $file = urpm::valid_cachedir($urpm) . '/partial/' . basename($url);
unlink $file; # prevent "partial file" errors
sync_url($urpm, $url, quiet => 1) or return;