summaryrefslogtreecommitdiffstats
path: root/urpm/sys.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-12-13 09:54:14 +0000
committerThierry Vignaud <tv@mageia.org>2012-12-13 09:54:14 +0000
commit5b4d5c4d20ed6beb1efac54dc6c03de8df4c4681 (patch)
treefde5c690f954de59c12e2732dde61feb41589e14 /urpm/sys.pm
parentfa37569a1609f93925063b5b8a83d0e2fb16816c (diff)
downloadurpmi-5b4d5c4d20ed6beb1efac54dc6c03de8df4c4681.tar
urpmi-5b4d5c4d20ed6beb1efac54dc6c03de8df4c4681.tar.gz
urpmi-5b4d5c4d20ed6beb1efac54dc6c03de8df4c4681.tar.bz2
urpmi-5b4d5c4d20ed6beb1efac54dc6c03de8df4c4681.tar.xz
urpmi-5b4d5c4d20ed6beb1efac54dc6c03de8df4c4681.zip
simplify using cat_()
Diffstat (limited to 'urpm/sys.pm')
-rw-r--r--urpm/sys.pm4
1 files changed, 1 insertions, 3 deletions
diff --git a/urpm/sys.pm b/urpm/sys.pm
index 231a37c7..42b4c337 100644
--- a/urpm/sys.pm
+++ b/urpm/sys.pm
@@ -31,9 +31,7 @@ typically from the inst.list or skip.list files.
sub get_packages_list {
my ($file, $o_extra) = @_;
my @l = split(/,/, $o_extra || '');
- if ($file && open(my $f, '<', $file)) {
- push @l, <$f>;
- }
+ push @l, cat_($file);
[ grep { $_ } map {
chomp; s/#.*$//; s/^\s*//; s/\s*$//;
$_;