aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2020-04-22 08:28:29 +0000
committermerakor <cem@ckyln.com>2020-04-22 08:28:29 +0000
commit8188dec2db31904460f235f17bd5208aaa0765a5 (patch)
tree35081d6bded52f6c6f01bc9f5107e62d0b65db81
parent2c6bc47741366f51ad4307780d47b12784526242 (diff)
downloadcpt-8188dec2db31904460f235f17bd5208aaa0765a5.tar.gz
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
-rwxr-xr-xkiss15
1 files changed, 11 insertions, 4 deletions
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.