summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--urpm/get_pkgs.pm14
2 files changed, 13 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index cedf5c63..4f5033e4 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,8 @@
o deprecate --curl and --wget in favor of --downloader curl
and --downloader --wget
o fix displaying error message when failing to lock (regression in 5.1)
+- urpmi:
+ o --install-src as user now works for remote medium
- urpmf:
o add special code for --files simple case, it makes urpmf 3x faster for
this often used case
diff --git a/urpm/get_pkgs.pm b/urpm/get_pkgs.pm
index 0906ee54..cc8d41af 100644
--- a/urpm/get_pkgs.pm
+++ b/urpm/get_pkgs.pm
@@ -138,15 +138,23 @@ sub download_packages_of_distant_media {
my $partial_dir = "$urpm->{cachedir}/partial";
my $rpms_dir = "$urpm->{cachedir}/rpms";
if (%distant_sources && ! -w $partial_dir) {
- $urpm->{error}(N("sorry, you can't use --install-src to install remote .src.rpm files"));
- exit 1;
+ if (my $userdir = urpm::userdir($urpm)) {
+ $partial_dir = "$userdir/partial";
+ $rpms_dir = "$userdir/rpms";
+ mkdir $download_dir;
+ mkdir $rpms_dir;
+ } else {
+ $urpm->{error}(N("sorry, you can't use --install-src to install remote .src.rpm files"));
+ exit 1;
+ }
}
#- download files from the current medium.
if (%distant_sources) {
$urpm->{log}(N("retrieving rpm files from medium \"%s\"...", $urpm->{media}[$n]{name}));
if (urpm::download::sync($urpm, $urpm->{media}[$n], [ values %distant_sources ],
- quiet => $options{quiet}, resume => $urpm->{options}{resume}, callback => $options{callback})) {
+ dir => $partial_dir, quiet => $options{quiet},
+ resume => $urpm->{options}{resume}, callback => $options{callback})) {
$urpm->{log}(N("...retrieving done"));
} else {
$urpm->{error}(N("...retrieving failed: %s", $@));