kiss: Abort install if file missing in manifest

This commit is contained in:
Dylan Araps 2020-04-22 07:45:58 +03:00
parent e67bb8e6b8
commit 80f50ca20b
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

6
kiss
View File

@ -969,6 +969,12 @@ pkg_install() {
[ -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"
done < "$tar_dir/$pkg_name/$pkg_db/$pkg_name/manifest"
log "$pkg_name" "Checking that all dependencies are installed"; {
[ -f "$tar_dir/$pkg_name/$pkg_db/$pkg_name/depends" ] &&
[ -z "$KISS_FORCE" ] &&