X-Git-Url: http://git.pld-linux.org/?p=packages%2Frpm.git;a=blobdiff_plain;f=rpm-noexpand.patch;h=781a54e24c856d67edc54d287846e7b8e893f0e4;hp=9da650077a976d7b4259b6f223d1c16113cc7197;hb=20528342a4dfbfa39010932d921fc7c07ca6e625;hpb=5b0f0ac9a55211821b0778001221c01854a2e4d2 diff --git a/rpm-noexpand.patch b/rpm-noexpand.patch index 9da6500..781a54e 100644 --- a/rpm-noexpand.patch +++ b/rpm-noexpand.patch @@ -1,42 +1,42 @@ ---- 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))) { +--- rpm-4.4.3/build/parseChangelog.c.orig 2005-11-12 01:20:12.000000000 +0100 ++++ rpm-4.4.3/build/parseChangelog.c 2005-11-18 19:46:50.357322048 +0100 +@@ -255,7 +255,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.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 @@ +--- 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; /* 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"), - 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; } -@@ -258,6 +262,7 @@ +@@ -273,6 +277,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 @@ + if (!spec->readStack->reading && !strncmp("%if", s, sizeof("%if")-1)) { + match = 0; + } else if (! strncmp("%ifarch", s, sizeof("%ifarch")-1)) { +@@ -354,6 +359,7 @@ ofi = spec->fileStack; goto retry; } @@ -44,9 +44,9 @@ 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 @@ +--- 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 @@ #define STRIP_NOTHING 0 #define STRIP_TRAILINGSPACE (1 << 0) #define STRIP_COMMENTS (1 << 1)