Skip to content
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

Redirect child processes' stderr to the parent stdout #63

Merged
merged 1 commit into from
Feb 28, 2024
Merged

Conversation

livingsilver94
Copy link
Member

We want to do this to log all lines printed by child processes. Sometimes solbuild builds big packages that may take hours; it's handy to fire it and let it work and check the output later. E.g.:

sudo solbuild build > log.txt

Fixes #54.

We want to do this to log all lines printed by child processes.
Sometimes solbuild builds big packages that may take hours; it's
handy to fire it and let it work and check the output later.
E.g.:

    sudo solbuild build > log.txt

Fixes #54.
@ReillyBrogan ReillyBrogan added the backport-me Backport to stable release label Dec 20, 2023
@ReillyBrogan ReillyBrogan removed the backport-me Backport to stable release label Jan 11, 2024
@livingsilver94
Copy link
Member Author

Ping?

@livingsilver94
Copy link
Member Author

Ah, @ermo made an objection to this task: #54 (comment)

@ermo
Copy link
Contributor

ermo commented Feb 27, 2024

Ah, @ermo made an objection to this task: #54 (comment)

I have since changed my mind. I think this should be landed.

Copy link
Contributor

@ermo ermo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On second thought, I think we should land this.

@ermo ermo added the enhancement New feature or request label Feb 27, 2024
@ermo ermo modified the milestones: 1.5.7, 1.6.0 Feb 27, 2024
Copy link
Member

@silkeh silkeh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@silkeh silkeh merged commit f697f12 into master Feb 28, 2024
1 check passed
@EbonJaeger EbonJaeger deleted the issue_54 branch February 28, 2024 16:15
EbonJaeger pushed a commit that referenced this pull request Feb 28, 2024
After this change it is possible to differentiate between the log output
from solbuild itself, and the output from commands executed by solbuild.
This allows one to check the build result on the terminal and keep the
redirected stdout for checking the reason for the build result. This is
a follow-up of #54/#63.

Additionally, the progress bar is replaced by a log statement when
redirected.

For example:

```
$ sudo solbuild build package.yml -p unstable-x86_64 > /tmp/output.log
 ✓ > Downloading source uri=https://www.nano-editor.org/dist/v7/nano-7.2.tar.xz
 ✓ > Now starting build package=nano
 ✓ > Building succeeded
```
@silkeh silkeh mentioned this pull request Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Solbuild should be able to redirect output to log file.
4 participants