summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-09-04 14:26:36 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-09-04 14:26:36 +0000
commitf40743c3b188ec0da32fb908390c652a106427e4 (patch)
tree93444c6cf2efa276ce244df5e4dd3dd36505c62a /urpm
parentacf30a3a0f3b9c94c6dc0a011bd4469bb3a0d7b3 (diff)
downloadurpmi-f40743c3b188ec0da32fb908390c652a106427e4.tar
urpmi-f40743c3b188ec0da32fb908390c652a106427e4.tar.gz
urpmi-f40743c3b188ec0da32fb908390c652a106427e4.tar.bz2
urpmi-f40743c3b188ec0da32fb908390c652a106427e4.tar.xz
urpmi-f40743c3b188ec0da32fb908390c652a106427e4.zip
- library:
o modify urpm::download::get_content() to work as non-superuser
Diffstat (limited to 'urpm')
-rw-r--r--urpm/download.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/urpm/download.pm b/urpm/download.pm
index 27f03f98..bd0afd9e 100644
--- a/urpm/download.pm
+++ b/urpm/download.pm
@@ -772,6 +772,9 @@ sub sync {
sub get_content {
my ($urpm, $url) = @_;
+ # ensure $urpm->{cachedir} is writable when non-superuser
+ urpm::userdir($urpm);
+
my $file = "$urpm->{cachedir}/partial/" . basename($url);
unlink $file; # prevent "partial file" errors