diff options
author | Angelo Naselli <anaselli@linux.it> | 2014-11-27 15:22:11 +0100 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2014-11-27 15:22:11 +0100 |
commit | 358e59fa20d6827dbb156d28acaef2afe035c132 (patch) | |
tree | c3ccc6bd31ba33901653580811e09a43d0f7ae39 /lib | |
parent | 75e1b32275891e27fd3fd17db003035e9a581015 (diff) | |
download | colin-keep-358e59fa20d6827dbb156d28acaef2afe035c132.tar colin-keep-358e59fa20d6827dbb156d28acaef2afe035c132.tar.gz colin-keep-358e59fa20d6827dbb156d28acaef2afe035c132.tar.bz2 colin-keep-358e59fa20d6827dbb156d28acaef2afe035c132.tar.xz colin-keep-358e59fa20d6827dbb156d28acaef2afe035c132.zip |
gpg-pubkey are passed and since they are not packages produce undef
value to pass to cmp
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AdminPanel/Rpmdragora/pkg.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/AdminPanel/Rpmdragora/pkg.pm b/lib/AdminPanel/Rpmdragora/pkg.pm index 380595e..0a04c7f 100644 --- a/lib/AdminPanel/Rpmdragora/pkg.pm +++ b/lib/AdminPanel/Rpmdragora/pkg.pm @@ -53,6 +53,7 @@ use urpm::select; use urpm::main_loop; use urpm::args qw(); use urpm::util; +use Carp; my $loc = AdminPanel::rpmdragora::locale(); @@ -76,7 +77,9 @@ sub sort_packages_biarch { sort { my ($na, $aa) = $a =~ /^(.*-[^-]+-[^-]+)\.([^.-]+)$/; my ($nb, $ab) = $b =~ /^(.*-[^-]+-[^-]+)\.([^.-]+)$/; - $na cmp $nb || ($ab =~ /64$/) <=> ($aa =~ /64$/); + !defined($na) ? + (!defined($nb) ? 0 : 1) : + (!defined($nb) ? -1 : $na cmp $nb || ($ab =~ /64$/) <=> ($aa =~ /64$/)); } @_; } |