if (s == NULL || strtokWithQuotes(NULL, " \t\n")) {
rpmlog(RPMLOG_ERR, _("Only one arg for %%docdir\n"));
- fl->processingFailed = 1;
res = RPMRC_FAIL;
} else {
argvAdd(&(fl->docDirs), s);
if (*fileName) {
/* We already got a file -- error */
- rpmlog(RPMLOG_ERR, _("Two files on one line: %s\n"),
- *fileName);
- fl->processingFailed = 1;
+ rpmlog(RPMLOG_ERR, _("Two files on one line: %s\n"), *fileName);
res = RPMRC_FAIL;
}
*fileName = s;
} else {
/* not in %doc, does not begin with / -- error */
- rpmlog(RPMLOG_ERR,
- _("File must begin with \"/\": %s\n"), s);
- fl->processingFailed = 1;
+ rpmlog(RPMLOG_ERR, _("File must begin with \"/\": %s\n"), s);
res = RPMRC_FAIL;
}
} else {
rpmlog(RPMLOG_ERR,
_("Can't mix special %%doc with other forms: %s\n"),
(*fileName ? *fileName : ""));
- fl->processingFailed = 1;
res = RPMRC_FAIL;
} else {
/* XXX WATCHOUT: buf is an arg */
fmt = headerSprintf(pkg->header, _docdir_fmt, rpmTagTable, rpmHeaderFormats, &errstr);
if (!fmt) {
rpmlog(RPMLOG_ERR, _("illegal _docdir_fmt: %s\n"), errstr);
- fl->processingFailed = 1;
res = RPMRC_FAIL;
}
ddir = rpmGetPath("%{_docdir}/", fmt, NULL);
}
}
+ if (res != RPMRC_OK) {
+ fl->processingFailed = 1;
+ }
+
return res;
}