int parseDescription(rpmSpec spec)
{
- int nextPart = RPMRC_FAIL; /* assume error */
+ int nextPart = PART_ERROR; /* assume error */
StringBuf sb;
int flag = PART_SUBNAME;
Package pkg;
if ((rc = poptParseArgvString(spec->line, &argc, &argv))) {
rpmlog(RPMLOG_ERR, _("line %d: Error parsing %%description: %s\n"),
spec->lineNum, poptStrerror(rc));
- return RPMRC_FAIL;
+ return PART_ERROR;
}
optCon = poptGetContext(NULL, argc, argv, optionsTable, 0);
if ((rc = readLine(spec, STRIP_TRAILINGSPACE | STRIP_COMMENTS)) > 0) {
nextPart = PART_NONE;
- } else {
- if (rc) {
- nextPart = RPMRC_FAIL;
+ } else if (rc < 0) {
+ nextPart = PART_ERROR;
goto exit;
- }
+ } else {
while (! (nextPart = isPart(spec->line))) {
appendLineStringBuf(sb, spec->line);
if (t) t->t_nlines++;
readLine(spec, STRIP_TRAILINGSPACE | STRIP_COMMENTS)) > 0) {
nextPart = PART_NONE;
break;
- }
- if (rc) {
- nextPart = RPMRC_FAIL;
+ } else if (rc < 0) {
+ nextPart = PART_ERROR;
goto exit;
}
}