From c4999043346d76a2dc4241235d855cb4a2469b0c Mon Sep 17 00:00:00 2001 From: merakor Date: Tue, 22 Jun 2021 09:53:12 +0000 Subject: pkg_checksums(): Skip all VCS sources FossilOrigin-Name: fbdbaaea8a4d9427e8b7549ea7afd2a2bb7febb487e652ee20244f4ee76e1225 --- src/cpt-lib.in | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/cpt-lib.in b/src/cpt-lib.in index 3858d82..0095bc4 100644 --- a/src/cpt-lib.in +++ b/src/cpt-lib.in @@ -1240,21 +1240,20 @@ pkg_checksums() { [ -f "$repo_dir/sources" ] || return 0 while read -r src _ || [ "$src" ]; do - # Comment. - if [ -z "${src##\#*}" ]; then - continue + + # Skip checksums if it's a comment, or a VCS repository. + case $src in + \#*|git+*|hg+*|fossil+*) continue ;; + esac # File is local to the package. - elif [ -f "$repo_dir/$src" ]; then + if [ -f "$repo_dir/$src" ]; then src_path=$repo_dir/${src%/*} # File is remote and was downloaded. elif [ -f "$src_dir/$1/${src##*/}" ]; then src_path=$src_dir/$1 - # File is a git repository. - elif [ -z "${src##git+*}" ]; then continue - # Die here if source for some reason, doesn't exist. else die "$1" "Couldn't find source '$src'" -- cgit v1.2.3