]> git.pld-linux.org Git - packages/rpm.git/blame_incremental - rpm-noexpand.patch
- use installed beecrypt
[packages/rpm.git] / rpm-noexpand.patch
... / ...
CommitLineData
1--- rpm-4.0.4/build/parseChangelog.c.wiget Sat Jan 5 19:40:22 2002
2+++ rpm-4.0.4/build/parseChangelog.c Tue Feb 12 22:52:02 2002
3@@ -217,7 +217,7 @@
4
5 while (! (nextPart = isPart(spec->line))) {
6 appendStringBuf(sb, spec->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.0.4/build/parseSpec.c.wiget Sun Jan 20 22:03:52 2002
13+++ rpm-4.0.4/build/parseSpec.c Tue Feb 12 23:02:16 2002
14@@ -143,12 +143,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@@ -258,6 +262,7 @@
32 SKIPSPACE(s);
33
34 match = -1;
35+ if (! (strip & STRIP_NOEXPAND)) {
36 if (! strncmp("%ifarch", s, sizeof("%ifarch")-1)) {
37 const char *arch = rpmExpand("%{_target_cpu}", NULL);
38 s += 7;
39@@ -337,6 +342,7 @@
40 ofi = spec->fileStack;
41 goto retry;
42 }
43+ }
44
45 if (match != -1) {
46 rl = xmalloc(sizeof(*rl));
47--- rpm-4.0.4/build/rpmbuild.h.wiget Sun Jan 20 22:17:36 2002
48+++ rpm-4.0.4/build/rpmbuild.h Tue Feb 12 22:52:02 2002
49@@ -73,6 +73,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.020015 seconds and 4 git commands to generate.