From f40743c3b188ec0da32fb908390c652a106427e4 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 4 Sep 2008 14:26:36 +0000 Subject: - library: o modify urpm::download::get_content() to work as non-superuser --- NEWS | 3 +++ urpm/download.pm | 3 +++ 2 files changed, 6 insertions(+) diff --git a/NEWS b/NEWS index 86ef669b..a57c25ca 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +- library: + o modify urpm::download::get_content() to work as non-superuser + Version 5.19.1 - 18 August 2008, by Pascal "Pixel" Rigaux - gurpmi 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 -- cgit v1.2.1