summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;
}