X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=rpm-noexpand.patch;h=87c7e7a019f16b1f3e26a3d9962768056fe022a4;hb=0c661521760c57f2942e614bbaf075e9005693b3;hp=781a54e24c856d67edc54d287846e7b8e893f0e4;hpb=3fbaf6a5f55c67580e09a6b60dc83f1092dc7964;p=packages%2Frpm.git diff --git a/rpm-noexpand.patch b/rpm-noexpand.patch index 781a54e..87c7e7a 100644 --- a/rpm-noexpand.patch +++ b/rpm-noexpand.patch @@ -11,23 +11,23 @@ } --- 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; +@@ -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; @@ -273,6 +277,7 @@ SKIPSPACE(s);