From a441548be2953fd682ab72dc3a644ef1567a26a4 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 27 Mar 2012 17:15:17 +0000 Subject: (urpmq --not-available) do not reinvent (slower) ->fullname introduced by cfergeau in 262492 on Oct 21 2009: add --not-available option to urpmq Patch from Pascal Terjan, fixes bug #51418 --- urpmq | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/urpmq b/urpmq index d69d6f3f..bc6abe7e 100755 --- a/urpmq +++ b/urpmq @@ -253,17 +253,13 @@ if ($options{list_aliases}) { } } elsif ($options{not_available}) { my %available; - my $to_string = sub { - my ($p) = @_; - $p->name . '-' . $p->version . '-' . $p->release . '.' . $p->arch - }; foreach my $p (@{$urpm->{depslist}}) { - $available{$to_string->($p)} = 1; + $available{$p->fullname} = 1; } my $db = urpm::db_open_or_die_($urpm); $db->traverse(sub { my ($p) = @_; - my $s = $to_string->($p); + my $s = $p->fullname; # FIXME Use $pkg_to_string if some options are set but default to this format ? # Magical packages like gpg-pubkey do not have arch and we do not want them $available{$s} || !$p->arch || print "$s\n"; -- cgit v1.2.1