diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2014-01-29 15:19:31 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2014-01-29 15:19:31 +0200 |
commit | f6481343d42dcd446e28e5533ffb588696182293 (patch) | |
tree | 0286ba2a2c46510218d11eddbdbbf462dc1b91ea /build | |
parent | 86f6bdaa073c80c55a3e30bf5749f7277c4f8bc5 (diff) | |
download | rpm-f6481343d42dcd446e28e5533ffb588696182293.tar.gz |
Check for duplicate %description sections too
- Similarly to Group, Summary etc, this is complicated by possible
presence of language-specific versions, but now that we have a
function to handle it...
- Should *really* close out ticket #27
Diffstat (limited to 'build')
-rw-r--r-- | build/parseDescription.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/build/parseDescription.c b/build/parseDescription.c index f233d8d24..0ab136f39 100644 --- a/build/parseDescription.c +++ b/build/parseDescription.c @@ -67,16 +67,6 @@ int parseDescription(rpmSpec spec) } - /******************/ - -#if 0 - if (headerIsEntry(pkg->header, RPMTAG_DESCRIPTION)) { - rpmlog(RPMLOG_ERR, _("line %d: Second description\n"), - spec->lineNum); - goto exit; - } -#endif - sb = newStringBuf(); if ((rc = readLine(spec, STRIP_TRAILINGSPACE | STRIP_COMMENTS)) > 0) { @@ -99,11 +89,10 @@ int parseDescription(rpmSpec spec) } stripTrailingBlanksStringBuf(sb); - if (!((spec->flags & RPMSPEC_NOLANG) && !rstreq(lang, RPMBUILD_DEFAULT_LANG))) { - (void) headerAddI18NString(pkg->header, RPMTAG_DESCRIPTION, - getStringBuf(sb), lang); + if (addLangTag(spec, pkg->header, + RPMTAG_DESCRIPTION, getStringBuf(sb), lang)) { + nextPart = PART_ERROR; } - exit: freeStringBuf(sb); |