summaryrefslogtreecommitdiffstats
path: root/urpm/get_pkgs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-09-04 13:50:09 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-09-04 13:50:09 +0000
commit542aa55f7bee301752370c9a51e9af2490c6a781 (patch)
tree88328b2baa70d17d4f901996f3b6efa942ef7b40 /urpm/get_pkgs.pm
parentee0d94725b20dcf88950a2af0527db8e23aad5f5 (diff)
downloadurpmi-542aa55f7bee301752370c9a51e9af2490c6a781.tar
urpmi-542aa55f7bee301752370c9a51e9af2490c6a781.tar.gz
urpmi-542aa55f7bee301752370c9a51e9af2490c6a781.tar.bz2
urpmi-542aa55f7bee301752370c9a51e9af2490c6a781.tar.xz
urpmi-542aa55f7bee301752370c9a51e9af2490c6a781.zip
simplify: always create "partial" and "rpms" in "userdir", that way we can use
userdir() in most cases
Diffstat (limited to 'urpm/get_pkgs.pm')
-rw-r--r--urpm/get_pkgs.pm9
1 files changed, 2 insertions, 7 deletions
diff --git a/urpm/get_pkgs.pm b/urpm/get_pkgs.pm
index 82bccb01..b0545107 100644
--- a/urpm/get_pkgs.pm
+++ b/urpm/get_pkgs.pm
@@ -210,13 +210,8 @@ sub _download_packages_of_distant_media {
my $cachedir = $urpm->{cachedir};
if (! -w "$cachedir/partial") {
- if (my $userdir = urpm::userdir($urpm)) {
- $cachedir = $userdir;
- mkdir "$cachedir/partial";
- mkdir "$cachedir/rpms";
- } else {
- $urpm->{fatal}(1, N("Can not download packages into %s", "$cachedir/partial"));
- }
+ $cachedir = urpm::userdir($urpm)
+ or $urpm->{fatal}(1, N("Can not download packages into %s", "$cachedir/partial"));
}
$urpm->{log}(N("retrieving rpm files from medium \"%s\"...", $blist->{medium}{name}));