]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
Rewrtie additional-md5ums feature
authorKacper Kornet <draenog@pld-linux.org>
Wed, 30 Mar 2011 17:21:20 +0000 (18:21 +0100)
committerKacper Kornet <draenog@pld-linux.org>
Wed, 30 Mar 2011 18:10:38 +0000 (19:10 +0100)
additional-md5sums file has now format compatible with Fedora sources
files:

<md5sum> <file_name>

builder.sh

index 7b258f528943dc4af853771e278fddf1f8aeea2e..16310ab305ec042d859fabab36704900cf712a14 100755 (executable)
@@ -840,13 +840,8 @@ src_md5() {
        local md5
 
        if [ -f additional-md5sums ]; then
-               local spec_rev=$(grep $SPECFILE CVS/Entries 2>/dev/null | sed -e s:/$SPECFILE/:: -e s:/.*::)
-               if [ -z "$spec_rev" ]; then
-                       spec_rev=$(head -n 1 $SPECFILE | sed -e 's/.*\$Revision: \([0-9.]*\).*/\1/')
-               fi
-               local spec="$SPECFILE[0-9.,]*,$(echo $spec_rev | sed 's/\./\\./g')"
                md5=$(grep -s -v '^#' additional-md5sums | \
-               grep -E "[      ]$(basename "$1")[      ]+${spec}([     ,]|\$)" | \
+               grep -E "[      ]$(basename "$1")([     ,]|\$)" | \
                sed -e 's/^\([0-9a-f]\{32\}\).*/\1/' | \
                grep -E '^[0-9a-f]{32}$')
 
This page took 0.055229 seconds and 4 git commands to generate.