prt-auf: report the targets omitted from an install transaction

This commit is contained in:
John McQuah 2023-09-14 05:42:17 -04:00
parent 0c301f6387
commit dff03f9b00

View File

@ -160,9 +160,9 @@ if (($action =~ /^(listinst|listorphans|dependent)/)
} elsif ($action =~ /^(install|sysup)$/) {
my @ok = @{$results[0]}; my %ok_pre = %{$results[1]};
my %ok_post = %{$results[2]}; my @ok_readme = @{$results[3]};
my @not_ok = @{$results[4]}; my $note;
my @not_ok = @{$results[4]}; my @missing = @{$results[5]}; my $note;
if ($opkg{test} eq "yes") {
print "\n$action successful.\n";
print "\n$action successful.\n" unless ((@not_ok) or (@missing));
print "*** prt-auf: test mode end\n\n";
}
if (($opkg{test} eq "no") and (@ok)) {
@ -175,13 +175,17 @@ if (($action =~ /^(listinst|listorphans|dependent)/)
print "\n";
}
if (@ok_readme) {
print "Ports with README files:\n";
print "Ports with README files:\n ";
print join("\n ", @ok_readme); print "\n";
}
if (@not_ok) {
print "Ports with pkgmk/pkgadd failures:\n";
print "Ports with pkgmk/pkgadd failures:\n ";
print join("\n ", @not_ok); print "\n";
}
if (@missing) {
print "Ports not found in the repositories:\n ";
print join("\n ", @missing); print "\n";
}
}
# Done!
@ -750,10 +754,10 @@ sub deporder { # returns a sorted list of packages required.
return @result;
}
sub up_inst { # returns scalar references to five arrays
sub up_inst { # returns scalar references to six arrays
my @requested=@_; my @sortedList; my @targets; my %pdirs; my %builtpkg;
my %mkcmd; my %addcmd; my $rs_cmd; my %logfile; my %pvars; my $status;
my %ok; my %not_ok; my %ok_pre; my %ok_post; my @ok_readme=();
my %ok; my @missing; my %not_ok; my %ok_pre; my %ok_post; my @ok_readme=();
my $PKGMK=$opkg{makecommand}; my $PKGADD=$opkg{addcommand};
my $SH=$opkg{scriptcommand};
@ -766,6 +770,7 @@ sub up_inst { # returns scalar references to five arrays
} else {
@targets = grep { ($V_REPO{$_}) } @requested;
}
@missing = grep { (! $V_REPO{$_}) } @requested;
# omit the ports that appear up to date, unless a rebuild is forced
if ("$opkg{margs} $opkg{aargs}" !~ m/-f/) {
@ -865,7 +870,7 @@ sub up_inst { # returns scalar references to five arrays
}
my @ok = keys %ok; my @not_ok = keys %not_ok;
return \@ok, \%ok_pre, \%ok_post, \@ok_readme, \@not_ok;
return \@ok, \%ok_pre, \%ok_post, \@ok_readme, \@not_ok, \@missing;
}
sub parse_pkgmk_conf {
@ -879,8 +884,9 @@ sub parse_pkgmk_conf {
while (<CF>) { @pkgmkVars = split /:/;
} close (CF);
my $COMPRESSION = ($pkgmkVars[1] eq "") ? "gz" : $pkgmkVars[1];
return $COMPRESSION, $pkgmkVars[0];
my $COMPRESSION = ($pkgmkVars[1]) ? $pkgmkVars[1] : "gz";
my $PKGDIR = ($pkgmkVars[0]) ? $pkgmkVars[0] : "";
return $COMPRESSION, $PKGDIR;
}
sub port_ls {