diff options
Diffstat (limited to 'lib/AdminPanel/Rpmdragora/pkg.pm')
-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 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$/)); } @_; } |