summaryrefslogtreecommitdiffstats
path: root/lib/MDV
diff options
context:
space:
mode:
authorOlivier Thauvin <nanardon@mandriva.org>2007-07-03 16:43:17 +0000
committerOlivier Thauvin <nanardon@mandriva.org>2007-07-03 16:43:17 +0000
commit6c18325266f5a1a03562e78f2e3205dafcaa82f3 (patch)
treed93105ef8c7b979f3d9ea76081d6e612bbbe6188 /lib/MDV
parentafaa62c002f0d00118e34ef3605f3ce0ecd38ff1 (diff)
downloadperl-MDV-Distribconf-6c18325266f5a1a03562e78f2e3205dafcaa82f3.tar
perl-MDV-Distribconf-6c18325266f5a1a03562e78f2e3205dafcaa82f3.tar.gz
perl-MDV-Distribconf-6c18325266f5a1a03562e78f2e3205dafcaa82f3.tar.bz2
perl-MDV-Distribconf-6c18325266f5a1a03562e78f2e3205dafcaa82f3.tar.xz
perl-MDV-Distribconf-6c18325266f5a1a03562e78f2e3205dafcaa82f3.zip
- arch and platform return undef if arch is unspecified
Diffstat (limited to 'lib/MDV')
-rw-r--r--lib/MDV/Distribconf.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/MDV/Distribconf.pm b/lib/MDV/Distribconf.pm
index cc9d201..cd987b2 100644
--- a/lib/MDV/Distribconf.pm
+++ b/lib/MDV/Distribconf.pm
@@ -463,14 +463,15 @@ sub getvalue {
/^os$/ and do { $default = 'linux'; last; };
/^gnu$/ and do { $default = 1; last; };
/^vendor$/ and do { $default = $distrib->{type}; last; };
- /^arch$/ and do { $default = `/bin/arch`; chomp($default); last; };
+ /^arch$/ and do { $default = undef; last; };
/^platform$/ and do {
- $default = sprintf('%s-%s-%s%s',
- $distrib->getvalue($media, 'arch'),
+ my $arch = $distrib->getvalue($media, 'arch');
+ $default = defined($arch) ? sprintf('%s-%s-%s%s',
+ $arch,
$distrib->getvalue($media, 'vendor'),
$distrib->getvalue($media, 'os'),
$distrib->getvalue($media, 'gnu') ? '-gnu' : '',
- );
+ ) : undef;
last;
};
}