-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4.15 Regression: #728
Labels
Milestone
Comments
/cc @ascherer FYI |
Also, @pmatilai change made it worse, it continues to execute other sections even if %prep failed.
|
Looking at original cause of error
|
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:
|
ignatenkobrain
added a commit
to ignatenkobrain/rpm
that referenced
this issue
Jun 2, 2019
Also, emptying stdout if it was requested does not make sense when command fails. Usually, if command fails, you still might want to see the output and use it somehow. References: rpm-software-management#728 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
ignatenkobrain
added a commit
to ignatenkobrain/rpm
that referenced
this issue
Jun 2, 2019
First issue is that doUntar() when encounters an issue related to the spec file, returns non-NULL which indicates that no error has happened. Second is that even if it would return that, parsePrep() is simply ignores return code. Also be more consistent with "goto exit;". Fixes: 76c429c Fixes: c7a8c1e Fixes: rpm-software-management#728 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
ignatenkobrain
added a commit
to ignatenkobrain/rpm
that referenced
this issue
Jun 2, 2019
First issue is that doUntar() when encounters an issue related to the spec file, returns non-NULL which indicates that no error has happened. Second is that even if it would return that, parsePrep() is simply ignores return code. Also be more consistent with "goto exit;". Fixes: 76c429c Fixes: c7a8c1e Fixes: rpm-software-management#728 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
ignatenkobrain
added a commit
to ignatenkobrain/rpm
that referenced
this issue
Jun 2, 2019
First issue is that doUntar() when encounters an issue related to the spec file, returns non-NULL which indicates that no error has happened. Second is that even if it would return that, parsePrep() is simply ignores return code. Also be more consistent with "goto exit;". Fixes: 76c429c Fixes: c7a8c1e Fixes: rpm-software-management#728 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
ignatenkobrain
added a commit
to ignatenkobrain/rpm
that referenced
this issue
Jun 2, 2019
When getOutputFrom() is set to fail with non-zero return code, it should not dump non user-friendly (no context, no user return code) message into a terminal. error: /bin/sh failed: 100 References: rpm-software-management#728 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
ignatenkobrain
added a commit
to ignatenkobrain/rpm
that referenced
this issue
Jun 2, 2019
Also, emptying stdout if it was requested does not make sense when command fails. Usually, if command fails, you still might want to see the output and use it somehow. References: rpm-software-management#728 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
ignatenkobrain
added a commit
to ignatenkobrain/rpm
that referenced
this issue
Jun 2, 2019
Following snippet from buildlog is not helpful to user: […] Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.FqlMc8 […] + exit 1 error: Exec of /var/tmp/rpm-tmp.FqlMc8 failed (%prep): No such file or directory Previous rpmbuild versions returned: […] Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.epLFi2 […] + exit 1 error: Bad exit status from /var/tmp/rpm-tmp.epLFi2 (%prep) So let's restore good old version of a message. References: rpm-software-management#728 Fixes: 18e8f4e Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
pmatilai
pushed a commit
that referenced
this issue
Jun 3, 2019
First issue is that doUntar() when encounters an issue related to the spec file, returns non-NULL which indicates that no error has happened. Second is that even if it would return that, parsePrep() is simply ignores return code. Also be more consistent with "goto exit;". Fixes: 76c429c Fixes: c7a8c1e Fixes: #728 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
ignatenkobrain
added a commit
to ignatenkobrain/rpm
that referenced
this issue
Jun 3, 2019
When getOutputFrom() is set to fail with non-zero return code, it should not dump non user-friendly (no context, no user return code) message into a terminal. error: /bin/sh failed: 100 References: rpm-software-management#728 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
ignatenkobrain
added a commit
to ignatenkobrain/rpm
that referenced
this issue
Jun 3, 2019
Also, emptying stdout if it was requested does not make sense when command fails. Usually, if command fails, you still might want to see the output and use it somehow. References: rpm-software-management#728 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
ignatenkobrain
added a commit
to ignatenkobrain/rpm
that referenced
this issue
Jun 3, 2019
Following snippet from buildlog is not helpful to user: […] Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.FqlMc8 […] + exit 1 error: Exec of /var/tmp/rpm-tmp.FqlMc8 failed (%prep): No such file or directory Previous rpmbuild versions returned: […] Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.epLFi2 […] + exit 1 error: Bad exit status from /var/tmp/rpm-tmp.epLFi2 (%prep) So let's restore good old version of a message. References: rpm-software-management#728 Fixes: 18e8f4e Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
pmatilai
pushed a commit
that referenced
this issue
Jun 3, 2019
When getOutputFrom() is set to fail with non-zero return code, it should not dump non user-friendly (no context, no user return code) message into a terminal. error: /bin/sh failed: 100 References: #728 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
pmatilai
pushed a commit
that referenced
this issue
Jun 3, 2019
Also, emptying stdout if it was requested does not make sense when command fails. Usually, if command fails, you still might want to see the output and use it somehow. References: #728 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
pmatilai
pushed a commit
that referenced
this issue
Jun 3, 2019
Following snippet from buildlog is not helpful to user: […] Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.FqlMc8 […] + exit 1 error: Exec of /var/tmp/rpm-tmp.FqlMc8 failed (%prep): No such file or directory Previous rpmbuild versions returned: […] Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.epLFi2 […] + exit 1 error: Bad exit status from /var/tmp/rpm-tmp.epLFi2 (%prep) So let's restore good old version of a message. References: #728 Fixes: 18e8f4e Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
76c429c is the first bad commit
Before
After
The text was updated successfully, but these errors were encountered: