mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-12-24 08:00:05 -07:00
kiss: Stop showing Git repositories in checksums
This is a backwards compatible change. The package manager will for the time being /ignore/ checksums lines containing Git repositories. These aren't checksums and have no business living in the checksums file. This file is now strictly for checksums. In the coming months, this special handling will be lifted.
This commit is contained in:
parent
99f61fc340
commit
d6917d5fe1
14
kiss
14
kiss
@ -715,14 +715,10 @@ pkg_checksums() {
|
||||
[ -f "$repo_dir/sources" ] || return 0
|
||||
|
||||
while read -r src _ || [ "$src" ]; do
|
||||
# Skip comments and blank lines.
|
||||
if [ -z "${src##\#*}" ]; then
|
||||
# Skip comments, blank lines and git sources.
|
||||
if [ -z "${src##\#*}" ] || [ -z "${src##git+*}" ]; then
|
||||
:
|
||||
|
||||
# Git source.
|
||||
elif [ -z "${src##git+*}" ]; then
|
||||
printf '%s\n' "$src" # This should probably be ':'.
|
||||
|
||||
# Remote source.
|
||||
elif [ -z "${src##*://*}" ]; then
|
||||
sh256 "$src_dir/$1/${src##*/}"
|
||||
@ -745,14 +741,14 @@ pkg_checksums() {
|
||||
pkg_verify() {
|
||||
# Verify all package checksums. This is achieved by generating a new set
|
||||
# of checksums and then comparing those with the old set.
|
||||
verify_cmd='NR==FNR{a[$1];next}/^git\+.*/{next}!(($1)in a){exit 1}'
|
||||
|
||||
for pkg do repo_dir=$(pkg_find "$pkg")
|
||||
[ -f "$repo_dir/sources" ] || continue
|
||||
|
||||
pkg_checksums "$pkg" |
|
||||
|
||||
# Check that the first column (separated by whitespace) match in both
|
||||
# checksum files. If any part of either file differs, mismatch. Abort.
|
||||
awk 'NR==FNR{a[$1];next}!(($1)in a){exit 1}' - "$repo_dir/checksums" || {
|
||||
pkg_checksums "$pkg" | awk "$verify_cmd" - "$repo_dir/checksums" || {
|
||||
log "$pkg" "Checksum mismatch"
|
||||
|
||||
# Instead of dying above, log it to the terminal. Also define a
|
||||
|
Loading…
Reference in New Issue
Block a user