diff options
author | Olivier Thauvin <nanardon@mandriva.org> | 2006-08-24 16:08:01 +0000 |
---|---|---|
committer | Olivier Thauvin <nanardon@mandriva.org> | 2006-08-24 16:08:01 +0000 |
commit | 071b220b11859f11db8f51428ef906af5c17287f (patch) | |
tree | 231b935553bffb953aeecea23dfbeda4416663ca /lib/MDV/Distribconf.pm | |
parent | 57410a78de825ad8f1d45a4a7a86735c1f72ce7d (diff) | |
download | perl-MDV-Distribconf-071b220b11859f11db8f51428ef906af5c17287f.tar perl-MDV-Distribconf-071b220b11859f11db8f51428ef906af5c17287f.tar.gz perl-MDV-Distribconf-071b220b11859f11db8f51428ef906af5c17287f.tar.bz2 perl-MDV-Distribconf-071b220b11859f11db8f51428ef906af5c17287f.tar.xz perl-MDV-Distribconf-071b220b11859f11db8f51428ef906af5c17287f.zip |
- more know variables
- improve doc
- minor fixes
Diffstat (limited to 'lib/MDV/Distribconf.pm')
-rw-r--r-- | lib/MDV/Distribconf.pm | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/MDV/Distribconf.pm b/lib/MDV/Distribconf.pm index 4111f98..e417cf6 100644 --- a/lib/MDV/Distribconf.pm +++ b/lib/MDV/Distribconf.pm @@ -434,15 +434,19 @@ sub getvalue { /^synthesis$/ and $default = 'synthesis.' . lc($distrib->getvalue($media, 'hdlist', $level)); /^hdlist$/ and $default = 'hdlist_' . lc($distrib->getvalue($media, 'name', $level)) . '.cz'; /^pubkey$/ and $default = 'pubkey_' . lc($distrib->getvalue($media, 'name', $level)); - /^name$/ and $default = $media; - $default =~ s![/ ]+!_!g; + /^name$/ and do { + $default = $media; + $default =~ s![/ ]+!_!g; + last; + }; /^path$/ and return $media; /^root$/ and return $distrib->{root}; /^mediacfg_version$/ and return $distrib->{cfg}->val('media_info', 'mediacfg_version') || 1; /^VERSION$/ and do { $default = 'VERSION'; last }; /^product$/ and do { $default = 'Download'; last }; - /^MD5SUM$/ and do { $default = 'MD5SUM'; last }; + /^(MD5SUM|depslist.ordered|compss|provides)$/ + and do { $default = $_; last }; /^(?:tag|branch)$/ and do { $default = ''; last }; /^(?:media|info)dir$/ and do { $default = $distrib->{$var}; last }; } @@ -465,7 +469,7 @@ sub getpath { $var =~ /^(?:root|VERSION)$/ and return $val; my $thispath = $var eq 'path' ? $distrib->{mediadir} : $distrib->{infodir}; if ($distrib->getvalue(undef, 'mediacfg_version') >= 2) { - return $thispath . ($media ? '/' . $val : ''); + return $thispath . '/' . $val; } else { return ($val =~ m!/! ? "" : ($var eq 'path' ? $distrib->{mediadir} : $distrib->{infodir} ) @@ -540,6 +544,8 @@ The code has been written by Olivier Thauvin <nanardon@mandriva.org> and is currently maintained by Rafael Garcia-Suarez <rgarciasuarez@mandriva.com>. Thanks to Sylvie Terjan <erinmargault@mandriva.org> for the spell checking. +=head1 LICENSE AND COPYRIGHT + (c) 2005 Olivier Thauvin ; (c) 2005, 2006 Mandriva This program is free software; you can redistribute it and/or modify |