pkgmeek: restore the original treatment of missing files in a footprint

This commit is contained in:
John McQuah 2022-06-11 09:23:07 -04:00
parent ad1e299f4a
commit 46231987e1
2 changed files with 5 additions and 4 deletions

View File

@ -417,7 +417,7 @@ cat_manifest() {
}
check_manifest() {
local FILTER CN
local FILTER CN CM
local TRUTH="$PKGMK_ROOT/.$1"; local retval=0; local severity=error;
[ -f "$pkg_dir$package" ] || [ "$1" = "md5sum" ] || \
{ error "$package not found. Cannot check $1."; return "$E_MANIFEST"; }
@ -427,8 +427,9 @@ check_manifest() {
diff -w -t -U 0 <(sort $FILTER "$TRUTH") <(cat_manifest $1 | sort $FILTER) | \
sed '/^@@/d; /^+++/d; /^---/d; s/^+/NEW /g; s/^-/MISSING /g' > ".$1.diff"
if [ -s ".$1.diff" ]; then
CN=$(grep -c ^NEW ".$1.diff")
CN=$(grep -c ^NEW ".$1.diff"); CM=$(grep -c ^MISSING ".$1.diff")
if [ "$1" = "footprint" ]; then
[ "$PKGMK_IGNORE_MISSING" = "no" ] && retval=$CM
[ "$PKGMK_IGNORE_NEW" = "no" ] && retval+=$CN || severity=warning
retval=$(( E_MANIFEST*( retval>0 ) ))
else

View File

@ -454,7 +454,7 @@ sub port_lock {
sub port_unlock {
my %unlocks = map { $_ => "U" } @_;
my @newlocks = grep { ! defined $unlocks{$_} } @LOCKED;
open (LL, $prtlocker."-tmp",">");
open (LL, '>', $prtlocker."-tmp");
foreach my $nl (@newlocks) { print LL "$nl\n" unless $nl =~ /^\s*$/; }
close (LL);
system ("mv",$prtlocker."-tmp",$prtlocker);
@ -712,7 +712,7 @@ sub sysup {
$v_repo = ($V_REPO{$p}) ? $V_REPO{$p} : "MISSING" ;
push @targets, $p if (($v_repo ne $V_INST{$p}) and ($v_repo ne "MISSING"));
}
return up_inst("update",@targets);
return up_inst("sysup",@targets);
}
sub find_built_pkg {