summaryrefslogtreecommitdiff
path: root/build/files.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-04-28 21:35:26 +0300
committerPanu Matilainen <pmatilai@redhat.com>2008-04-28 21:35:26 +0300
commite3a2ab3269706336b4a5692ccd4563a4bc32a730 (patch)
treece65d60263591c25fc8bdd2e4fc2509a919b4b91 /build/files.c
parentbae8f0ba0558436ea3bcc7a4f646204333e619ca (diff)
downloadlibrpm-tizen-e3a2ab3269706336b4a5692ccd4563a4bc32a730.tar.gz
librpm-tizen-e3a2ab3269706336b4a5692ccd4563a4bc32a730.tar.bz2
librpm-tizen-e3a2ab3269706336b4a5692ccd4563a4bc32a730.zip
Set processingFailed just once
Diffstat (limited to 'build/files.c')
-rw-r--r--build/files.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/build/files.c b/build/files.c
index 1bcb4509a..6350af13c 100644
--- a/build/files.c
+++ b/build/files.c
@@ -852,7 +852,6 @@ static rpmRC parseForSimple(rpmSpec spec, Package pkg, char * buf,
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);
@@ -884,9 +883,7 @@ static rpmRC parseForSimple(rpmSpec spec, Package pkg, char * buf,
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;
}
@@ -901,9 +898,7 @@ static rpmRC parseForSimple(rpmSpec spec, Package pkg, char * buf,
*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 {
@@ -916,7 +911,6 @@ static rpmRC parseForSimple(rpmSpec spec, Package pkg, char * buf,
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 */
@@ -934,7 +928,6 @@ static rpmRC parseForSimple(rpmSpec spec, Package pkg, char * buf,
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);
@@ -963,6 +956,10 @@ static rpmRC parseForSimple(rpmSpec spec, Package pkg, char * buf,
}
}
+ if (res != RPMRC_OK) {
+ fl->processingFailed = 1;
+ }
+
return res;
}