summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-21 12:28:00 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-21 12:28:00 +0000
commitd25dd9828fd0b9eeda8440ee6cbd51c65cec85e9 (patch)
tree2652fd68150ad068b0174374933901d09ec6d00c /urpm.pm
parent76a472a55a8b3ca20d543b87ba9d3e801b2d1a94 (diff)
downloadurpmi-d25dd9828fd0b9eeda8440ee6cbd51c65cec85e9.tar
urpmi-d25dd9828fd0b9eeda8440ee6cbd51c65cec85e9.tar.gz
urpmi-d25dd9828fd0b9eeda8440ee6cbd51c65cec85e9.tar.bz2
urpmi-d25dd9828fd0b9eeda8440ee6cbd51c65cec85e9.tar.xz
urpmi-d25dd9828fd0b9eeda8440ee6cbd51c65cec85e9.zip
restore removing {list} (it was done in _write_rpm_list_if_needed)
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm27
1 files changed, 11 insertions, 16 deletions
diff --git a/urpm.pm b/urpm.pm
index a2c6d16e..d7a0ff03 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -1676,23 +1676,17 @@ sub _read_cachedir_pubkey {
}
}
-sub _write_rpm_list_if_needed {
- my ($urpm, $medium, $rpm_list) = @_;
+sub _write_rpm_list {
+ my ($urpm, $medium) = @_;
- if (@$rpm_list) {
- $medium->{list} ||= "list.$medium->{name}";
+ @{$medium->{rpm_files} || []} or return;
- #- write list file.
- $urpm->{log}(N("writing list file for medium \"%s\"", $medium->{name}));
- my $listfh = $urpm->open_safe('>', cachedir_list($urpm, $medium)) or return;
- print $listfh basename($_), "\n" foreach @$rpm_list;
- } else {
- #- the flag is no longer necessary.
- if ($medium->{list}) {
- unlink statedir_list($urpm, $medium);
- delete $medium->{list};
- }
- }
+ $medium->{list} ||= "list.$medium->{name}";
+
+ #- write list file.
+ $urpm->{log}(N("writing list file for medium \"%s\"", $medium->{name}));
+ my $listfh = $urpm->open_safe('>', cachedir_list($urpm, $medium)) or return;
+ print $listfh basename($_), "\n" foreach @{$medium->{rpm_files}};
1;
}
@@ -1743,7 +1737,7 @@ sub _update_medium_first_pass {
if (!$medium->{virtual}) {
if ($medium->{headers}) {
- _write_rpm_list_if_needed($urpm, $medium, $medium->{rpm_files}) or return;
+ _write_rpm_list($urpm, $medium) or return;
} else {
#- read first pass hdlist or synthesis, try to open as synthesis, if file
#- is larger than 1MB, this is probably an hdlist else a synthesis.
@@ -1769,6 +1763,7 @@ sub _update_medium_first_pass {
}
return;
}
+ delete $medium->{list};
{
my @unresolved_after = grep { ! defined $urpm->{provides}{$_} } keys %{$urpm->{provides} || {}};