Author: glen                         Date: Mon Dec 26 20:06:10 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- func to kill macros from preamble

---- Files affected:
SPECS:
   adapter.awk (1.249 -> 1.250) 

---- Diffs:

================================================================
Index: SPECS/adapter.awk
diff -u SPECS/adapter.awk:1.249 SPECS/adapter.awk:1.250
--- SPECS/adapter.awk:1.249     Mon Dec 26 00:22:49 2005
+++ SPECS/adapter.awk   Mon Dec 26 21:06:04 2005
@@ -126,6 +126,7 @@
                sub(/PreReq:/, "Requires:", $1);
        }
        format_preamble()
+       kill_preamble_macros();
 
        b_idx++;
        l = substr($0, index($0, $2));
@@ -228,6 +229,9 @@
        if ($2 ~ /^release$/)
                release = $3
 
+       if ($2 ~ /^mod_name$/)
+               mod_name = $3
+
        # do nothing further, otherwise adapter thinks we're at preamble
        print
        next
@@ -760,6 +764,7 @@
        if (field ~ /^patch:/)
                $1 = "Patch0:"
 
+       kill_preamble_macros();
        format_preamble()
 
        if (field ~ /requires/) {
@@ -1208,4 +1213,11 @@
        if (!/!\?debug/)
                sub("\$RPM_OPT_FLAGS", "%{rpmcflags}")
        return 1
+}
+
+function kill_preamble_macros()
+{
+       if ($1 ~ /^URL:/ || $1 ~ /^Obsoletes:/) {
+               sub("%{mod_name}", mod_name, $2);
+       }
 }
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/adapter.awk?r1=1.249&r2=1.250&f=u

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

Reply via email to