aboutsummaryrefslogtreecommitdiff
path: root/src/lib/core
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@users.noreply.github.com>2026-06-30 07:44:33 -0400
committerGitHub <noreply@github.com>2026-06-30 07:44:33 -0400
commit4a189db63597c66b15101ba0344494f49d9af3b1 (patch)
tree237870064c5868fdd68e093f50c7e415c480b614 /src/lib/core
parent5e0b3fbefebaeff1fa5bfb338c760b9b9e270f02 (diff)
parent9547b304ce8c53574b3a877f8416898fbb8bea77 (diff)
downloadstasis-1.8.1.tar.gz
Merge pull request #150 from jhunkeler/bugfix-10031.8.1
Bugfix 0x1003
Diffstat (limited to 'src/lib/core')
-rw-r--r--src/lib/core/conda.c55
-rw-r--r--src/lib/core/multiprocessing.c1
2 files changed, 28 insertions, 28 deletions
diff --git a/src/lib/core/conda.c b/src/lib/core/conda.c
index bf27d21..044400d 100644
--- a/src/lib/core/conda.c
+++ b/src/lib/core/conda.c
@@ -310,33 +310,6 @@ int pkg_index_provides(int mode, const char *index, const char *spec, const char
}
}
- if (status != 0) {
- SYSERROR("Command exited non-zero (%d)", status);
- for (size_t i = 0; i < sizeof(logfile) / sizeof(logfile[0]); i++) {
- const char *stream_name = i == 0 ? "stdout" : "stderr";
- if (!logfile_st[i].st_size) {
- continue;
- }
- SYSDEBUG("(%s): %s", stream_name, logfile[i]);
- FILE *fp = fdopen(logfile_fd[i], "r");
- if (!fp) {
- remove(logfile[i]);
- return -1;
- }
-
- fflush(stdout);
- fflush(stderr);
-
- char line[STASIS_BUFSIZ] = {0};
- while (fgets(line, sizeof(line) - 1, fp) != NULL) {
- SYSINFO("(%s): %s", stream_name, strip(line));
- }
-
- fflush(stderr);
- fclose(fp);
- }
- }
-
if (WTERMSIG(proc.returncode)) {
// This gets its own return value because if the external program
// received a signal, even its status is zero, it's not reliable
@@ -372,6 +345,34 @@ int pkg_index_provides(int mode, const char *index, const char *spec, const char
final = PKG_NOT_FOUND;
}
+ if (final != PKG_FOUND && final != PKG_NOT_FOUND) {
+ SYSERROR("Command exited non-zero (%d)", status);
+ for (size_t i = 0; i < sizeof(logfile) / sizeof(logfile[0]); i++) {
+ const char *stream_name = i == 0 ? "stdout" : "stderr";
+ if (!logfile_st[i].st_size) {
+ continue;
+ }
+ SYSDEBUG("(%s): %s", stream_name, logfile[i]);
+ FILE *fp = fdopen(logfile_fd[i], "r");
+ if (!fp) {
+ remove(logfile[i]);
+ return -1;
+ }
+
+ fflush(stdout);
+ fflush(stderr);
+
+ char line[STASIS_BUFSIZ] = {0};
+ while (fgets(line, sizeof(line) - 1, fp) != NULL) {
+ SYSINFO("(%s): %s", stream_name, strip(line));
+ }
+
+ fflush(stderr);
+ fclose(fp);
+ }
+ }
+
+
// Remove log files
for (size_t i = 0; i < sizeof(logfile) / sizeof(logfile[0]); i++) {
remove(logfile[stdout_stream]);
diff --git a/src/lib/core/multiprocessing.c b/src/lib/core/multiprocessing.c
index 6c64888..0a63659 100644
--- a/src/lib/core/multiprocessing.c
+++ b/src/lib/core/multiprocessing.c
@@ -89,7 +89,6 @@ int child(struct MultiProcessingPool *pool, struct MultiProcessingTask *task) {
const int redirect = dup2(STDOUT_FILENO, STDERR_FILENO);
if (redirect < 0) {
- SYSERROR("%s", "Unable to redirect stderr to stdout");
SYSERROR("Unable to redirect stderr to stdout");
fclose(fp_log);
semaphore_post(&pool->semaphore);