Compare commits

...

2 Commits

Author SHA1 Message Date
John McQuah d48fcba47b pkgmeek: do not try to retain xattrs when unpacking 2023-07-02 20:55:33 -04:00
John McQuah 69b9a3dc2b prt-auf: prevent locked ports from affecting the exit status of 'diff'
fix some post-transaction reports
2023-07-02 20:54:41 -04:00
2 changed files with 8 additions and 6 deletions

View File

@ -131,7 +131,7 @@ if [ "$pkg_utd" = 0 ] || [[ "$PKGMK_FORCE $PKGMK_EXTRACT_ONLY" =~ yes ]]; then
here="${_local_[u]}" here="${_local_[u]}"
case "$here" in case "$here" in
*.tar|*.tar.gz|*.tar.Z|*.tgz|*.tar.bz2|*.tbz2|*.tar.xz|*.txz|*.tar.lzma|*.tar.lz|*.7z|*.zip|*.rpm) *.tar|*.tar.gz|*.tar.Z|*.tgz|*.tar.bz2|*.tbz2|*.tar.xz|*.txz|*.tar.lzma|*.tar.lz|*.7z|*.zip|*.rpm)
bsdtar -p -o -C src -xf "$here" || errUZ+=1 ;; bsdtar -p -o --no-xattrs -C src -xf "$here" || errUZ+=1 ;;
*) *)
cp -r -L "$here" src/ ;; cp -r -L "$here" src/ ;;
esac esac

View File

@ -75,8 +75,8 @@ if ($action eq "path") { @results = find_port_by_name($query[0],1,1,0);
} elsif ($action eq "install") { @results = up_inst(@query); } elsif ($action eq "install") { @results = up_inst(@query);
} elsif ($action eq "dup") { $ind=find_dups(@query); } elsif ($action eq "dup") { $ind=find_dups(@query);
} elsif ($action eq "remove") { $ind=uninstall(@query); } elsif ($action eq "remove") { $ind=uninstall(@query);
} elsif ($action =~ /^(isinst|current|sysup)$/) { @results = port_diff($1,@query); } elsif ($action =~ /^(isinst|current|sysup)$/) { ($ind, @results) = port_diff($1,@query);
} elsif ($action =~ /(.*)diff$/) { @results = port_diff($1); } elsif ($action =~ /(.*)diff$/) { ($ind, @results) = port_diff($1);
} elsif ($action =~ /^list(.*)/) { @results = list_ports($1); } elsif ($action =~ /^list(.*)/) { @results = list_ports($1);
} elsif ($action eq "help") { print_help(); } elsif ($action eq "help") { print_help();
} elsif ($action eq "version") { print "$title $version\n"; } elsif ($action eq "version") { print "$title $version\n";
@ -108,10 +108,10 @@ if (($action =~ /^(listinst|listorphans|dependent)/)
foreach my $fileN (@fmatch) { printf $strf, $fh, $fileN; } foreach my $fileN (@fmatch) { printf $strf, $fh, $fileN; }
} }
} elsif ($action =~ /^(current|isinst|dup|diff|quickdiff)$/) { } elsif ($action =~ /^(current|isinst|dup|diff|quickdiff)$/) {
my $format = "%20s %15s %20s\n"; my $ind = shift(@results); my $format = "%20s %15s %20s\n";
if (! @results) { if ($ind == 0) {
($action !~ /diff$/) or print "No differences found\n"; ($action !~ /diff$/) or print "No differences found\n";
exit 0; ($action =~ /^(current|isinst)/) or exit 0;
} elsif ($action eq "diff") { } elsif ($action eq "diff") {
printf $format, "Port", "Installed", "Available in Repo" printf $format, "Port", "Installed", "Available in Repo"
} }
@ -656,9 +656,11 @@ sub port_diff { # find differences between the pkgdb and the repo
if ($dtype !~ /^(current|isinst|utd)/) { if ($dtype !~ /^(current|isinst|utd)/) {
foreach my $p (sort(keys %V_INST)) { foreach my $p (sort(keys %V_INST)) {
if (($V_REPO{$p}) and ($V_REPO{$p} ne $V_INST{$p})) { if (($V_REPO{$p}) and ($V_REPO{$p} ne $V_INST{$p})) {
$retval++ unless ($LOCKED{$p});
($dtype =~ /^(quick|sysup)/) ? push @outfile, "$p" : ($dtype =~ /^(quick|sysup)/) ? push @outfile, "$p" :
push @outfile, "$p $V_INST{$p} $V_REPO{$p}"; push @outfile, "$p $V_INST{$p} $V_REPO{$p}";
} elsif ((! $V_REPO{$p}) and ($dtype !~ /^(quick|sysup)/)) { } elsif ((! $V_REPO{$p}) and ($dtype !~ /^(quick|sysup)/)) {
$retval++;
push @outfile, "$p $V_INST{$p} MISSING"; push @outfile, "$p $V_INST{$p} MISSING";
} }
} }