diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-09-04 14:17:16 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-09-04 14:17:16 +0000 |
commit | 55208824334294d60c0cda65e0f245f8831a6ace (patch) | |
tree | 6298d63e9d6b328f745ba59348030d40fd8f2b1a /urpm/get_pkgs.pm | |
parent | 542aa55f7bee301752370c9a51e9af2490c6a781 (diff) | |
download | urpmi-55208824334294d60c0cda65e0f245f8831a6ace.tar urpmi-55208824334294d60c0cda65e0f245f8831a6ace.tar.gz urpmi-55208824334294d60c0cda65e0f245f8831a6ace.tar.bz2 urpmi-55208824334294d60c0cda65e0f245f8831a6ace.tar.xz urpmi-55208824334294d60c0cda65e0f245f8831a6ace.zip |
much nicer userdir() functions:
- userdir() does not modify $urpm->{cachedir} anymore,
if you must ensure $urpm->{cachedir} to be modified, use
ensure_valid_cachedir()
- valid_cachedir() gives you a valid cachedir (works for root or simple-user),
but does not modify $urpm->{cachedir}
Diffstat (limited to 'urpm/get_pkgs.pm')
-rw-r--r-- | urpm/get_pkgs.pm | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/urpm/get_pkgs.pm b/urpm/get_pkgs.pm index b0545107..65521ac4 100644 --- a/urpm/get_pkgs.pm +++ b/urpm/get_pkgs.pm @@ -208,11 +208,7 @@ sub download_packages_of_distant_media { sub _download_packages_of_distant_media { my ($urpm, $sources, $errors, $blist, %options) = @_; - my $cachedir = $urpm->{cachedir}; - if (! -w "$cachedir/partial") { - $cachedir = urpm::userdir($urpm) - or $urpm->{fatal}(1, N("Can not download packages into %s", "$cachedir/partial")); - } + my $cachedir = urpm::valid_cachedir($urpm); $urpm->{log}(N("retrieving rpm files from medium \"%s\"...", $blist->{medium}{name})); if (urpm::download::sync_rel($urpm, $blist->{medium}, [ urpm::blist_to_filenames($blist) ], |