]> git.pld-linux.org Git - packages/rpm.git/blame - rpm-noexpand.patch
- patch noexpand is back again, removed noexpanding %description
[packages/rpm.git] / rpm-noexpand.patch
CommitLineData
0a6e9fd1 1diff -urN rpm-4.0.2/build/parseChangelog.c rpm-4.0.2.new/build/parseChangelog.c
2--- rpm-4.0.2/build/parseChangelog.c Tue Jan 16 00:10:04 2001
3+++ rpm-4.0.2.new/build/parseChangelog.c Thu Aug 30 23:41:32 2001
4@@ -213,7 +213,7 @@
5
6 while (! (nextPart = isPart(spec->line))) {
7 appendStringBuf(sb, spec->line);
8- if ((rc = readLine(spec, STRIP_COMMENTS)) > 0) {
9+ if ((rc = readLine(spec, STRIP_COMMENTS | STRIP_NOEXPAND)) > 0) {
10 nextPart = PART_NONE;
11 break;
12 }
13diff -urN rpm-4.0.2/build/parseDescription.c rpm-4.0.2.new/build/parseDescription.c
14--- rpm-4.0.2/build/parseDescription.c Tue Jan 16 00:10:04 2001
15+++ rpm-4.0.2.new/build/parseDescription.c Thu Aug 30 23:41:47 2001
16@@ -106,7 +106,7 @@
17 appendLineStringBuf(sb, spec->line);
18 if (t) t->t_nlines++;
19 if ((rc =
20- readLine(spec, STRIP_TRAILINGSPACE | STRIP_COMMENTS)) > 0) {
21+ readLine(spec, STRIP_TRAILINGSPACE | STRIP_COMMENTS | STRIP_NOEXPAND)) > 0) {
22 nextPart = PART_NONE;
23 break;
24 }
25diff -urN rpm-4.0.2/build/parseSpec.c rpm-4.0.2.new/build/parseSpec.c
26--- rpm-4.0.2/build/parseSpec.c Tue Jan 16 14:08:55 2001
27+++ rpm-4.0.2.new/build/parseSpec.c Thu Aug 30 23:58:52 2001
28@@ -131,12 +131,16 @@
29 ofi->readPtr = from;
30
31 /* Don't expand macros (eg. %define) in false branch of %if clause */
32- if (spec->readStack->reading &&
33- expandMacros(spec, spec->macros, spec->lbuf, sizeof(spec->lbuf))) {
34- rpmError(RPMERR_BADSPEC, _("line %d: %s\n"),
35- spec->lineNum, spec->lbuf);
36- return RPMERR_BADSPEC;
37- }
38+ /* Also don't expand macros in %changelog and %description, where
39+ we set STRIP_NOEXPAND flag */
40+ if (!(strip & STRIP_NOEXPAND)) {
41+ if (spec->readStack->reading &&
42+ expandMacros(spec, spec->macros, spec->lbuf, sizeof(spec->lbuf))) {
43+ rpmError(RPMERR_BADSPEC, _("line %d: %s\n"),
44+ spec->lineNum, spec->lbuf);
45+ return RPMERR_BADSPEC;
46+ }
47+ }
48 spec->nextline = spec->lbuf;
49 }
50
51diff -urN rpm-4.0.2/build/rpmbuild.h rpm-4.0.2.new/build/rpmbuild.h
52--- rpm-4.0.2/build/rpmbuild.h Thu Jan 11 15:15:15 2001
53+++ rpm-4.0.2.new/build/rpmbuild.h Thu Aug 30 23:25:00 2001
54@@ -69,6 +69,7 @@
55 #define STRIP_NOTHING 0
56 #define STRIP_TRAILINGSPACE (1 << 0)
57 #define STRIP_COMMENTS (1 << 1)
58+#define STRIP_NOEXPAND (1 << 2)
59
60 #ifdef __cplusplus
61 extern "C" {
This page took 0.048279 seconds and 4 git commands to generate.