if (haveLangTag(h, tag, lang)) {
/* Turn this into an error eventually */
- rpmlog(RPMLOG_WARNING, _("line %d: second %s\n"),
+ rpmlog(RPMLOG_WARNING, _("line %d: second %s, please remove it\n"),
spec->lineNum, rpmTagGetName(tag));
+ return 0;
}
if (!*lang) {
// goto exit;
if (!lookupPackage(spec, name, flag, NULL)) {
+ //exist %package debuginfo, need to ignore it, because there has been
+ //debuginfo package created by %debug_package macro.
+ if (0 == strncmp(name, "debuginfo", 9))
+ {
+ rpmlog(RPMLOG_WARNING, _("debuginfo package has been in spec file, Don't write again this %s"), spec->line);
+ if ((rc = readLine(spec, STRIP_TRAILINGSPACE | STRIP_COMMENTS)) > 0) {
+ nextPart = PART_NONE;
+ } else if (rc < 0) {
+ free(name);
+ goto exit;
+ } else {
+ while (! (nextPart = isPart(spec->line))) {
+ if ((rc = readLine(spec, STRIP_TRAILINGSPACE | STRIP_COMMENTS)) > 0) {
+ nextPart = PART_NONE;
+ break;
+ }
+ if (rc) {
+ free(name);
+ goto exit;
+ }
+ }
+ }
+ res = nextPart;
+ }
free(name);
goto exit;
}