Skip to content

Conversation

@glehmann
Copy link
Member

@glehmann glehmann commented Aug 6, 2025

os.system calls the user's shell, and is not directly checking for errors. This should raise an error when cpio or rpm2cpio fail, or if they can't be found.

@glehmann glehmann requested a review from stormi August 6, 2025 12:11
@glehmann glehmann force-pushed the gln/srpm-error-handling-wlnl branch from a1f7b08 to 3782f97 Compare August 6, 2025 14:42
@stormi stormi requested a review from tperard August 6, 2025 14:45
@glehmann glehmann force-pushed the gln/srpm-error-handling-wlnl branch from 3782f97 to 5149284 Compare August 11, 2025 07:54
@glehmann glehmann requested a review from psafont August 12, 2025 06:23
@glehmann glehmann force-pushed the gln/srpm-error-handling-wlnl branch from 5149284 to 2c59a22 Compare August 13, 2025 09:05
Comment on lines 30 to 32
# to prevent deadlocks if the current process finishes before the previous one.
if last_process_stdout:
last_process_stdout.close()
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not 100% sure of the nature of the deadlock, but avoiding keeping 2 readers on the pipe is definitely a good idea. Maybe describe it like "the new process does the reading from this pipe, drop our ref to it, notably preventing deadlocks"?

Copy link
Member Author

Choose a reason for hiding this comment

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

I wrote that based on an example I found, but I can't produce any deadlock, and I find plenty of examples that don't use it. I'll remove it.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

Choose a reason for hiding this comment

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

It should be kept, as explained (much better) in the API doc

os.system calls the user's shell, and is not directly checking for errors.
This should raise an error when cpio or rpm2cpio fail, or if they can't
be found.

Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
@glehmann glehmann force-pushed the gln/srpm-error-handling-wlnl branch from 2c59a22 to fa8bab3 Compare August 25, 2025 15:59
@stormi
Copy link
Member

stormi commented Oct 24, 2025

What's the status? I see pushes so I assume that @glehmann would like a re-review from @ydirson, but that's not obvious without actually re-requesting the review.

@glehmann glehmann requested a review from ydirson October 27, 2025 10:41
@stormi stormi merged commit 3ed14a3 into master Nov 17, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants