summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-20 08:14:39 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-20 08:14:39 +0000
commit5e8753af0162511e3644aee280d0ae386faa704d (patch)
tree50bd99abba6c19c23960c850a1a3978ee1d43f76 /urpm
parent3969a95b35236b58bf3a068739483740a47d0c7b (diff)
downloadurpmi-5e8753af0162511e3644aee280d0ae386faa704d.tar
urpmi-5e8753af0162511e3644aee280d0ae386faa704d.tar.gz
urpmi-5e8753af0162511e3644aee280d0ae386faa704d.tar.bz2
urpmi-5e8753af0162511e3644aee280d0ae386faa704d.tar.xz
urpmi-5e8753af0162511e3644aee280d0ae386faa704d.zip
simplify
Diffstat (limited to 'urpm')
-rw-r--r--urpm/cfg.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/urpm/cfg.pm b/urpm/cfg.pm
index 06f3c7ef..43826eb4 100644
--- a/urpm/cfg.pm
+++ b/urpm/cfg.pm
@@ -51,11 +51,10 @@ Returns 1 on success, 0 on failure.
my ($arch, $release);
sub _init_arch_release () {
if (!$arch && !$release) {
- open my $f, '/etc/release' or return undef;
- my $l = <$f>;
- close $f;
+ my $l = cat_('/etc/release') or return undef;
($release, $arch) = $l =~ /release (\d+\.\d+).*for (\w+)/;
$release = 'cooker' if $l =~ /cooker/i;
+ warn "$arch $release\n";
}
1;
}