summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-21 09:40:46 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-21 09:40:46 +0000
commitfab258f403d9fe9f5e5b9300ae7205921e67edcd (patch)
treed8576b4a50c2f2c6dfdacc78a90913b07c7950e2 /urpm.pm
parent0396e57b9d6e88dcfa54d696beec68fd506020ef (diff)
downloadurpmi-fab258f403d9fe9f5e5b9300ae7205921e67edcd.tar
urpmi-fab258f403d9fe9f5e5b9300ae7205921e67edcd.tar.gz
urpmi-fab258f403d9fe9f5e5b9300ae7205921e67edcd.tar.bz2
urpmi-fab258f403d9fe9f5e5b9300ae7205921e67edcd.tar.xz
urpmi-fab258f403d9fe9f5e5b9300ae7205921e67edcd.zip
separate what is dependent on $second_pass and what is not
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm26
1 files changed, 14 insertions, 12 deletions
diff --git a/urpm.pm b/urpm.pm
index 1231089e..a43cea18 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -1816,18 +1816,13 @@ sub _update_medium_second_pass {
$callback and $callback->('parse', $medium->{name});
#- a modified medium is an invalid medium, we have to read back the previous hdlist
#- or synthesis which has not been modified by first pass above.
- if ($medium->{headers} && !$medium->{modified}) {
- if ($second_pass) {
+ if ($second_pass) {
+ if ($medium->{headers} && !$medium->{modified}) {
$urpm->{log}(N("reading headers from medium \"%s\"", $medium->{name}));
($medium->{start}, $medium->{end}) = $urpm->parse_headers(dir => "$urpm->{cachedir}/headers",
headers => $medium->{headers},
);
- }
- _build_hdlist_using_rpm_headers($urpm, $medium);
- #- synthesis needs to be created, since the medium has been built from rpm files.
- _build_synthesis($urpm, $medium);
- } elsif ($medium->{synthesis}) {
- if ($second_pass) {
+ } elsif ($medium->{synthesis}) {
if ($medium->{virtual}) {
if (file_from_file_url($medium->{url})) {
_parse_synthesis($urpm, $medium, hdlist_or_synthesis_for_virtual_medium($medium));
@@ -1835,13 +1830,20 @@ sub _update_medium_second_pass {
} else {
_parse_synthesis($urpm, $medium, statedir_synthesis($urpm, $medium));
}
- }
- } else {
- if ($second_pass) {
+ } else {
_parse_hdlist($urpm, $medium, statedir_hdlist($urpm, $medium));
+ $medium->{must_build_synthesis} ||= 1;
}
+ }
+
+ if ($medium->{headers} && !$medium->{modified}) {
+ _build_hdlist_using_rpm_headers($urpm, $medium);
+ #- synthesis needs to be created, since the medium has been built from rpm files.
+ _build_synthesis($urpm, $medium);
+ } elsif ($medium->{synthesis}) {
+ } else {
#- check if the synthesis file can be built.
- if (($second_pass || $medium->{must_build_synthesis}) && !$medium->{modified} && !$medium->{virtual}) {
+ if ($medium->{must_build_synthesis} && !$medium->{modified} && !$medium->{virtual}) {
_build_synthesis($urpm, $medium);
}
}