cpt

[ARCHIVED] Carbs Packaging Tools
git clone git://git.ckyln.com/~cem/cpt.git
Log | Files | Refs | README | LICENSE

commit 49d382ce9f0693ee8f74165e9efbb8bb292c6434
parent de922d98cc49885762b0ae94e8001771413c855e
Author: Cem Keylan <cem@ckyln.com>
Date:   Wed, 22 Apr 2020 11:28:30 +0300

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.

Diffstat:
Mkiss | 15+++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)

diff --git 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.