[Rpm-maint] [rpm-software-management/rpm] 4.15 Regression: (#728)

Igor Gnatenko notifications at github.com
Sun Jun 2 16:21:43 UTC 2019


```diff
diff --git a/build/rpmfc.c b/build/rpmfc.c
index 5f3f56872..6e88c9359 100644
--- a/build/rpmfc.c
+++ b/build/rpmfc.c
@@ -446,6 +446,7 @@ int rpmfcExec(ARGV_const_t av, StringBuf sb_stdin, StringBuf * sb_stdoutp,
                       failnonzero, buildRoot, dup);
     if (ec) {
        sb = freeStringBuf(sb);
+       goto exit;
     }
 
     if (sb_stdoutp != NULL) {
@@ -453,8 +454,6 @@ int rpmfcExec(ARGV_const_t av, StringBuf sb_stdin, StringBuf * sb_stdoutp,
        sb = NULL;      /* XXX don't free */
     }
 
-    ec = 0;
-
 exit:
     freeStringBuf(sb);
     argvFree(xav);
```

With patch above, I see following:

* `rpmlog(RPMLOG_ERR, _("%s failed: %x\n"), argv[0], status);` is not showing return code, it returns status without WEXITSTATUS, so it is not helpful to user.
* In `build/build.c`, `rpmlog(RPMLOG_ERR, _("Exec of %s failed (%s): %s\n")` uses `strerror(errno)`, but there is nothing what sets errno at that time because process went much further.
* `%__build_post` does not actually getting executed if somebody runs `yes &; exit 1` , so it is not getting killed

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/728#issuecomment-498045217
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20190602/e4348774/attachment.html>


More information about the Rpm-maint mailing list