summaryrefslogtreecommitdiffstats
path: root/lib/MDV/Distribconf.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MDV/Distribconf.pm')
-rw-r--r--lib/MDV/Distribconf.pm14
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