]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- support rpm md5 digests
authorPatryk Zawadzki <patrys@room-303.com>
Wed, 9 Jan 2008 17:13:40 +0000 (17:13 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    adapter.awk -> 1.375

adapter.awk

index e8d989e7f635807c0c587090df212eee5b06aff6..17e64bcc5c77d6b30b48b30a4732f53275772036 100644 (file)
@@ -31,6 +31,8 @@ BEGIN {
 
        PREAMBLE_TAGS = "(R|BR|Summary|Name|Version|Release|Epoch|License|Group|URL|BuildArch|BuildRoot|Obsoletes|Conflicts|Provides|ExclusiveArch|ExcludeArch|Pre[Rr]eq|(Build)?Requires|Suggests)"
 
+       usedigest = 0   # Enable to switch to rpm 4.4.6+ md5 digests
+
        preamble = 1    # Is it part of preamble? Default - yes
        boc = 4                 # Beginning of %changelog
        bod = 0                 # Beginning of %description
@@ -168,7 +170,11 @@ function b_makekey(a, b,   s) {
        # Generally, comments are printed without touching
        sub(/[ \t]+$/, "")
 
-       if (/Source.*md5/) {
+       if (/#[ \t]*Source.*md5/) {
+               if (usedigest == 1) {
+                       sub(/^#[ \t]*Source/, "BuildRequires:\tdigest(%SOURCE", $0)
+                       sub(/-md5[ \t]*:[ \t]*/, ") = ", $0)
+               }
                print $0
                next
        }
This page took 0.046162 seconds and 4 git commands to generate.