summaryrefslogtreecommitdiffstats
path: root/rpm-find-leaves
diff options
context:
space:
mode:
Diffstat (limited to 'rpm-find-leaves')
-rw-r--r--rpm-find-leaves9
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;