summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-03-31 09:10:48 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-03-31 09:10:48 +0000
commit06aed9d8492765d14ee2a9972aba749547cd1671 (patch)
tree9149bfdd17f037dbf145a0d5bcf025bd1340fb9b
parent68f329029d6b5968cf743f183f3794caf66eeda6 (diff)
downloadurpmi-06aed9d8492765d14ee2a9972aba749547cd1671.tar
urpmi-06aed9d8492765d14ee2a9972aba749547cd1671.tar.gz
urpmi-06aed9d8492765d14ee2a9972aba749547cd1671.tar.bz2
urpmi-06aed9d8492765d14ee2a9972aba749547cd1671.tar.xz
urpmi-06aed9d8492765d14ee2a9972aba749547cd1671.zip
- urpmi.addmedia, urpmi.update:
o correctly handle media with no xml-info when using "xml-info: always" (#39521)
-rw-r--r--NEWS4
-rw-r--r--urpm/media.pm5
2 files changed, 7 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index e04ffc4b..b31a5132 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+- urpmi.addmedia, urpmi.update:
+ o correctly handle media with no xml-info when using "xml-info: always"
+ (#39521)
+
Version 5.17 - 28 March 2008, by Pascal "Pixel" Rigaux
- urpmi:
diff --git a/urpm/media.pm b/urpm/media.pm
index 950a5a56..553edb19 100644
--- a/urpm/media.pm
+++ b/urpm/media.pm
@@ -1632,9 +1632,10 @@ sub _retrieve_xml_media_info_or_remove {
foreach my $xml_info (@xml_media_info) {
my $f = statedir_xml_info($urpm, $medium, $xml_info);
- if (urpm::is_cdrom_url($medium->{url}) ||
+ my $get_it = urpm::is_cdrom_url($medium->{url}) ||
get_medium_option($urpm, $medium, 'xml-info') eq 'always' ||
- get_medium_option($urpm, $medium, 'xml-info') eq 'update-only' && -e $f) {
+ get_medium_option($urpm, $medium, 'xml-info') eq 'update-only' && -e $f;
+ if ($get_it && _maybe_in_statedir_MD5SUM($urpm, $medium, "$xml_info.xml.lzma")) {
$ok &&= _retrieve_media_info_file_and_check_MD5SUM($urpm, $medium, $xml_info, '.xml.lzma', $quiet);
$ok = 1 if urpm::is_cdrom_url($medium->{url});
} else {