diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-07-03 12:42:09 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-07-03 12:42:09 +0000 |
commit | 7fbbff059f2f37f188165ab61266198e768a6154 (patch) | |
tree | 1400ff55c669422532c162c1c3f2a6f1c171185f /rpm-find-leaves | |
parent | e53f752fe720c1d86806ab07ebc09d0d51b46e1b (diff) | |
download | urpmi-7fbbff059f2f37f188165ab61266198e768a6154.tar urpmi-7fbbff059f2f37f188165ab61266198e768a6154.tar.gz urpmi-7fbbff059f2f37f188165ab61266198e768a6154.tar.bz2 urpmi-7fbbff059f2f37f188165ab61266198e768a6154.tar.xz urpmi-7fbbff059f2f37f188165ab61266198e768a6154.zip |
factorize
Diffstat (limited to 'rpm-find-leaves')
-rw-r--r-- | rpm-find-leaves | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/rpm-find-leaves b/rpm-find-leaves index 12703fca..c1adc351 100644 --- a/rpm-find-leaves +++ b/rpm-find-leaves @@ -44,8 +44,7 @@ while ($_ = shift) { my $discard = $options{restrict_group} && sub { $_[0]->group !~ /\Q$options{group}/oi }; my $leaves = urpm::select::installed_leaves($urpm, $discard); -if ($options{fullname}) { - print "$_\n" foreach sort map { scalar $_->fullname } values %$leaves; -} else { - print "$_\n" foreach sort keys %$leaves; -} +my @l = $options{fullname} ? + map { scalar $_->fullname } values %$leaves : + keys %$leaves; +print "$_\n" foreach sort @l; |