Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1887247

Summary: [RHEL-8] Unable to install python3-devel successfully
Product: Red Hat Enterprise Linux 8 Reporter: Zhi Li <yieli>
Component: dnfAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED NOTABUG QA Contact: swm-qe
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.3CC: james.antill, mblaha, xzhou, yoyang
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-12 17:13:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Zhi Li 2020-10-12 01:53:47 UTC
Description of problem:
The python3-devel cannot be successfully installed on rhel8, but it does not remind the installation failed.

[root@xxx ~]# yum install python3-devel
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

Last metadata expiration check: 2:01:38 ago on Sun 11 Oct 2020 09:55:37 AM EDT.
Dependencies resolved.
Nothing to do.
Complete!
[root@xxx ~]# echo $?       <<< maybe return prompt error
0
[root@xxx ~]# rpm -qa|grep python3-devel
[root@xxx ~]# echo $?
1

This will cause me to fail to build nfs-utils.
[root@xxx SOURCES]# rpmbuild -bb ./nfs-utils.spec 2>&1|grep -v error|awk '{print $1}'
python3-devel


Version-Release number of selected component (if applicable):
RHEL-8.3.0-20201009.2 BaseOS x86_64

How reproducible:
always

Actual results:
 installation failed

Expected results:
 install python3-devel successfully or prompt error

Comment 1 Marek Blaha 2020-10-12 17:13:02 UTC
Hi,

yum says "Nothing to do." on `yum install python3-devel` which generally means that requested package has already been installed.
In RHEL 8 the package providing python3-devel is "python36-devel" (python3-devel is mere provide here, see output of `yum provides python3-devel`. That said your `rpm -qa|grep python3-devel` check returns incorrect results and you might want to do something like this instead:


# rpm -q python36-devel
python36-devel-3.6.8-2.module+el8.1.0+3334+5cb623d7.x86_64

I'm closing this as "not a bug". If I missed something please do not hesitate to re-open the bug.

Comment 2 Zhi Li 2020-10-13 02:32:17 UTC
(In reply to Marek Blaha from comment #1)
> Hi,
> 
> yum says "Nothing to do." on `yum install python3-devel` which generally
> means that requested package has already been installed.
> In RHEL 8 the package providing python3-devel is "python36-devel"
> (python3-devel is mere provide here, see output of `yum provides
> python3-devel`. That said your `rpm -qa|grep python3-devel` check returns
> incorrect results

[root@ ~]# yum install -y python36-devel
[root@ ~]# rpm -qa | grep python3-devel    <<<<<<  returns incorrect results
Thanks for your explanation. I wonder whether this behaviour is reasonable?

> and you might want to do something like this instead:
> # rpm -q python36-devel
> python36-devel-3.6.8-2.module+el8.1.0+3334+5cb623d7.x86_64
> 
> I'm closing this as "not a bug". If I missed something please do not
> hesitate to re-open the bug.

Comment 3 Marek Blaha 2020-10-13 14:51:58 UTC
`rpm -qa` prints a list of names (NEVRAs to be exact) of installed packages. "python3-devel" is not a package name so it is not part of the output and the grep does not find a match. The correct package name is python36-devel so you need to do:

# rpm -qa | grep python36-devel

You can use `yum provides` command to find out which package provides 'python3-devel' capability:

# yum provides python3-devel
python36-devel-3.6.8-2.module+el8.1.0+3334+5cb623d7.x86_64 : Libraries and header files
                                                           : needed for Python development
Repo        : rhel-AppStream
Matched from:
Provide    : python3-devel = 3.6.8-2.module+el8.1.0+3334+5cb623d7

Or using only rpm:
# rpm -q --whatprovides python3-devel
python36-devel-3.6.8-2.module+el8.1.0+3334+5cb623d7.x86_64

Comment 4 Zhi Li 2020-10-14 01:49:38 UTC
(In reply to Marek Blaha from comment #3)
> `rpm -qa` prints a list of names (NEVRAs to be exact) of installed packages.
> "python3-devel" is not a package name so it is not part of the output and
> the grep does not find a match. The correct package name is python36-devel
> so you need to do:
> 
> # rpm -qa | grep python36-devel
> 
> You can use `yum provides` command to find out which package provides
> 'python3-devel' capability:
> 
> # yum provides python3-devel
> python36-devel-3.6.8-2.module+el8.1.0+3334+5cb623d7.x86_64 : Libraries and
> header files
>                                                            : needed for
> Python development
> Repo        : rhel-AppStream
> Matched from:
> Provide    : python3-devel = 3.6.8-2.module+el8.1.0+3334+5cb623d7
> 
> Or using only rpm:
> # rpm -q --whatprovides python3-devel
> python36-devel-3.6.8-2.module+el8.1.0+3334+5cb623d7.x86_64

Thanks for your patience and explanation.

Comment 5 Yongcheng Yang 2020-10-15 08:34:41 UTC
Hi Marek, I met this issue recently too.

(In reply to Marek Blaha from comment #1)
> Hi,
> 
> yum says "Nothing to do." on `yum install python3-devel` which generally
> means that requested package has already been installed.

If the requesting package exists already, we should see message like:
"Package xxx is already installed."

> In RHEL 8 the package providing python3-devel is "python36-devel"
> (python3-devel is mere provide here, see output of `yum provides
> python3-devel`.

If the "python3-devel" is not a valid package, the yum command should return warning like:
"No match for argument: python3-devel"

> That said your `rpm -qa|grep python3-devel` check returns
> incorrect results and you might want to do something like this instead:
> 
> # rpm -q python36-devel
> python36-devel-3.6.8-2.module+el8.1.0+3334+5cb623d7.x86_64
> 
> I'm closing this as "not a bug". If I missed something please do not
> hesitate to re-open the bug.

What makes me confused is that NO warning returns from yum and thus I thought it success.

Problem does solved after python36-devel installed but we don't know it's provided by other package if the `yum` told us everything is okay.
TBH I don't find the relationship between python36-devel and python3-devel if not told.

Looks like there's a package "python3-devel" from the repo "beaker-buildroot" which has dependency problem however.
Maybe that's why the `yum` returns silently.

E.g.
~~~~~~~~~~~~~~~~~~~~~~~~~~~
[root@hp-dl580g7-03 ~]# rpm -ql python36-devel | grep python3-devel
[root@hp-dl580g7-03 ~]# yum provides python3-devel
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

Last metadata expiration check: 2:37:54 ago on Thu 15 Oct 2020 01:38:04 AM EDT.
python3-devel-3.6.8-23.el8.i686 : Libraries and header files needed for Python development
Repo        : beaker-buildroot
Matched from:
Provide    : python3-devel = 3.6.8-23.el8

python3-devel-3.6.8-23.el8.x86_64 : Libraries and header files needed for Python development
Repo        : beaker-buildroot
Matched from:
Provide    : python3-devel = 3.6.8-23.el8

python36-devel-3.6.8-2.module+el8.1.0+3334+5cb623d7.x86_64 : Libraries and header files needed for Python development
Repo        : @System
Matched from:
Provide    : python3-devel = 3.6.8-2.module+el8.1.0+3334+5cb623d7

python36-devel-3.6.8-2.module+el8.1.0+3334+5cb623d7.x86_64 : Libraries and header files needed for Python development
Repo        : beaker-AppStream
Matched from:
Provide    : python3-devel = 3.6.8-2.module+el8.1.0+3334+5cb623d7

[root@hp-dl580g7-03 ~]# yum list python3-devel
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

Last metadata expiration check: 2:37:38 ago on Thu 15 Oct 2020 01:38:04 AM EDT.
Available Packages
python3-devel.i686                                                              3.6.8-23.el8                                                            beaker-buildroot
python3-devel.x86_64                                                            3.6.8-23.el8                                                            beaker-buildroot
[root@hp-dl580g7-03 ~]# #Download the rpm package
[root@hp-dl580g7-03 ~]# rpm -ivh rhel-8.4.0/python3-devel-3.6.8-23.el8.x86_64.rpm 
warning: rhel-8.4.0/python3-devel-3.6.8-23.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
error: Failed dependencies:
        platform-python = 3.6.8-23.el8 is needed by python3-devel-3.6.8-23.el8.x86_64
        platform-python-devel(x86-64) = 3.6.8-23.el8 is needed by python3-devel-3.6.8-23.el8.x86_64
[root@hp-dl580g7-03 ~]# rpm -q platform-python
platform-python-3.6.8-31.el8.x86_64
[root@hp-dl580g7-03 ~]#

Comment 6 Marek Blaha 2020-10-15 11:25:06 UTC
> > yum says "Nothing to do." on `yum install python3-devel` which generally
> > means that requested package has already been installed.
> 
> If the requesting package exists already, we should see message like:
> "Package xxx is already installed."

Hm, I'm not able to reproduce the "silent" behaviour. I'm getting exactly what you are suggesting:

# dnf install python3-devel
Last metadata expiration check: 2:17:01 ago on Thu Oct 15 05:01:02 2020.
Package python36-devel-3.6.8-2.module+el8.1.0+3334+5cb623d7.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

> If the "python3-devel" is not a valid package, the yum command should return
> warning like:
> "No match for argument: python3-devel"

Well although it is not a package name it is still a valid package-spec (see https://dnf.readthedocs.io/en/latest/command_ref.html#specifying-packages). It is an existing provide of python36-devel package and is matched as such.


> Looks like there's a package "python3-devel" from the repo
> "beaker-buildroot" which has dependency problem however.
> Maybe that's why the `yum` returns silently.

Sorry, I do not have this repository configured. Can you share the repo file to check python3-devel package present there?

Comment 7 Yongcheng Yang 2020-10-15 12:44:58 UTC
Thanks for the information!

(In reply to Marek Blaha from comment #6)
> ...
> 
> > Looks like there's a package "python3-devel" from the repo
> > "beaker-buildroot" which has dependency problem however.
> > Maybe that's why the `yum` returns silently.
> 
> Sorry, I do not have this repository configured. Can you share the repo file
> to check python3-devel package present there?

I just tested on a beaker machine with 8.3 RC installed:

[root@hp-dl580g7-03 ~]# grep DISTRO /etc/motd
                           DISTRO=RHEL-8.3.0-20201009.2
[root@hp-dl580g7-03 ~]# cat /etc/yum.repos.d/beaker-buildroot.repo
[beaker-buildroot]
name=beaker-buildroot
baseurl=http://download.devel.redhat.com/rhel-8/rel-eng/BUILDROOT-8/latest-BUILDROOT-8-RHEL-8/compose/Buildroot/x86_64/os
enabled=1
gpgcheck=0
skip_if_unavailable=1
[root@hp-dl580g7-03 ~]#

Comment 8 Yongcheng Yang 2020-10-15 12:52:37 UTC
(In reply to Yongcheng Yang from comment #7)
> Thanks for the information!
> 
> (In reply to Marek Blaha from comment #6)
> > ...
> > 
> > Sorry, I do not have this repository configured. Can you share the repo file
> > to check python3-devel package present there?
> 
> I just tested on a beaker machine with 8.3 RC installed:

Sorry, just found out this beaker-buildroot.repo is configured/added by our scripts. So looks like this isn't a common issue.

Comment 9 Marek Blaha 2020-10-20 06:49:54 UTC
Hm, even with this repo configured I'm not able to make yum silently return without reporting "Package already installed". I indeed see that this package has some unmet dependencies and I was not able to install it (may be I'm missing another custom repo?).
It looks like your case is more complex to reproduce.

Comment 10 Yongcheng Yang 2020-10-20 10:02:37 UTC
Thanks Marek for the reproducing effort.

As this might be a corner config issue and no more person hitting, let's leave it alone and focus on other issues for now.