Skip to content

Backport execReadlines UTF-8 fix#1515

Merged
brlane-rht merged 5 commits into
weldr:rhel9-branchfrom
brlane-rht:rhel9-121651
Apr 21, 2026
Merged

Backport execReadlines UTF-8 fix#1515
brlane-rht merged 5 commits into
weldr:rhel9-branchfrom
brlane-rht:rhel9-121651

Conversation

@brlane-rht

Copy link
Copy Markdown
Contributor

Resolves: RHEL-121651

Oleg Sviridov and others added 5 commits April 16, 2026 16:25
To prevent an error like:
"ERROR livemedia-creator: 'utf-8' codec can't decode byte 0xd1 in position 4095: unexpected end of data",
when using a ru-RU.UTF8 locale.
It is proposed to decode already deserialized data.

(cherry picked from commit 28f5836)

Related: RHEL-121651
This allows it to properly handle unicode output from the process that
is being run.

I have been able to reproduce the failure by running lorax in a VM with
a modified runtime-postinstall that calls a python program that outputs
unicode, or with glib2-2.85.3-1.fc43 -- but I am unable to cause it to
fail in the test suite.

(cherry picked from commit 3a53278)

Related: RHEL-121651
This allows unicode to be passed to the logfiles without raising an
error.

(cherry picked from commit 24d17f8)

Related: RHEL-121651
This was never used in lorax, is always set to false, and now with
encoding set to UTF8 for these functions it wouldn't be binary anyway.

Also sets text=True in the _run_program call to startProgram, previously
the old universal_newlines was set from the state of binary_output.

(cherry picked from commit 42786c2)

Related: RHEL-121651
We have no control over the data stream so if what we receive from the
program (anaconda, or whatever) is broken the best we can do is ignore
errors and not crash because of a decode error.

(cherry picked from commit 56a0c3a)

Resolves: RHEL-121651
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 24581240556

Coverage decreased (-0.004%) to 44.988%

Details

  • Coverage decreased (-0.004%) from the base build.
  • Patch coverage: 3 uncovered changes across 1 file (8 of 11 lines covered, 72.73%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
src/pylorax/init.py 3 0 0.0%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 3256
Covered Lines: 1573
Line Coverage: 48.31%
Relevant Branches: 1403
Covered Branches: 523
Branch Coverage: 37.28%
Branches in Coverage %: Yes
Coverage Strength: 0.48 hits per line

💛 - Coveralls

@brlane-rht brlane-rht merged commit 34f15ab into weldr:rhel9-branch Apr 21, 2026
1 of 2 checks 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.

2 participants