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