diff options
author | Olivier Thauvin <nanardon@mandriva.org> | 2005-02-21 12:47:34 +0000 |
---|---|---|
committer | Olivier Thauvin <nanardon@mandriva.org> | 2005-02-21 12:47:34 +0000 |
commit | 98b9d42e9d9137b2308ea16de070b9d54b7a2591 (patch) | |
tree | 0b707ecab6824f7c486b6a2d2819fcc94f6c5eae /Distribconf.pm | |
parent | a1b3db1bff0249625b4a237637f82c7573e162fd (diff) | |
download | rpmtools-98b9d42e9d9137b2308ea16de070b9d54b7a2591.tar rpmtools-98b9d42e9d9137b2308ea16de070b9d54b7a2591.tar.gz rpmtools-98b9d42e9d9137b2308ea16de070b9d54b7a2591.tar.bz2 rpmtools-98b9d42e9d9137b2308ea16de070b9d54b7a2591.tar.xz rpmtools-98b9d42e9d9137b2308ea16de070b9d54b7a2591.zip |
- avoid error message about non existing media.cfg
Diffstat (limited to 'Distribconf.pm')
-rw-r--r-- | Distribconf.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Distribconf.pm b/Distribconf.pm index 1918195..b7e8884 100644 --- a/Distribconf.pm +++ b/Distribconf.pm @@ -323,7 +323,9 @@ Return 1 on success, 0 if media.cfg can't be found or is invalid. sub parse_mediacfg { my ($distrib, $mediacfg) = @_; $mediacfg ||= "$distrib->{root}/$distrib->{infodir}/media.cfg"; - ($distrib->{cfg} = new Config::IniFiles( -file => $mediacfg, -default => 'media_info', -allowcontinue => 1)) or return 0; + (-f $mediacfg && -r _) && + ($distrib->{cfg} = new Config::IniFiles( -file => $mediacfg, -default => 'media_info', -allowcontinue => 1)) + or return 0; return 1; } @@ -441,6 +443,9 @@ Thanks to Sylvie Terjan <erinmargault@mandrake.org> for the spell checking. =head1 ChangeLog $Log$ + Revision 1.2 2005/02/21 12:47:34 othauvin + - avoid error message about non existing media.cfg + Revision 1.1 2005/02/20 21:15:50 othauvin - initials release for managing mandrakelinux distro tree |