diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2006-11-20 14:39:56 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2006-11-20 14:39:56 +0000 |
commit | 5b1af8af3ee6402d07e3eff77ce412db735e2690 (patch) | |
tree | ec62f102c4f3094019e5ae811d3616ad75c9d7d3 /urpm.pm | |
parent | ca59555e1697ecd3aa7e11ee3d182b24ff1c23c6 (diff) | |
download | urpmi-5b1af8af3ee6402d07e3eff77ce412db735e2690.tar urpmi-5b1af8af3ee6402d07e3eff77ce412db735e2690.tar.gz urpmi-5b1af8af3ee6402d07e3eff77ce412db735e2690.tar.bz2 urpmi-5b1af8af3ee6402d07e3eff77ce412db735e2690.tar.xz urpmi-5b1af8af3ee6402d07e3eff77ce412db735e2690.zip |
- remove code handling remote "list" files (we don't support it anymore)
- cleanup
Diffstat (limited to 'urpm.pm')
-rw-r--r-- | urpm.pm | 27 |
1 files changed, 9 insertions, 18 deletions
@@ -2425,18 +2425,9 @@ sub get_source_packages { if (is_valid_medium($medium) && !$medium->{ignore}) { #- always prefer a list file if available. - my $listfile = $medium->{list} ? statedir_list($urpm, $medium) : ''; - if (!$listfile && $medium->{virtual}) { - my $dir = file_from_local_url($medium->{url}); - my $with_hdlist_dir = reduce_pathname($dir . ($medium->{with_hdlist} ? "/$medium->{with_hdlist}" : "/..")); - my $local_list = 'list' . _hdlist_suffix($medium); - $listfile = reduce_pathname("$with_hdlist_dir/../$local_list"); - -s $listfile or $listfile = "$dir/list"; - } - if ($listfile && -r $listfile) { - if (my $fh = $urpm->open_safe('<', $listfile)) { - local $_; - while (<$fh>) { + if ($medium->{list}) { + if (-r statedir_list($urpm, $medium)) { + foreach (cat_(statedir_list($urpm, $medium))) { chomp; if (my ($filename) = m!([^/]*\.rpm)$!) { if (keys(%{$file2fullnames{$filename} || {}}) > 1) { @@ -2458,13 +2449,13 @@ sub get_source_packages { last; } } + } else { + # list file exists but isn't readable + # report error only if no result found, list files are only readable by root + push @list_error, N("unable to access list file of \"%s\", medium ignored", $medium->{name}); + $< and push @list_error, " " . N("(retry as root?)"); + next; } - } elsif ($listfile && -e $listfile) { - # list file exists but isn't readable - # report error only if no result found, list files are only readable by root - push @list_error, N("unable to access list file of \"%s\", medium ignored", $medium->{name}); - $< and push @list_error, " " . N("(retry as root?)"); - next; } if (defined $medium->{url}) { foreach ($medium->{start} .. $medium->{end}) { |