]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- handle proper md5 sums in spec files too
authorPatryk Zawadzki <patrys@room-303.com>
Tue, 8 Jan 2008 15:56:02 +0000 (15:56 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    builder.sh -> 1.527

builder.sh

index 2038d2712b2c1f26c5dc235aa78841a5ced77d3c..d2dd3d3fb114999f4b14a5213e4b2c13eb3fb836 100644 (file)
@@ -740,11 +740,16 @@ src_md5()
        if [ -n "$source_md5" ]; then
                echo $source_md5
        else
-               # we have empty SourceX-md5, but it is still possible
-               # that we have NoSourceX-md5 AND NoSource: X
-               nosource_md5=`grep -i "#[        ]*NoSource$no-md5[      ]*:" $SPECFILE | sed -e 's/.*://'`
-               if [ -n "$nosource_md5" -a -n "`grep -i "^NoSource:[     ]*$no$" $SPECFILE`" ] ; then
-                       echo $nosource_md5
+               source_md5=`grep -i "BuildRequires:[    ]*digest(%SOURCE$no)[   ]*=" $SPECFILE | sed -e 's/.*=//'`
+               if [ -n "$source_md5" ]; then
+                       echo $source_md5
+               else
+                       # we have empty SourceX-md5, but it is still possible
+                       # that we have NoSourceX-md5 AND NoSource: X
+                       nosource_md5=`grep -i "#[        ]*NoSource$no-md5[      ]*:" $SPECFILE | sed -e 's/.*://'`
+                       if [ -n "$nosource_md5" -a -n "`grep -i "^NoSource:[     ]*$no$" $SPECFILE`" ] ; then
+                               echo $nosource_md5
+                       fi
                fi
        fi
 }
This page took 0.105888 seconds and 4 git commands to generate.