RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 07-Apr-2011 01:33:18 Branch: HEAD Handle: 2011040623331700 Modified files: rpm CHANGES rpm/build parseDescription.c Log: - build: fix: resurrect %description -l XY yet again. Summary: Revision Changes Path 1.3604 +1 -0 rpm/CHANGES 2.45 +12 -12 rpm/build/parseDescription.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/CHANGES ============================================================================ $ cvs diff -u -r1.3603 -r1.3604 CHANGES --- rpm/CHANGES 6 Apr 2011 23:25:35 -0000 1.3603 +++ rpm/CHANGES 6 Apr 2011 23:33:17 -0000 1.3604 @@ -1,4 +1,5 @@ 5.4.0 -> 5.4.1: + - jbj: build: fix: resurrect %description -l XY yet again. - jbj: build: fix: attempt arbitrary '%foo' tag iff '%' is seen. - jbj: mongo: drag-in the test suite. grdfs/replica_sets todo++. - jbj: mongo: and re-export the mongo-c-driver through librpmio.vers. @@ . patch -p0 <<'@@ .' Index: rpm/build/parseDescription.c ============================================================================ $ cvs diff -u -r2.44 -r2.45 parseDescription.c --- rpm/build/parseDescription.c 16 Feb 2010 15:12:21 -0000 2.44 +++ rpm/build/parseDescription.c 6 Apr 2011 23:33:17 -0000 2.45 @@ -34,7 +34,7 @@ /*@modifies name, lang @*/ { rpmParseState nextPart = (rpmParseState) RPMRC_FAIL; /* assume error */ - rpmiob iob; + rpmiob iob = NULL; int flag = PART_SUBNAME; Package pkg; int rc, argc; @@ -54,7 +54,7 @@ if ((rc = poptParseArgvString(spec->line, &argc, &argv))) { rpmlog(RPMLOG_ERR, _("line %d: Error parsing %%description: %s\n"), spec->lineNum, poptStrerror(rc)); - return RPMRC_FAIL; + goto exit; } name = NULL; @@ -90,7 +90,8 @@ } /* Lose the inheirited %description (if present). */ - { HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he)); + if (spec->packages->header != pkg->header) { + HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he)); int xx; he->tag = RPMTAG_DESCRIPTION; xx = headerGet(pkg->header, he, 0); @@ -105,16 +106,17 @@ if ((rc = readLine(spec, STRIP_TRAILINGSPACE | STRIP_COMMENTS)) > 0) { nextPart = PART_NONE; - } else { - if (rc) { + goto exit; + } + if (rc < 0) { nextPart = (rpmParseState) RPMRC_FAIL; goto exit; } + while ((nextPart = isPart(spec)) == PART_NONE) { iob = rpmiobAppend(iob, spec->line, 1); if (t) t->t_nlines++; - if ((rc = - readLine(spec, STRIP_TRAILINGSPACE | STRIP_COMMENTS)) > 0) { + if ((rc = readLine(spec, STRIP_TRAILINGSPACE | STRIP_COMMENTS)) > 0) { nextPart = PART_NONE; break; } @@ -123,17 +125,15 @@ goto exit; } } - } iob = rpmiobRTrim(iob); if (!(noLang && strcmp(lang, RPMBUILD_DEFAULT_LANG))) { - (void) headerAddI18NString(pkg->header, RPMTAG_DESCRIPTION, - rpmiobStr(iob), lang); + const char * s = rpmiobStr(iob); + (void) headerAddI18NString(pkg->header, RPMTAG_DESCRIPTION, s, lang); } - iob = rpmiobFree(iob); - exit: + iob = rpmiobFree(iob); argv = _free(argv); optCon = poptFreeContext(optCon); return nextPart; @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org