prt-auf: notify user about pre- or post-install scripts in test mode

This commit is contained in:
John McQuah 2023-06-26 09:04:06 -04:00
parent 7d6795728d
commit 8b6807d7f8

View File

@ -170,18 +170,17 @@ if (($action =~ /^(listinst|listorphans|dependent)/)
foreach my $k (@ok) {
$note = ($ok_pre{$k}) ? " pre: ok. " : "";
$note .= ($ok_post{$k}) ? " post: ok. " : "";
$note = ( grep /(pre|post):/, $note ) ? "($note)" : "";
print " $k $note\n";
($note) ? print " $k ($note)\n" : print " $k\n";
}
print "\n";
}
if (@ok_readme) {
print "Ports with README files:\n";
print join("\n ", @ok_readme);
print join("\n ", @ok_readme); print "\n";
}
if (@not_ok) {
print "Ports with pkgmk/pkgadd failures:\n";
print join("\n ", @not_ok);
print join("\n ", @not_ok); print "\n";
}
}
@ -804,8 +803,13 @@ sub up_inst { # returns scalar references to five arrays
$mkcmd{$t} = "echo \"skipped build (package already exists)\"";
}
if ($opkg{test} eq "yes") {
print("$t\n") if ($mkcmd{$t} !~ /skipped/);
$ok{$t}=1;
($mkcmd{$t} !~ /skipped/) or next BUILDLOG;
print("$t");
("$opkg{run_scripts} $opkg{pre_install}" !~ /yes/) or
(! -f "$pdirs{$t}/pre-install") or print(" (+pre)");
("$opkg{run_scripts} $opkg{post_install}" !~ /yes/) or
(! -f "$pdirs{$t}/post-install") or print(" (+post)");
print("\n");
next BUILDLOG;
}
if (("$opkg{run_scripts} $opkg{pre_install}" =~ /yes/) and (-f "$altroot$pdirs{$t}/pre-install")) {