prt-auf: eliminated spurious reporting of dependencies that cannot be found in the ports tree

This commit is contained in:
John McQuah 2022-06-14 15:44:34 -04:00
parent 51900bf600
commit 704679107f

View File

@ -212,7 +212,7 @@ sub parse_args {
($action =~ /^(search|dsearch|fsearch|info|readme|path|ls)$/)) {
print "$1 requires an argument.\n"; exit 1;
}
if (($action =~ /^(search|dsearch|fsearch)$/) and ($osearch{regex}==0)) {
if (($action =~ /^(search|dsearch|fsearch|info|readme|path|ls)$/) and ($osearch{regex}==0)) {
$query[0] =~ s/\+/\\\+/g; # plus signs in the pattern must be escaped,
$query[0] =~ s/\./\\\./g; # since the user did not request 'regex'.
$query[0] =~ s/\//\\\//g; # same goes for slash and period.
@ -606,7 +606,7 @@ sub deporder {
sub recurse_deptree {
my $s = shift;
if (! grep /$s$/, @allports) { push @missing, "$s"; return; }
if (! $V_REPO{$s}) { push @missing, "$s"; return; }
my $substitute = who_aliased_to($s);
my $note = ($substitute) ? " (provided by $substitute)" : "";
push @outfile, (${indent}x(1+$height))."$s$note";
@ -681,7 +681,7 @@ sub up_inst { # returns scalar references to five arrays;
$mkcmd{$t} = "echo \"skipped build ($t provided by an alias)\"";
} else {
$mkcmd{$t} = "" if ((port_diff("utd",$t)==0) and !($WANTED{$t}));
$mkcmd{$t} = "" if (($type eq "install") and ($V_INST{$t}) and ($opkg{$t} !~ /-f/));
$mkcmd{$t} = "" if (($V_INST{$t}) and ($type =~ /^(install|depinst)$/) and ($opkg{$t} !~ /-f/));
$mkcmd{$t} = "echo \"skipped build ($t up to date)\"" if ((-f $builtpkg{$t}) and
((-M $builtpkg{$t}) < (-M "$pdirs{$t}/Pkgfile")) and ($opkg{$t} !~ /-f/));
}
@ -689,7 +689,7 @@ sub up_inst { # returns scalar references to five arrays;
if ($mkcmd{$t}) {
if ((-f "$pdirs{$t}/pre-install") and ($opkg{runscripts} eq "yes")) {
system("sh","$pdirs{$t}/pre-install") unless ($opkg{test} eq "yes");
$status{$t} += ( $?>>8 == 0 ) ? "pre-install ok. " : "pre-install failed. ";
$status{$t} .= ( $?>>8 == 0 ) ? "pre-install ok. " : "pre-install failed. ";
}
($opkg{test} eq "no") ? chdir $pdirs{$t} : print "cd $pdirs{$t}\n";
($opkg{test} eq "no") ? system("$mkcmd{$t}") : print "$mkcmd{$t}\n";