my $pkg_name = (File::Spec->splitdir($pkg_dir))[-1];
my $last = reduce { $a->[1] > $b->[1] ? $a : $b }
- map [ $_, CPANPLUS::Dist::Gentoo::Atom->new_from_ebuild($_) ],
- glob File::Spec->catfile($pkg_dir, "$pkg_name-*");
+ grep $_->[1] != 9999,
+ map [ $_, CPANPLUS::Dist::Gentoo::Atom->new_from_ebuild($_) ],
+ glob File::Spec->catfile($pkg_dir, "$pkg_name-*");
my ($ebuild, $atom) = @$last;
p(1, "%s/%s-%s\n", map $atom->$_, qw<category name version>);