prt-auf: revised the lines that modify {} in up_inst()

This commit is contained in:
John McQuah 2022-06-14 07:18:35 -04:00
parent b963030c6b
commit 23d06ec1f0

View File

@ -652,7 +652,7 @@ sub up_inst { # returns scalar references to five arrays;
my @targets=($type eq "grpinst") ? @_ : deporder("quickdep",@_);
# filter out the invalid ports if deporder() didn't do so already
@targets = grep { (join " ", @allports) =~ / $_ / } @targets if ($type eq "grpinst");
@targets = grep { (join " ", @allports) =~ /$_/ } @targets if ($type eq "grpinst");
# exempt any locked ports from an sysup operation
%EXEMPT = map { $_ => 1 } @LOCKED;
@ -667,7 +667,7 @@ sub up_inst { # returns scalar references to five arrays;
my %pdirs; my %builtpkg; my %mkcmd; my %addcmd; my %status;
foreach my $t (@targets) {
$opkg{$t} = $opkg{margs};
$opkg{$t} =~ s/-f// if !(grep /$t/, @requested);
$opkg{$t} =~ s/-f// unless ($WANTED{$t});
$pdirs{$t} = find_port_by_name($t,1,1,0);
$builtpkg{$t} = find_built_pkg($t);
$mkcmd{$t} = "$PKGMK -d $opkg{$t}";
@ -680,10 +680,10 @@ sub up_inst { # returns scalar references to five arrays;
if (who_aliased_to($t)) {
$mkcmd{$t} = "echo \"skipped build ($t provided by an alias)\"";
} else {
$mkcmd{$t} = "" if ((port_diff("utd",$t)==0) and ($opkg{margs} !~ /-f/));
$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} = "echo \"skipped build ($t up to date)\"" if ((-f $builtpkg{$t}) and
((-M $builtpkg{$t}) < (-M "$pdirs{$t}/Pkgfile")));
((-M $builtpkg{$t}) < (-M "$pdirs{$t}/Pkgfile")) and ($opkg{$t} !~ /-f/));
}
if ($mkcmd{$t}) {