|
@@ -240,7 +240,7 @@ sub get_ports_version {
|
|
|
my $port = shift;
|
|
|
|
|
|
chdir "$port" || return undef;
|
|
|
- my $cmd = 'make show=FULLPKGNAME';
|
|
|
+ my $cmd = 'make show-indexed=FULLPKGNAME';
|
|
|
my $pkgname = '';
|
|
|
|
|
|
open(my $in, "$cmd 2>&1 |")
|
|
@@ -527,12 +527,12 @@ sub find_newer_ports_dir {
|
|
|
foreach my $dir (@port_locations) {
|
|
|
my $port_dir = "$dir/$port";
|
|
|
my $version = get_ports_version($port_dir);
|
|
|
- push @versions, $version;
|
|
|
+ push @versions, $version if $version;
|
|
|
}
|
|
|
|
|
|
my $highest
|
|
|
= reduce { get_higher_version($a, $b) <= 0 ? $a : $b } @versions;
|
|
|
- my $idx = 0;
|
|
|
+ my $idx = 1;
|
|
|
$idx = grep
|
|
|
{ defined($versions[$_])
|
|
|
&& ($versions[$_] eq $highest) ? $_ : -1 } 0..$#versions
|