[pacman-dev] [PATCH 07/11] makepkg: fix checksum generation with VCS sources

Allan McRae allan at archlinux.org
Tue Jun 26 18:58:13 EDT 2012


VCS sources should have "SKIP" for their checksum value

Signed-off-by: Allan McRae <allan at archlinux.org>
---
 scripts/makepkg.sh.in | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 2b29759..f8d46f1 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -788,10 +788,21 @@ generate_checksums() {
 
 		local netfile
 		for netfile in "${source[@]}"; do
-			local file
-			file="$(get_filepath "$netfile")" || missing_source_file "$netfile"
-			local sum="$(openssl dgst -${integ} "$file")"
-			sum=${sum##* }
+			local proto sum
+			proto="$(get_protocol "$netfile")"
+
+			case $proto in
+				git*)
+					sum="SKIP"
+					;;
+				*)
+					local file
+					file="$(get_filepath "$netfile")" || missing_source_file "$netfile"
+					sum="$(openssl dgst -${integ} "$file")"
+					sum=${sum##* }
+					;;
+			esac
+
 			(( ct )) && printf "%s" "$indent"
 			printf "%s" "'$sum'"
 			ct=$(($ct+1))
-- 
1.7.11.1



More information about the pacman-dev mailing list