]> git.pld-linux.org Git - packages/rpm.git/blob - rpm-noexpand.patch
- typo
[packages/rpm.git] / rpm-noexpand.patch
1 --- rpm-4.4.3/build/parseChangelog.c.orig       2005-11-12 01:20:12.000000000 +0100
2 +++ rpm-4.4.3/build/parseChangelog.c    2005-11-18 19:46:50.357322048 +0100
3 @@ -255,7 +255,7 @@
4         line = xstrtolocale(line);
5         appendStringBuf(sb, spec->line);
6         line = _free(line);
7 -       if ((rc = readLine(spec, STRIP_COMMENTS)) > 0) {
8 +       if ((rc = readLine(spec, STRIP_COMMENTS | STRIP_NOEXPAND)) > 0) {
9             nextPart = PART_NONE;
10             break;
11         }
12 --- rpm-4.3/build/parseSpec.c.wiget     Thu May 15 18:15:51 2003
13 +++ rpm-4.3/build/parseSpec.c   Fri May 16 00:08:57 2003
14 @@ -156,12 +156,16 @@
15         ofi->readPtr = from;
16  
17         /* Don't expand macros (eg. %define) in false branch of %if clause */
18 +       /* Also don't expand macros in %changelog where we set STRIP_NOEXPAND flag */
19 +       /* (first line is ommited, so if there is e.g. %date macro, it will be expanded */
20 +       if (!(strip & STRIP_NOEXPAND)) {
21         if (spec->readStack->reading &&
22             expandMacros(spec, spec->macros, spec->lbuf, sizeof(spec->lbuf))) {
23                 rpmError(RPMERR_BADSPEC, _("line %d: %s\n"),
24                         spec->lineNum, spec->lbuf);
25                 return RPMERR_BADSPEC;
26         }
27 +       }       
28         spec->nextline = spec->lbuf;
29      }
30  
31 @@ -273,6 +277,7 @@
32      SKIPSPACE(s);
33  
34      match = -1;
35 +    if (! (strip & STRIP_NOEXPAND)) {
36      if (!spec->readStack->reading && !strncmp("%if", s, sizeof("%if")-1)) {
37         match = 0;
38      } else if (! strncmp("%ifarch", s, sizeof("%ifarch")-1)) {
39 @@ -354,6 +359,7 @@
40         ofi = spec->fileStack;
41         goto retry;
42      }
43 +    }
44  
45      if (match != -1) {
46         rl = xmalloc(sizeof(*rl));
47 --- rpm-4.3/build/rpmbuild.h.wiget      Sat May 10 17:19:33 2003
48 +++ rpm-4.3/build/rpmbuild.h    Fri May 16 00:06:47 2003
49 @@ -75,6 +75,7 @@
50  #define STRIP_NOTHING             0
51  #define STRIP_TRAILINGSPACE (1 << 0)
52  #define STRIP_COMMENTS      (1 << 1)
53 +#define STRIP_NOEXPAND      (1 << 2)
54  
55  #ifdef __cplusplus
56  extern "C" {
This page took 0.034425 seconds and 3 git commands to generate.