Bug 1693766 - anaconda: Switch to a string for RPM calls (oncoming rpm API fix change)
Summary: anaconda: Switch to a string for RPM calls (oncoming rpm API fix change)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 31
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Vendula Poncova
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1693751 1779194
TreeView+ depends on / blocked
 
Reported: 2019-03-28 15:14 UTC by Panu Matilainen
Modified: 2020-11-03 19:49 UTC (History)
8 users (show)

Fixed In Version: anaconda-31.9-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-03 19:49:36 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Panu Matilainen 2019-03-28 15:14:26 UTC
Description of problem:

Rpm's python3 API has been totally braindamaged all this time but people are only noticing now that it's starting to get used. 

We're changing rpm to return all string data as surrogate-escaped utf-8 python strings everywhere (instead of bytes with unknown encoding that the API doesn't otherwise even accept, see bug 1631292). This makes most rpm-scripts written for python2 just work with python3 too (from the rpm pov).

Most software that has kept python2 compatibility are automatically compatible with the fixed API, but unfortunately python3-only users like anaconda need fixing for the new behavior.

As the broken rpm versions are widely in use, it's best to keep compatibility with both initially. There's at least one place in anaconda (kernel_version_list()) that needs fixing to replace the hardcoded .decode('utf-8') call with something like this:

def b2s(data):
    if isinstance(data, bytes):
        return data.decode('utf-8')
    return data

This is the Fedora counterpart of bug 1689909.

Comment 1 Panu Matilainen 2019-03-29 07:08:57 UTC
I was pointed out that the bug referred to in the message is a private RHEL bug, sorry about that. 
The public, Fedora side counterpart with the background story is the one blocked by this, ie 
https://bugzilla.redhat.com/show_bug.cgi?id=1693751

Comment 2 Vendula Poncova 2019-04-02 12:48:41 UTC
Hi, I assume that the fix is not required for Fedora 30, since the bug is opened for rawhide. In that case, we will implement the fix after the release of Fedora 30. Is that ok?

Comment 3 Panu Matilainen 2019-04-02 13:16:19 UTC
The string change is not planned for F30, but we'd really appreciate if you could fix it in rawhide sooner than F30 release, just to be able to move on with the rpm change and give it maximal soak-time in rawhide.

Comment 4 Vendula Poncova 2019-04-05 12:15:07 UTC
Fixed in a pull request: https://github.com/rhinstaller/anaconda/pull/1935

Comment 5 Ben Cotton 2019-08-13 17:11:04 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 6 Ben Cotton 2019-08-13 19:26:55 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.

Comment 7 Ben Cotton 2020-11-03 15:12:25 UTC
This message is a reminder that Fedora 31 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '31'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 31 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.


Note You need to log in before you can comment on or make changes to this bug.