aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2014-11-27 15:22:11 +0100
committerAngelo Naselli <anaselli@linux.it>2014-11-27 15:22:11 +0100
commit358e59fa20d6827dbb156d28acaef2afe035c132 (patch)
treec3ccc6bd31ba33901653580811e09a43d0f7ae39 /lib
parent75e1b32275891e27fd3fd17db003035e9a581015 (diff)
downloadmanatools-358e59fa20d6827dbb156d28acaef2afe035c132.tar
manatools-358e59fa20d6827dbb156d28acaef2afe035c132.tar.gz
manatools-358e59fa20d6827dbb156d28acaef2afe035c132.tar.bz2
manatools-358e59fa20d6827dbb156d28acaef2afe035c132.tar.xz
manatools-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.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/AdminPanel/Rpmdragora/pkg.pm b/lib/AdminPanel/Rpmdragora/pkg.pm
index 380595e9..0a04c7f1 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$/));
} @_;
}