Author: patrys                       Date: Wed Jan  9 17:13:45 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- support rpm md5 digests

---- Files affected:
SPECS:
   adapter.awk (1.374 -> 1.375) 

---- Diffs:

================================================================
Index: SPECS/adapter.awk
diff -u SPECS/adapter.awk:1.374 SPECS/adapter.awk:1.375
--- SPECS/adapter.awk:1.374     Mon Jan  7 17:21:00 2008
+++ SPECS/adapter.awk   Wed Jan  9 18:13:40 2008
@@ -31,6 +31,8 @@
 
        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 @@
        # 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
        }
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/adapter.awk?r1=1.374&r2=1.375&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to