From 733e2b8c0699e602fc617149a96b61a4e07dce35 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Tue, 1 Aug 2006 09:51:41 +0000 Subject: Nits, copyright, english fixes --- lib/MDV/Distribconf.pm | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'lib/MDV') diff --git a/lib/MDV/Distribconf.pm b/lib/MDV/Distribconf.pm index 70e13a0..e44cc09 100644 --- a/lib/MDV/Distribconf.pm +++ b/lib/MDV/Distribconf.pm @@ -232,7 +232,8 @@ sub loadtree { =head2 check_mediacfg_version($wanted_version) -Check current distrib use this version or lesser, which mean it is supported. +Check that the current distrib uses this version or lesser, which means it is +supported. =cut @@ -393,18 +394,18 @@ sub getvalue { my $default = ""; for ($var) { - /^synthesis$/ and $default = 'synthesis.' . lc($distrib->getvalue($media, 'hdlist')); + /^synthesis$/ and $default = 'synthesis.' . lc($distrib->getvalue($media, 'hdlist')); /^hdlist$/ and $default = 'hdlist_' . lc($distrib->getvalue($media, 'name')) . '.cz'; /^pubkey$/ and $default = 'pubkey_' . lc($distrib->getvalue($media, 'name')); /^name$/ and $default = $media; $default =~ s![/ ]+!_!g; - /^path$/ and return $media; - /^root$/ and return $distrib->{root}; - /^mediacfg_version$/ and do { $default = '1'; last }; - /^VERSION$/ and do { $default = 'VERSION'; last }; - /^product$/ and do { $default = 'Download'; last }; - /^(?:tag|branch)$/ and do { $default = ''; last }; - /^(?:media|info)dir$/ and do { $default = $distrib->{$var}; last }; + /^path$/ and return $media; + /^root$/ and return $distrib->{root}; + /^mediacfg_version$/ and do { $default = '1'; last }; + /^VERSION$/ and do { $default = 'VERSION'; last }; + /^product$/ and do { $default = 'Download'; last }; + /^(?:tag|branch)$/ and do { $default = ''; last }; + /^(?:media|info)dir$/ and do { $default = $distrib->{$var}; last }; } return $distrib->{cfg}->val($media, $var, $default); } @@ -426,7 +427,7 @@ sub getpath { if ($distrib->getvalue(undef, 'mediacfg_version') >= 2) { return $thispath . ($media ? '/' . $val : ''); } else { - return ($val =~ m!/! ? "" : + return ($val =~ m!/! ? "" : ($var eq 'path' ? $distrib->{mediadir} : $distrib->{infodir} ) . "/") . $val; } @@ -460,7 +461,7 @@ The code has been written by Olivier Thauvin and is currently maintained by Rafael Garcia-Suarez . Thanks to Sylvie Terjan for the spell checking. -(c) 2005 Olivier Thauvin ; (c) 2005 Mandriva Linux +(c) 2005 Olivier Thauvin ; (c) 2005, 2006 Mandriva This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -- cgit v1.2.1