Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
My last pullrequest with the reworked wine installer contains a critical bug that prevents wine installations from working:
_exe_cmd might not consume all of the subprocess stdout because the loop exits as soon as the subprocess has a return code, but only 1 line per poll() check is consumed, so there might still be more lines in the buffer. These must also be consumed, especially when the output is required, as is the case for lang_install.
The output of innoextract --list-languages is very short and it returns quickly, so the first poll() might already return 0 and just 1 line will be consumed, which will be 'Inspecting "Game" ...', the actual lines listing languages come afterwards.
As lang_install is now used in extract_wine, there are situations where the return of lang_install will not be in the expected format '--language=langname', therefore the split operation fails with an error and the install aborts.
This happened because of my last-minute changes to lang_install and innoextract installation introduced when fixing review comments.
This PR fixes this in 2 places:
Checklist