summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@mandriva.com>2010-05-11 13:17:22 +0000
committerChristophe Fergeau <cfergeau@mandriva.com>2010-05-11 13:17:22 +0000
commitca61e99e923d25fbe663f31f8beab1bded0b4963 (patch)
tree38c40135667948ce2df09a8faaa26e0fddf97966
parentad6115d26f004934c688b46f99306e977cc05232 (diff)
downloadurpmi-ca61e99e923d25fbe663f31f8beab1bded0b4963.tar
urpmi-ca61e99e923d25fbe663f31f8beab1bded0b4963.tar.gz
urpmi-ca61e99e923d25fbe663f31f8beab1bded0b4963.tar.bz2
urpmi-ca61e99e923d25fbe663f31f8beab1bded0b4963.tar.xz
urpmi-ca61e99e923d25fbe663f31f8beab1bded0b4963.zip
don't crash when parsing an invalid media.cfg file in /etc/urpmi/mediacfg.d
-rw-r--r--NEWS1
-rw-r--r--urpm/media.pm2
2 files changed, 2 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index acd9e5aa..14eb0674 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,5 @@
- fix bash completion script (#55716)
+- don't crash when parsing an invalid media.cfg file in /etc/urpmi/mediacfg.d
- invalidate mirror list cache when it's an old format (ie one which does not
store the time of product.id)
- fix urpmq --sources documentation (in --help)
diff --git a/urpm/media.pm b/urpm/media.pm
index 8bfde15c..e66330b8 100644
--- a/urpm/media.pm
+++ b/urpm/media.pm
@@ -170,7 +170,7 @@ sub _read_config__read_media_info {
my $media_cfg = $media_dir . '/media.cfg';
my $distribconf = MDV::Distribconf->new($media_cfg, undef) or next;
$distribconf->settree('mandriva');
- $distribconf->parse_mediacfg($media_cfg);
+ $distribconf->parse_mediacfg($media_cfg) or next;
if (open(my $URLS, '<', $media_dir . '/url')) {
local $_;