]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm-noexpand.patch
- typo
[packages/rpm.git] / rpm-noexpand.patch
index 7d6edc0f3a77276e98e268460de7635eec572055..7e796f6934474201c8d79ff434d59e584f2c83e0 100644 (file)
@@ -1,34 +1,52 @@
---- rpm-4.3/build/parseChangelog.c.wiget       Tue Jun 25 16:52:52 2002
-+++ rpm-4.3/build/parseChangelog.c     Fri May 16 00:06:47 2003
-@@ -221,7 +221,7 @@
-     
-     while (! (nextPart = isPart(spec->line))) {
+--- rpm-5.0.1.noexpand/build/parseChangelog.c  2008-01-31 01:18:18.506330692 +0200
++++ rpm-5.0.1/build/parseChangelog.c   2008-01-31 01:20:45.467027848 +0200
+@@ -318,7 +318,7 @@
+       line = xstrtolocale(line);
        appendStringBuf(sb, spec->line);
+       line = _free(line);
 -      if ((rc = readLine(spec, STRIP_COMMENTS)) > 0) {
 +      if ((rc = readLine(spec, STRIP_COMMENTS | STRIP_NOEXPAND)) > 0) {
            nextPart = PART_NONE;
            break;
        }
---- rpm-4.3/build/parseSpec.c.wiget    Thu May 15 18:15:51 2003
-+++ rpm-4.3/build/parseSpec.c  Fri May 16 00:08:57 2003
-@@ -156,12 +156,16 @@
-       ofi->readPtr = from;
+--- rpm-5.0.1.noexpand/build/parseSpec.c       2008-01-31 01:18:18.509664191 +0200
++++ rpm-5.0.1/build/parseSpec.c        2008-01-31 01:20:45.073674806 +0200
+@@ -168,7 +168,7 @@
+ /**
+  */
+-static int copyNextLineFromOFI(Spec spec, OFI_t * ofi)
++static int copyNextLineFromOFI(Spec spec, OFI_t * ofi, int strip)
+       /*@globals rpmGlobalMacroContext, h_errno,
+               fileSystem @*/
+       /*@modifies spec->nextline, spec->nextpeekc, spec->lbuf, spec->line,
+@@ -230,12 +230,16 @@
+ /*@=mods@*/
  
        /* Don't expand macros (eg. %define) in false branch of %if clause */
 +      /* 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"),
+           expandMacros(spec, spec->macros, spec->lbuf, spec->lbuf_len)) {
+               rpmlog(RPMLOG_ERR, _("line %d: %s\n"),
                        spec->lineNum, spec->lbuf);
-               return RPMERR_BADSPEC;
+               return RPMRC_FAIL;
        }
-+      }       
++      }
        spec->nextline = spec->lbuf;
      }
+     return 0;
+@@ -347,7 +351,7 @@
+       /* Copy next file line into the spec line buffer */
  
-@@ -273,6 +277,7 @@
+-      if ((rc = copyNextLineFromOFI(spec, ofi)) != 0) {
++      if ((rc = copyNextLineFromOFI(spec, ofi, strip)) != 0) {
+       if (rc == RPMRC_FAIL)
+           goto retry;
+       return rc;
+@@ -360,6 +364,7 @@
      SKIPSPACE(s);
  
      match = -1;
@@ -36,7 +54,7 @@
      if (!spec->readStack->reading && !strncmp("%if", s, sizeof("%if")-1)) {
        match = 0;
      } else if (! strncmp("%ifarch", s, sizeof("%ifarch")-1)) {
-@@ -354,6 +359,7 @@
+@@ -441,6 +446,7 @@
        ofi = spec->fileStack;
        goto retry;
      }
  
      if (match != -1) {
        rl = xmalloc(sizeof(*rl));
---- rpm-4.3/build/rpmbuild.h.wiget     Sat May 10 17:19:33 2003
-+++ rpm-4.3/build/rpmbuild.h   Fri May 16 00:06:47 2003
-@@ -75,6 +75,7 @@
+--- rpm-5.0.1.noexpand/build/rpmbuild.h        2008-01-31 01:18:18.509664191 +0200
++++ rpm-5.0.1/build/rpmbuild.h 2008-01-31 01:20:45.073674806 +0200
+@@ -83,6 +83,7 @@
  #define STRIP_NOTHING             0
  #define STRIP_TRAILINGSPACE (1 << 0)
  #define STRIP_COMMENTS      (1 << 1)
 +#define STRIP_NOEXPAND      (1 << 2)
  
- #ifdef __cplusplus
- extern "C" {
+ /*@unchecked@*/
+ extern int _rpmbuildFlags;
This page took 0.095374 seconds and 4 git commands to generate.