Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   ArchLinux Pacman Development (http://www.linux-archive.org/archlinux-pacman-development/)
-   -   makepkg: fix checksum generation with VCS sources (http://www.linux-archive.org/archlinux-pacman-development/677543-makepkg-fix-checksum-generation-vcs-sources.html)

Allan McRae 06-26-2012 10:58 PM

makepkg: fix checksum generation with VCS sources
 
VCS sources should have "SKIP" for their checksum value

Signed-off-by: Allan McRae <allan@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


All times are GMT. The time now is 01:39 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.