summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@mandriva.com>2010-01-15 16:22:17 +0000
committerChristophe Fergeau <cfergeau@mandriva.com>2010-01-15 16:22:17 +0000
commit31b18e675e75fa9e71b317960bc9132b1452a35f (patch)
tree2ddabcd1cdef7006c2901b1685b02310aff40f6e
parentad4d13d7746917b22e89d8848cfcedcffeb64bdf (diff)
downloadurpmi-31b18e675e75fa9e71b317960bc9132b1452a35f.tar
urpmi-31b18e675e75fa9e71b317960bc9132b1452a35f.tar.gz
urpmi-31b18e675e75fa9e71b317960bc9132b1452a35f.tar.bz2
urpmi-31b18e675e75fa9e71b317960bc9132b1452a35f.tar.xz
urpmi-31b18e675e75fa9e71b317960bc9132b1452a35f.zip
don't crash when parsing an invalid media.cfg file in /etc/urpmi/mediacfg.d
-rw-r--r--NEWS2
-rw-r--r--urpm/media.pm2
2 files changed, 3 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 533a58ff..5a5ce824 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- don't crash when parsing an invalid media.cfg file in /etc/urpmi/mediacfg.d
+
Version 6.33 - 12 January 2010
- invalidate mirror list cache when it's an old format (ie one which does not
diff --git a/urpm/media.pm b/urpm/media.pm
index c401eb46..3274b742 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 $_;