From 8188dec2db31904460f235f17bd5208aaa0765a5 Mon Sep 17 00:00:00 2001 From: merakor Date: Wed, 22 Apr 2020 08:28:29 +0000 Subject: kiss: better manifest checking This introduces a few changes in manifest checking. * If KISS_FORCE is specified, we don't check the manifest. * This will show every missing file, and won't die in the first manifest issue. * kiss will announce dependency checking after manifest checking is complete. FossilOrigin-Name: 64ef962649e7b6a4f124fbfc8b7bb45421f440f1d5e3a0a88a01d007bb7ed8e2 --- kiss | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'kiss') diff --git a/kiss b/kiss index 04b3735..e22fd09 100755 --- a/kiss +++ b/kiss @@ -978,16 +978,23 @@ pkg_install() { # Extract the tar-ball to catch any errors before installation begins. decompress "$tar_file" | "$tar" pxf - -C "$tar_dir/$pkg_name" - log "$pkg_name" "Checking that all dependencies are installed" - [ -f "$tar_dir/$pkg_name/$pkg_db/$pkg_name/manifest" ] || die "'${tar_file##*/}' is not a valid KISS package" # Ensure that the tarball's manifest is correct by checking that # each file and directory inside of it actually exists. - while read -r line; do [ -e "$tar_dir/$pkg_name/$line" ] || - die "File $line missing from tarball but mentioned in manifest" + [ -z "$KISS_FORCE" ] && log "$pkg_name" "Checking package manifest" && + while read -r line; do [ -e "$tar_dir/$pkg_name/$line" ] || { + log "File $line missing from tarball but mentioned in manifest" "" "!>" + TARBALL_FAIL=1 + } done < "$tar_dir/$pkg_name/$pkg_db/$pkg_name/manifest" + [ "$TARBALL_FAIL" ] && { + log "You can still install this package by setting KISS_FORCE variable" + die "$pkg_name" "Missing files in manifest" + } + + log "$pkg_name" "Checking that all dependencies are installed" # Make sure that all run-time dependencies are installed prior to # installing the package. -- cgit v1.2.3