summaryrefslogtreecommitdiffstats
path: root/lib/MDV/Distribconf.pm
diff options
context:
space:
mode:
authorOlivier Thauvin <nanardon@mandriva.org>2006-09-08 15:15:24 +0000
committerOlivier Thauvin <nanardon@mandriva.org>2006-09-08 15:15:24 +0000
commit458d423d01de9bfc87696c8351ec06805e3b7807 (patch)
tree898264f1e18d277eb34e4ede30d775d1e63c5993 /lib/MDV/Distribconf.pm
parentbe580d0a3a7776b436e2d850c327cbaf1cd2174f (diff)
downloadperl-MDV-Distribconf-458d423d01de9bfc87696c8351ec06805e3b7807.tar
perl-MDV-Distribconf-458d423d01de9bfc87696c8351ec06805e3b7807.tar.gz
perl-MDV-Distribconf-458d423d01de9bfc87696c8351ec06805e3b7807.tar.bz2
perl-MDV-Distribconf-458d423d01de9bfc87696c8351ec06805e3b7807.tar.xz
perl-MDV-Distribconf-458d423d01de9bfc87696c8351ec06805e3b7807.zip
- add productid management
Diffstat (limited to 'lib/MDV/Distribconf.pm')
-rw-r--r--lib/MDV/Distribconf.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/MDV/Distribconf.pm b/lib/MDV/Distribconf.pm
index 0eb5529..ce37230 100644
--- a/lib/MDV/Distribconf.pm
+++ b/lib/MDV/Distribconf.pm
@@ -440,11 +440,16 @@ sub getvalue {
$default =~ s![/ ]+!_!g;
last;
};
+ /^productid$/ and do {
+ return join(',', map { "$_=" . $distrib->getvalue(undef, $_, '') }
+ qw(vendor distribution type version branch release arch product));
+ };
/^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.id$/ and do { $default = 'product.id'; last };
/^product$/ and do { $default = 'Download'; last };
/^(MD5SUM|depslist.ordered|compss|provides)$/
and do { $default = $_; last };
@@ -467,7 +472,7 @@ sub getpath {
$distrib->mediaexists($media) or return;
$var ||= ""; # Avoid undef value
my $val = $distrib->getvalue($media, $var);
- $var =~ /^(?:root|VERSION|(?:media|info)dir)$/ and return $val;
+ $var =~ /^(?:root|VERSION|product\.id|(?:media|info)dir)$/ and return $val;
my $thispath = $var eq 'path' ? $distrib->{mediadir} : $distrib->{infodir};
if ($distrib->getvalue(undef, 'mediacfg_version') >= 2) {
return $thispath . '/' . $val;