]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm-noexpand.patch
- rel 1.5 (rebuild against latest db)
[packages/rpm.git] / rpm-noexpand.patch
index 1edb31b08ee17aab4859c76afd87c277311a8463..9da650077a976d7b4259b6f223d1c16113cc7197 100644 (file)
@@ -1,7 +1,6 @@
-diff -urN rpm-4.0.2/build/parseChangelog.c rpm-4.0.2.new/build/parseChangelog.c
---- rpm-4.0.2/build/parseChangelog.c   Tue Jan 16 00:10:04 2001
-+++ rpm-4.0.2.new/build/parseChangelog.c       Thu Aug 30 23:41:32 2001
-@@ -213,7 +213,7 @@
+--- rpm-4.0.4/build/parseChangelog.c.wiget     Sat Jan  5 19:40:22 2002
++++ rpm-4.0.4/build/parseChangelog.c   Tue Feb 12 22:52:02 2002
+@@ -217,7 +217,7 @@
      
      while (! (nextPart = isPart(spec->line))) {
        appendStringBuf(sb, spec->line);
@@ -10,48 +9,44 @@ diff -urN rpm-4.0.2/build/parseChangelog.c rpm-4.0.2.new/build/parseChangelog.c
            nextPart = PART_NONE;
            break;
        }
-diff -urN rpm-4.0.2/build/parseDescription.c rpm-4.0.2.new/build/parseDescription.c
---- rpm-4.0.2/build/parseDescription.c Tue Jan 16 00:10:04 2001
-+++ rpm-4.0.2.new/build/parseDescription.c     Thu Aug 30 23:41:47 2001
-@@ -106,7 +106,7 @@
-           appendLineStringBuf(sb, spec->line);
-           if (t) t->t_nlines++;
-           if ((rc =
--               readLine(spec, STRIP_TRAILINGSPACE | STRIP_COMMENTS)) > 0) {
-+              readLine(spec, STRIP_TRAILINGSPACE | STRIP_COMMENTS | STRIP_NOEXPAND)) > 0) {
-               nextPart = PART_NONE;
-               break;
-           }
-diff -urN rpm-4.0.2/build/parseSpec.c rpm-4.0.2.new/build/parseSpec.c
---- rpm-4.0.2/build/parseSpec.c        Tue Jan 16 14:08:55 2001
-+++ rpm-4.0.2.new/build/parseSpec.c    Thu Aug 30 23:58:52 2001
-@@ -131,12 +131,16 @@
+--- rpm-4.0.4/build/parseSpec.c.wiget  Sun Jan 20 22:03:52 2002
++++ rpm-4.0.4/build/parseSpec.c        Tue Feb 12 23:02:16 2002
+@@ -143,12 +143,16 @@
        ofi->readPtr = from;
  
        /* Don't expand macros (eg. %define) in false branch of %if clause */
--      if (spec->readStack->reading &&
--          expandMacros(spec, spec->macros, spec->lbuf, sizeof(spec->lbuf))) {
--              rpmError(RPMERR_BADSPEC, _("line %d: %s\n"),
--                      spec->lineNum, spec->lbuf);
--              return RPMERR_BADSPEC;
--      }
-+      /* Also don't expand macros in %changelog and %description, where 
-+        we set STRIP_NOEXPAND flag */
++      /* Also don't expand macros in %changelog where we set STRIP_NOEXPAND flag */
++      /* (first line is ommited, so if there is e.g. %date macro, it will be expanded */
 +      if (!(strip & STRIP_NOEXPAND)) {
-+          if (spec->readStack->reading &&
-+                  expandMacros(spec, spec->macros, spec->lbuf, sizeof(spec->lbuf))) {
-+                      rpmError(RPMERR_BADSPEC, _("line %d: %s\n"),
-+                              spec->lineNum, spec->lbuf);
-+                      return RPMERR_BADSPEC;
-+                  }
+       if (spec->readStack->reading &&
+           expandMacros(spec, spec->macros, spec->lbuf, sizeof(spec->lbuf))) {
+               rpmError(RPMERR_BADSPEC, _("line %d: %s\n"),
+                       spec->lineNum, spec->lbuf);
+               return RPMERR_BADSPEC;
+       }
 +      }       
        spec->nextline = spec->lbuf;
      }
  
-diff -urN rpm-4.0.2/build/rpmbuild.h rpm-4.0.2.new/build/rpmbuild.h
---- rpm-4.0.2/build/rpmbuild.h Thu Jan 11 15:15:15 2001
-+++ rpm-4.0.2.new/build/rpmbuild.h     Thu Aug 30 23:25:00 2001
-@@ -69,6 +69,7 @@
+@@ -258,6 +262,7 @@
+     SKIPSPACE(s);
+     match = -1;
++    if (! (strip & STRIP_NOEXPAND)) {
+     if (! strncmp("%ifarch", s, sizeof("%ifarch")-1)) {
+       const char *arch = rpmExpand("%{_target_cpu}", NULL);
+       s += 7;
+@@ -337,6 +342,7 @@
+       ofi = spec->fileStack;
+       goto retry;
+     }
++    }
+     if (match != -1) {
+       rl = xmalloc(sizeof(*rl));
+--- rpm-4.0.4/build/rpmbuild.h.wiget   Sun Jan 20 22:17:36 2002
++++ rpm-4.0.4/build/rpmbuild.h Tue Feb 12 22:52:02 2002
+@@ -73,6 +73,7 @@
  #define STRIP_NOTHING             0
  #define STRIP_TRAILINGSPACE (1 << 0)
  #define STRIP_COMMENTS      (1 << 1)
This page took 0.037884 seconds and 4 git commands to generate.