summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-02-22 10:30:38 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-02-22 10:30:38 +0000
commitb1a2665d555a370184f3ebb6fa0b1de4c0ac92f0 (patch)
treea7d66c69afc0646b261b0828b9624f657118fefc
parent94812055eb7353778b330e3ac057cb322cdc54b3 (diff)
downloadurpmi-b1a2665d555a370184f3ebb6fa0b1de4c0ac92f0.tar
urpmi-b1a2665d555a370184f3ebb6fa0b1de4c0ac92f0.tar.gz
urpmi-b1a2665d555a370184f3ebb6fa0b1de4c0ac92f0.tar.bz2
urpmi-b1a2665d555a370184f3ebb6fa0b1de4c0ac92f0.tar.xz
urpmi-b1a2665d555a370184f3ebb6fa0b1de4c0ac92f0.zip
- urpmf
o fallback on hdlist when xml-info not found (useful for old distribs)
-rw-r--r--NEWS2
-rwxr-xr-xurpmf9
2 files changed, 9 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index ad1a3609..9c0794b7 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- urpmf
+ o fallback on hdlist when xml-info not found (useful for old distribs)
- urpmi handles /etc/urpmi/media.d/*.cfg
as an alternative to using urpmi.addmedia
- urpmi.update, urpmi.addmedia:
diff --git a/urpmf b/urpmf
index e4e6b815..0132355e 100755
--- a/urpmf
+++ b/urpmf
@@ -300,8 +300,13 @@ if ($needed_media_info{hdlist}) {
}
} elsif (my ($xml_info) = @needed_xml_info) {
foreach $medium (grep { !$_->{ignore} } @{$urpm->{media}}) {
- my $xml_info_file = urpm::media::any_xml_info($urpm, $medium, $xml_info, $options{verbose} < 0) or
- $urpm->{error}(N("no xml-info available for medium \"%s\"", $medium->{name})), next;
+ my $xml_info_file = urpm::media::any_xml_info($urpm, $medium, $xml_info, $options{verbose} < 0);
+ if (!$xml_info_file) {
+ my $hdlist = urpm::media::any_hdlist($urpm, $medium, $options{verbose} < 0) or
+ $urpm->{error}(N("no xml-info available for medium \"%s\"", $medium->{name})), next;
+ $urpm->{log}("getting information from $hdlist");
+ $urpm->parse_hdlist($hdlist, callback => $callback);
+ }
require urpm::xml_info;
require urpm::xml_info_pkg;