Do macro expansion before %if processing
authormarc <devnull@localhost>
Wed, 15 Apr 1998 15:01:51 +0000 (15:01 +0000)
committermarc <devnull@localhost>
Wed, 15 Apr 1998 15:01:51 +0000 (15:01 +0000)
CVS patchset: 2090
CVS date: 1998/04/15 15:01:51

CHANGES
build/read.c

diff --git a/CHANGES b/CHANGES
index 12d2ccd..a5ce3c0 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,6 @@
 2.4.109 -> 2.4.110:
        - fixed return code bug in build code
+       - do macro expansion before %if processing
 
 2.4.108 -> 2.4.109:
         - remove icons with --rmsource
index b5790fe..8361cc9 100644 (file)
@@ -62,6 +62,8 @@ int readLine(Spec spec, int strip)
        *last = '\0';
     }
 
+    expandMacros(&spec->macros, spec->line);
+    
     rpmGetArchInfo(&arch, NULL);
     rpmGetOsInfo(&os, NULL);
     s = spec->line;
@@ -105,9 +107,7 @@ int readLine(Spec spec, int strip)
        spec->line[0] = '\0';
     }
     
-    if (spec->readStack->reading) {
-       expandMacros(&spec->macros, spec->line);
-    } else {
+    if (! spec->readStack->reading) {
        spec->line[0] = '\0';
     }