Closed cxhong closed 4 years ago
on the xcat-inventory.spec
file, the packages are needed for python2
Requires: python-psycopg2 python-sqlalchemy >= 0.8.0 MySQL-python PyYAML python-six python-jinja2 git
for the python3, following packages are needed
Requires: docopt SQLAlchemy PyMySQL PyYAML deepdiff sh jinja2 git
If the system is running the postgresql
, the psycopg2
package is needed and following needs to be configured before install psycopg2
# export PATH=/usr/lib64/pgsql/postgresql-9.2/bin:$PATH
# export LD_LIBRARY_PATH=/usr/lib64:/usr/lib64/pgsql/postgresql-9.2/lib
# ln -s /usr/lib64/libpq.so.5.10 /usr/lib64/libpq.a
@peterwywong , all those dependent packages you can install with pip3 install <packagename>
. we want only one spec file, so, in the spec file, need to check if the system has python2
or python3
if python2 {
Requires: python-psycopg2 python-sqlalchemy >= 0.8.0 MySQL-python PyYAML python-six python-jinja2 git
} else if python3 {
Requires: docopt SQLAlchemy PyMySQL PyYAML deepdiff sh jinja2 git
}
Comparing python package differences between RHEL7.6 and RHEL8.1:
[root@fs2vm100 xcat-inventory]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.6 (Maipo)
[root@fs2vm100 xcat-inventory]# for i in psycopg2 sqlalchemy PyMySQL PyYAML six jinja2; do yum list -q py*$i; done
Installed Packages
python-psycopg2.ppc64le 2.5.1-3.el7 @local-rhels7.6-ppc64le--install-REPO-os-rhels-7.6-rhels7.6-ga-ppc64le
Available Packages
python3-psycopg2.ppc64le 2.7.7-2.el7 epel
python34-psycopg2.ppc64le 2.7.7-2.el7 epel
Installed Packages
python-sqlalchemy.ppc64le 0.9.8-2.el7 @local-rhels7.6-ppc64le--install-REPO-os-rhels-7.6-rhels7.6-ga-ppc64le
Available Packages
python-zope-sqlalchemy.noarch 0.7.6-1.el7 epel
python2-flask-sqlalchemy.noarch 2.3.2-1.el7 epel
python34-sqlalchemy.ppc64le 1.1.3-3.el7 epel
python36-sqlalchemy.ppc64le 1.1.3-3.el7 epel
Available Packages
python2-PyMySQL.noarch 0.9.2-3.el7 epel
python36-PyMySQL.noarch 0.9.2-3.el7 epel
Available Packages
python2-pyyaml.noarch 3.10-0.el7 epel
python34-PyYAML.ppc64le 3.12-1.el7 epel
python36-PyYAML.ppc64le 3.12-1.el7 epel
Installed Packages
python-six.noarch 1.9.0-2.el7 @anaconda/7.6
Available Packages
python2-six.noarch 1.9.0-0.el7 epel
python34-six.noarch 1.12.0-1.el7 epel
python36-six.noarch 1.12.0-1.el7 epel
Installed Packages
python-jinja2.noarch 2.7.2-2.el7 @local-rhels7.6-ppc64le--install-REPO-os-rhels-7.6-rhels7.6-ga-ppc64le
Available Packages
python34-jinja2.noarch 2.8.1-2.el7 epel
python36-jinja2.noarch 2.8.1-2.el7 epel
[root@c910f03c09k18 xcat-inventory]# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.1 (Ootpa)
[root@c910f03c09k18 xcat-inventory]# for i in psycopg2 sqlalchemy PyMySQL PyYAML six jinja2; do yum list -q py*$i; done
Available Packages
python2-psycopg2.ppc64le 2.7.5-7.module+el8.1.0+3111+de3f2d8e local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream
python3-psycopg2.ppc64le 2.7.5-7.el8 local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream
Available Packages
python2-sqlalchemy.ppc64le 1.3.2-1.module+el8.1.0+2994+98e054d6 local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream
python3-sqlalchemy.ppc64le 1.3.2-1.module+el8.1.0+3334+5cb623d7 local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream
Available Packages
python2-PyMySQL.noarch 0.8.0-10.module+el8.1.0+3111+de3f2d8e local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream
python3-PyMySQL.noarch 0.8.0-10.module+el8.1.0+3334+5cb623d7 local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream
Available Packages
python2-pyyaml.ppc64le 3.12-16.module+el8.1.0+3111+de3f2d8e local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream
python3-pyyaml.ppc64le 3.12-12.el8 local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-BaseOS
Installed Packages
python3-six.noarch 1.11.0-8.el8 @anaconda
Available Packages
python2-six.noarch 1.11.0-5.module+el8.1.0+3111+de3f2d8e local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream
python3-spacewalk-usix.noarch 2.8.1-5.module+el8.1.0+3115+d1f204ad local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream
Available Packages
python2-jinja2.noarch 2.10-8.module+el8.1.0+3111+de3f2d8e local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream
python3-jinja2.noarch 2.10.1-2.el8_0 local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream
Two observations: 1.) Both RHEL7 and RHEL8 have access to either python2 or python3 versions of most of these packages, but the naming conventions of the rpms are different between RHEL7 and RHEL8. 2.) For most of these packages, epel is required for RHEL7 and AppStream for RHEL8. Most of these packages are not included in the base OS distribution.
With no modifications to the spec file, yum cannot find the required packages on RHEL8.1, as expected:
[root@c910f03c09k18 xcat-inventory]# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.1 (Ootpa)
[root@c910f03c09k18 xcat-inventory]# yum install /root/rpmbuild/RPMS/noarch/xcat-inventory-0.1.6-c63.noarch.rpm
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:33:32 ago on Wed 26 Feb 2020 02:25:15 PM EST.
Error:
Problem: conflicting requests
- nothing provides python-sqlalchemy >= 0.8.0 needed by xcat-inventory-1:0.1.6-c63.noarch
- nothing provides python-six needed by xcat-inventory-1:0.1.6-c63.noarch
- nothing provides PyYAML needed by xcat-inventory-1:0.1.6-c63.noarch
- nothing provides python-psycopg2 needed by xcat-inventory-1:0.1.6-c63.noarch
- nothing provides python-jinja2 needed by xcat-inventory-1:0.1.6-c63.noarch
- nothing provides MySQL-python needed by xcat-inventory-1:0.1.6-c63.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
Change the Requires:
line to match the RHEL8.1 package names:
# Before:
Requires: python-psycopg2 python-sqlalchemy >= 0.8.0 MySQL-python PyYAML python-six python-jinja2 git
# After:
Requires: python2-psycopg2 python2-sqlalchemy >= 0.8.0 python2-PyMySQL python2-pyyaml python2-six python2-jinja2 git
Installation succeeds on RHEL8.1:
[root@c910f03c09k18 xcat-inventory]# yum install /root/rpmbuild/RPMS/noarch/xcat-inventory-0.1.6-c63.noarch.rpm
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:38:34 ago on Wed 26 Feb 2020 02:25:15 PM EST.
Dependencies resolved.
==============================================================================================================================================================================================
Package Architecture Version Repository Size
==============================================================================================================================================================================================
Installing:
xcat-inventory noarch 1:0.1.6-c63 @commandline 55 k
Installing dependencies:
python2 ppc64le 2.7.16-12.module+el8.1.0+4148+33a50073 local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 109 k
python2-PyMySQL noarch 0.8.0-10.module+el8.1.0+3111+de3f2d8e local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 156 k
python2-babel noarch 2.5.1-9.module+el8.1.0+3111+de3f2d8e local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 4.8 M
python2-jinja2 noarch 2.10-8.module+el8.1.0+3111+de3f2d8e local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 255 k
python2-libs ppc64le 2.7.16-12.module+el8.1.0+4148+33a50073 local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 6.1 M
python2-markupsafe ppc64le 0.23-19.module+el8.1.0+3111+de3f2d8e local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 48 k
python2-pip-wheel noarch 9.0.3-14.module+el8.1.0+3446+c3d52da3 local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 1.2 M
python2-psycopg2 ppc64le 2.7.5-7.module+el8.1.0+3111+de3f2d8e local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 179 k
python2-pytz noarch 2017.2-12.module+el8.1.0+3111+de3f2d8e local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 54 k
python2-pyyaml ppc64le 3.12-16.module+el8.1.0+3111+de3f2d8e local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 184 k
python2-setuptools noarch 39.0.1-11.module+el8.1.0+3446+c3d52da3 local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 643 k
python2-setuptools-wheel noarch 39.0.1-11.module+el8.1.0+3446+c3d52da3 local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 289 k
python2-six noarch 1.11.0-5.module+el8.1.0+3111+de3f2d8e local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 38 k
python2-sqlalchemy ppc64le 1.3.2-1.module+el8.1.0+2994+98e054d6 local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 1.9 M
Installing weak dependencies:
python2-pip noarch 9.0.3-14.module+el8.1.0+3446+c3d52da3 local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 2.0 M
Enabling module streams:
python27 2.7
Transaction Summary
==============================================================================================================================================================================================
Install 16 Packages
Total size: 18 M
Total download size: 18 M
Installed size: 78 M
Is this ok [y/N]: y
Downloading Packages:
(1/15): python2-PyMySQL-0.8.0-10.module+el8.1.0+3111+de3f2d8e.noarch.rpm 1.4 MB/s | 156 kB 00:00
(2/15): python2-2.7.16-12.module+el8.1.0+4148+33a50073.ppc64le.rpm 909 kB/s | 109 kB 00:00
(3/15): python2-jinja2-2.10-8.module+el8.1.0+3111+de3f2d8e.noarch.rpm 7.4 MB/s | 255 kB 00:00
(4/15): python2-babel-2.5.1-9.module+el8.1.0+3111+de3f2d8e.noarch.rpm 17 MB/s | 4.8 MB 00:00
(5/15): python2-markupsafe-0.23-19.module+el8.1.0+3111+de3f2d8e.ppc64le.rpm 368 kB/s | 48 kB 00:00
(6/15): python2-libs-2.7.16-12.module+el8.1.0+4148+33a50073.ppc64le.rpm 32 MB/s | 6.1 MB 00:00
(7/15): python2-pip-wheel-9.0.3-14.module+el8.1.0+3446+c3d52da3.noarch.rpm 24 MB/s | 1.2 MB 00:00
(8/15): python2-psycopg2-2.7.5-7.module+el8.1.0+3111+de3f2d8e.ppc64le.rpm 4.7 MB/s | 179 kB 00:00
(9/15): python2-pytz-2017.2-12.module+el8.1.0+3111+de3f2d8e.noarch.rpm 2.4 MB/s | 54 kB 00:00
(10/15): python2-pip-9.0.3-14.module+el8.1.0+3446+c3d52da3.noarch.rpm 24 MB/s | 2.0 MB 00:00
(11/15): python2-pyyaml-3.12-16.module+el8.1.0+3111+de3f2d8e.ppc64le.rpm 9.5 MB/s | 184 kB 00:00
(12/15): python2-setuptools-wheel-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch.rpm 14 MB/s | 289 kB 00:00
(13/15): python2-six-1.11.0-5.module+el8.1.0+3111+de3f2d8e.noarch.rpm 3.1 MB/s | 38 kB 00:00
(14/15): python2-sqlalchemy-1.3.2-1.module+el8.1.0+2994+98e054d6.ppc64le.rpm 35 MB/s | 1.9 MB 00:00
(15/15): python2-setuptools-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch.rpm 4.2 MB/s | 643 kB 00:00
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 35 MB/s | 18 MB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : python2-setuptools-wheel-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch 1/16
Installing : python2-pip-wheel-9.0.3-14.module+el8.1.0+3446+c3d52da3.noarch 2/16
Installing : python2-libs-2.7.16-12.module+el8.1.0+4148+33a50073.ppc64le 3/16
Installing : python2-pip-9.0.3-14.module+el8.1.0+3446+c3d52da3.noarch 4/16
Installing : python2-setuptools-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch 5/16
Installing : python2-2.7.16-12.module+el8.1.0+4148+33a50073.ppc64le 6/16
Running scriptlet: python2-2.7.16-12.module+el8.1.0+4148+33a50073.ppc64le 6/16
Installing : python2-PyMySQL-0.8.0-10.module+el8.1.0+3111+de3f2d8e.noarch 7/16
Installing : python2-markupsafe-0.23-19.module+el8.1.0+3111+de3f2d8e.ppc64le 8/16
Installing : python2-psycopg2-2.7.5-7.module+el8.1.0+3111+de3f2d8e.ppc64le 9/16
Installing : python2-pytz-2017.2-12.module+el8.1.0+3111+de3f2d8e.noarch 10/16
Installing : python2-babel-2.5.1-9.module+el8.1.0+3111+de3f2d8e.noarch 11/16
Installing : python2-jinja2-2.10-8.module+el8.1.0+3111+de3f2d8e.noarch 12/16
Installing : python2-pyyaml-3.12-16.module+el8.1.0+3111+de3f2d8e.ppc64le 13/16
Installing : python2-six-1.11.0-5.module+el8.1.0+3111+de3f2d8e.noarch 14/16
Installing : python2-sqlalchemy-1.3.2-1.module+el8.1.0+2994+98e054d6.ppc64le 15/16
Installing : xcat-inventory-1:0.1.6-c63.noarch 16/16
Running scriptlet: xcat-inventory-1:0.1.6-c63.noarch 16/16
Verifying : python2-2.7.16-12.module+el8.1.0+4148+33a50073.ppc64le 1/16
Verifying : python2-PyMySQL-0.8.0-10.module+el8.1.0+3111+de3f2d8e.noarch 2/16
Verifying : python2-babel-2.5.1-9.module+el8.1.0+3111+de3f2d8e.noarch 3/16
Verifying : python2-jinja2-2.10-8.module+el8.1.0+3111+de3f2d8e.noarch 4/16
Verifying : python2-libs-2.7.16-12.module+el8.1.0+4148+33a50073.ppc64le 5/16
Verifying : python2-markupsafe-0.23-19.module+el8.1.0+3111+de3f2d8e.ppc64le 6/16
Verifying : python2-pip-9.0.3-14.module+el8.1.0+3446+c3d52da3.noarch 7/16
Verifying : python2-pip-wheel-9.0.3-14.module+el8.1.0+3446+c3d52da3.noarch 8/16
Verifying : python2-psycopg2-2.7.5-7.module+el8.1.0+3111+de3f2d8e.ppc64le 9/16
Verifying : python2-pytz-2017.2-12.module+el8.1.0+3111+de3f2d8e.noarch 10/16
Verifying : python2-pyyaml-3.12-16.module+el8.1.0+3111+de3f2d8e.ppc64le 11/16
Verifying : python2-setuptools-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch 12/16
Verifying : python2-setuptools-wheel-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch 13/16
Verifying : python2-six-1.11.0-5.module+el8.1.0+3111+de3f2d8e.noarch 14/16
Verifying : python2-sqlalchemy-1.3.2-1.module+el8.1.0+2994+98e054d6.ppc64le 15/16
Verifying : xcat-inventory-1:0.1.6-c63.noarch 16/16
Installed products updated.
Installed:
xcat-inventory-1:0.1.6-c63.noarch python2-pip-9.0.3-14.module+el8.1.0+3446+c3d52da3.noarch
python2-2.7.16-12.module+el8.1.0+4148+33a50073.ppc64le python2-PyMySQL-0.8.0-10.module+el8.1.0+3111+de3f2d8e.noarch
python2-babel-2.5.1-9.module+el8.1.0+3111+de3f2d8e.noarch python2-jinja2-2.10-8.module+el8.1.0+3111+de3f2d8e.noarch
python2-libs-2.7.16-12.module+el8.1.0+4148+33a50073.ppc64le python2-markupsafe-0.23-19.module+el8.1.0+3111+de3f2d8e.ppc64le
python2-pip-wheel-9.0.3-14.module+el8.1.0+3446+c3d52da3.noarch python2-psycopg2-2.7.5-7.module+el8.1.0+3111+de3f2d8e.ppc64le
python2-pytz-2017.2-12.module+el8.1.0+3111+de3f2d8e.noarch python2-pyyaml-3.12-16.module+el8.1.0+3111+de3f2d8e.ppc64le
python2-setuptools-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch python2-setuptools-wheel-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch
python2-six-1.11.0-5.module+el8.1.0+3111+de3f2d8e.noarch python2-sqlalchemy-1.3.2-1.module+el8.1.0+2994+98e054d6.ppc64le
Complete!
But this package will not install on RHEL7.X, as expected due to different naming conventions:
[root@fs2vm100 xcat-inventory]# rpm -ivh /tmp/xcat-inventory-0.1.6-c63.noarch.rpm
error: Failed dependencies:
python2-PyMySQL is needed by xcat-inventory-1:0.1.6-c63.noarch
python2-jinja2 is needed by xcat-inventory-1:0.1.6-c63.noarch
python2-psycopg2 is needed by xcat-inventory-1:0.1.6-c63.noarch
python2-pyyaml is needed by xcat-inventory-1:0.1.6-c63.noarch
python2-six is needed by xcat-inventory-1:0.1.6-c63.noarch
python2-sqlalchemy >= 0.8.0 is needed by xcat-inventory-1:0.1.6-c63.noarch
That is a great find, Nate.
I think it gets back to my earlier thought that those listed out for "Requires:" need to be RPMs, i.e., dependent RPMs, not dependent Python packages.
Currently, on fs2vm100 (RHEL 7.6 with Python2), we have Requires: python-psycopg2 python-sqlalchemy >= 0.8.0 MySQL-python PyYAML python-six python-jinja2 git
Some names are RPM names, and some Python package names such as MySQL-python and PyYAML. However, there is NO complaint when we do "rpm -ivh xcat-inventory....rpm". So, It gives an impression that they need NOT be RPMs. But it seems to be not true.
Its behavior seems to be different on c910f03c09k18 (RHEL 8.1 with python3). I guess many of the RPMs were not installed yet. After their installations, with names changed by Nate, xcat-inventory RPM is installed fine.
Let's go back to c910f03c09k18 (RHEL 8.1 with Python3) and look at the Requires names for python3. Requires: docopt SQLAlchemy PyMySQL PyYAML deepdiff sh jinja2 git
I changed it to Requires: docopt python3-sqlalchemy python3-PyMySQL python3-pyyaml deepdiff sh python3-jinja2 git (Note: I don't see RPMs for docopt, deepdiff and sh. And I install all python3 RPMs above.)
[root@c910f03c09k18 noarch]# rpm -ivh xcat-inventory-0.1.6-c63.noarch.rpm error: Failed dependencies: deepdiff is needed by xcat-inventory-1:0.1.6-c63.noarch docopt is needed by xcat-inventory-1:0.1.6-c63.noarch sh is needed by xcat-inventory-1:0.1.6-c63.noarch
It kind of confirms that the list of names for "Requires" should be RPM names, not Python package names. docpot, deepdiff and sh have been installed via "pip3 install".
Here are my questions: (1) Why doesn't "rpm -ivh xcat-inventory...rpm" complaint about not having python2-PyySQL RPM on fs2vm100 (RHEL 7.6 with Python 2)? Only Python package MySQL-python is installed there? Again, it gives an impression that Python packages are acceptable for rpm -i or yum install, which seems to be false.
(2) Indeed, we can remove docopt, deepdiff and sh and the "rpm -i" would complete successfully. Casandra, would you please give us information as to why they are included there? You must have identified them as requirements.
(3) If we can remove docopt, deepdiff, then why do we need any of them in the first place?
(4) We have MySQL-python installed as a Python package. We also have python2-PyMySQL installed as a RPM. Do they give out identical content and be put in the same place? More investigation is needed.
It is great that we know more now than yesterday :) .
For question 1, we should be testing the installation and removal using yum and not rpm. yum will attempt to resolve the dependencies required by our rpm, but rpm -i
will either only succeed or fail based on whether the dependencies have already been installed. In the case where you are seeing rpm -i succeed, it is only because the dependencies have already been installed previously.
Example:
# rpm -ivh will not succeed when the dependencies have not yet been installed:
[root@c910f03c09k18 xcat-inventory]# rpm -ivh /root/rpmbuild/RPMS/noarch/xcat-inventory-0.1.6-c63.noarch.rpm
error: Failed dependencies:
python2-PyMySQL is needed by xcat-inventory-1:0.1.6-c63.noarch
python2-jinja2 is needed by xcat-inventory-1:0.1.6-c63.noarch
python2-psycopg2 is needed by xcat-inventory-1:0.1.6-c63.noarch
python2-pyyaml is needed by xcat-inventory-1:0.1.6-c63.noarch
python2-six is needed by xcat-inventory-1:0.1.6-c63.noarch
python2-sqlalchemy >= 0.8.0 is needed by xcat-inventory-1:0.1.6-c63.noarch
# yum install will succeed if it is able to fulfill the dependencies
[root@c910f03c09k18 xcat-inventory]# yum -y install /root/rpmbuild/RPMS/noarch/xcat-inventory-0.1.6-c63.noarch.rpm
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:45:48 ago on Wed 26 Feb 2020 05:25:27 PM EST.
Dependencies resolved.
==============================================================================================================================================================================================
Package Architecture Version Repository Size
==============================================================================================================================================================================================
Installing:
xcat-inventory noarch 1:0.1.6-c63 @commandline 55 k
Installing dependencies:
python2 ppc64le 2.7.16-12.module+el8.1.0+4148+33a50073 local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 109 k
python2-PyMySQL noarch 0.8.0-10.module+el8.1.0+3111+de3f2d8e local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 156 k
python2-babel noarch 2.5.1-9.module+el8.1.0+3111+de3f2d8e local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 4.8 M
python2-jinja2 noarch 2.10-8.module+el8.1.0+3111+de3f2d8e local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 255 k
python2-libs ppc64le 2.7.16-12.module+el8.1.0+4148+33a50073 local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 6.1 M
python2-markupsafe ppc64le 0.23-19.module+el8.1.0+3111+de3f2d8e local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 48 k
python2-pip-wheel noarch 9.0.3-14.module+el8.1.0+3446+c3d52da3 local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 1.2 M
python2-psycopg2 ppc64le 2.7.5-7.module+el8.1.0+3111+de3f2d8e local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 179 k
python2-pytz noarch 2017.2-12.module+el8.1.0+3111+de3f2d8e local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 54 k
python2-pyyaml ppc64le 3.12-16.module+el8.1.0+3111+de3f2d8e local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 184 k
python2-setuptools noarch 39.0.1-11.module+el8.1.0+3446+c3d52da3 local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 643 k
python2-setuptools-wheel noarch 39.0.1-11.module+el8.1.0+3446+c3d52da3 local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 289 k
python2-six noarch 1.11.0-5.module+el8.1.0+3111+de3f2d8e local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 38 k
python2-sqlalchemy ppc64le 1.3.2-1.module+el8.1.0+2994+98e054d6 local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 1.9 M
Installing weak dependencies:
python2-pip noarch 9.0.3-14.module+el8.1.0+3446+c3d52da3 local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 2.0 M
Transaction Summary
==============================================================================================================================================================================================
Install 16 Packages
Total size: 18 M
Total download size: 18 M
Installed size: 78 M
Downloading Packages:
(1/15): python2-2.7.16-12.module+el8.1.0+4148+33a50073.ppc64le.rpm 8.5 MB/s | 109 kB 00:00
(2/15): python2-PyMySQL-0.8.0-10.module+el8.1.0+3111+de3f2d8e.noarch.rpm 11 MB/s | 156 kB 00:00
(3/15): python2-jinja2-2.10-8.module+el8.1.0+3111+de3f2d8e.noarch.rpm 21 MB/s | 255 kB 00:00
(4/15): python2-markupsafe-0.23-19.module+el8.1.0+3111+de3f2d8e.ppc64le.rpm 12 MB/s | 48 kB 00:00
(5/15): python2-babel-2.5.1-9.module+el8.1.0+3111+de3f2d8e.noarch.rpm 49 MB/s | 4.8 MB 00:00
(6/15): python2-pip-wheel-9.0.3-14.module+el8.1.0+3446+c3d52da3.noarch.rpm 51 MB/s | 1.2 MB 00:00
(7/15): python2-psycopg2-2.7.5-7.module+el8.1.0+3111+de3f2d8e.ppc64le.rpm 36 MB/s | 179 kB 00:00
(8/15): python2-pytz-2017.2-12.module+el8.1.0+3111+de3f2d8e.noarch.rpm 17 MB/s | 54 kB 00:00
(9/15): python2-pyyaml-3.12-16.module+el8.1.0+3111+de3f2d8e.ppc64le.rpm 41 MB/s | 184 kB 00:00
(10/15): python2-pip-9.0.3-14.module+el8.1.0+3446+c3d52da3.noarch.rpm 18 MB/s | 2.0 MB 00:00
(11/15): python2-setuptools-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch.rpm 37 MB/s | 643 kB 00:00
(12/15): python2-six-1.11.0-5.module+el8.1.0+3111+de3f2d8e.noarch.rpm 14 MB/s | 38 kB 00:00
(13/15): python2-setuptools-wheel-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch.rpm 20 MB/s | 289 kB 00:00
(14/15): python2-sqlalchemy-1.3.2-1.module+el8.1.0+2994+98e054d6.ppc64le.rpm 57 MB/s | 1.9 MB 00:00
(15/15): python2-libs-2.7.16-12.module+el8.1.0+4148+33a50073.ppc64le.rpm 29 MB/s | 6.1 MB 00:00
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 79 MB/s | 18 MB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : python2-setuptools-wheel-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch 1/16
Installing : python2-pip-wheel-9.0.3-14.module+el8.1.0+3446+c3d52da3.noarch 2/16
Installing : python2-libs-2.7.16-12.module+el8.1.0+4148+33a50073.ppc64le 3/16
Installing : python2-pip-9.0.3-14.module+el8.1.0+3446+c3d52da3.noarch 4/16
Installing : python2-setuptools-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch 5/16
Installing : python2-2.7.16-12.module+el8.1.0+4148+33a50073.ppc64le 6/16
Running scriptlet: python2-2.7.16-12.module+el8.1.0+4148+33a50073.ppc64le 6/16
Installing : python2-PyMySQL-0.8.0-10.module+el8.1.0+3111+de3f2d8e.noarch 7/16
Installing : python2-markupsafe-0.23-19.module+el8.1.0+3111+de3f2d8e.ppc64le 8/16
Installing : python2-psycopg2-2.7.5-7.module+el8.1.0+3111+de3f2d8e.ppc64le 9/16
Installing : python2-pytz-2017.2-12.module+el8.1.0+3111+de3f2d8e.noarch 10/16
Installing : python2-babel-2.5.1-9.module+el8.1.0+3111+de3f2d8e.noarch 11/16
Installing : python2-jinja2-2.10-8.module+el8.1.0+3111+de3f2d8e.noarch 12/16
Installing : python2-pyyaml-3.12-16.module+el8.1.0+3111+de3f2d8e.ppc64le 13/16
Installing : python2-six-1.11.0-5.module+el8.1.0+3111+de3f2d8e.noarch 14/16
Installing : python2-sqlalchemy-1.3.2-1.module+el8.1.0+2994+98e054d6.ppc64le 15/16
Installing : xcat-inventory-1:0.1.6-c63.noarch 16/16
Running scriptlet: xcat-inventory-1:0.1.6-c63.noarch 16/16
Verifying : python2-2.7.16-12.module+el8.1.0+4148+33a50073.ppc64le 1/16
Verifying : python2-PyMySQL-0.8.0-10.module+el8.1.0+3111+de3f2d8e.noarch 2/16
Verifying : python2-babel-2.5.1-9.module+el8.1.0+3111+de3f2d8e.noarch 3/16
Verifying : python2-jinja2-2.10-8.module+el8.1.0+3111+de3f2d8e.noarch 4/16
Verifying : python2-libs-2.7.16-12.module+el8.1.0+4148+33a50073.ppc64le 5/16
Verifying : python2-markupsafe-0.23-19.module+el8.1.0+3111+de3f2d8e.ppc64le 6/16
Verifying : python2-pip-9.0.3-14.module+el8.1.0+3446+c3d52da3.noarch 7/16
Verifying : python2-pip-wheel-9.0.3-14.module+el8.1.0+3446+c3d52da3.noarch 8/16
Verifying : python2-psycopg2-2.7.5-7.module+el8.1.0+3111+de3f2d8e.ppc64le 9/16
Verifying : python2-pytz-2017.2-12.module+el8.1.0+3111+de3f2d8e.noarch 10/16
Verifying : python2-pyyaml-3.12-16.module+el8.1.0+3111+de3f2d8e.ppc64le 11/16
Verifying : python2-setuptools-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch 12/16
Verifying : python2-setuptools-wheel-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch 13/16
Verifying : python2-six-1.11.0-5.module+el8.1.0+3111+de3f2d8e.noarch 14/16
Verifying : python2-sqlalchemy-1.3.2-1.module+el8.1.0+2994+98e054d6.ppc64le 15/16
Verifying : xcat-inventory-1:0.1.6-c63.noarch 16/16
Installed products updated.
Installed:
xcat-inventory-1:0.1.6-c63.noarch python2-pip-9.0.3-14.module+el8.1.0+3446+c3d52da3.noarch
python2-2.7.16-12.module+el8.1.0+4148+33a50073.ppc64le python2-PyMySQL-0.8.0-10.module+el8.1.0+3111+de3f2d8e.noarch
python2-babel-2.5.1-9.module+el8.1.0+3111+de3f2d8e.noarch python2-jinja2-2.10-8.module+el8.1.0+3111+de3f2d8e.noarch
python2-libs-2.7.16-12.module+el8.1.0+4148+33a50073.ppc64le python2-markupsafe-0.23-19.module+el8.1.0+3111+de3f2d8e.ppc64le
python2-pip-wheel-9.0.3-14.module+el8.1.0+3446+c3d52da3.noarch python2-psycopg2-2.7.5-7.module+el8.1.0+3111+de3f2d8e.ppc64le
python2-pytz-2017.2-12.module+el8.1.0+3111+de3f2d8e.noarch python2-pyyaml-3.12-16.module+el8.1.0+3111+de3f2d8e.ppc64le
python2-setuptools-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch python2-setuptools-wheel-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch
python2-six-1.11.0-5.module+el8.1.0+3111+de3f2d8e.noarch python2-sqlalchemy-1.3.2-1.module+el8.1.0+2994+98e054d6.ppc64le
Complete!
# Erase just our rpm using the rpm command, but leave all of the dependencies installed
[root@c910f03c09k18 xcat-inventory]# rpm -e xcat-inventory
# Observe that we can successfully install using rpm because the dependencies are still present
[root@c910f03c09k18 xcat-inventory]# rpm -ivh /root/rpmbuild/RPMS/noarch/xcat-inventory-0.1.6-c63.noarch.rpm
Verifying... ################################# [100%]
Preparing... ################################# [100%]
Updating / installing...
1:xcat-inventory-1:0.1.6-c63 ################################# [100%]
# Erase using yum and observe that the dependencies are also removed
[root@c910f03c09k18 xcat-inventory]# yum -y erase xcat-inventory
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.
Modular dependency problems:
Problem 1: conflicting requests
- nothing provides module(perl:5.26) needed by module perl-DBD-Pg:3.7:8010020190322121805:0d1d6681-0.ppc64le
Problem 2: conflicting requests
- nothing provides module(perl:5.26) needed by module perl-DBD-SQLite:1.58:8010020190322125518:073fa5fe-0.ppc64le
Problem 3: conflicting requests
- nothing provides module(perl:5.26) needed by module perl-DBI:1.641:8010020190322130042:16b3ab4d-0.ppc64le
Dependencies resolved.
==============================================================================================================================================================================================
Package Architecture Version Repository Size
==============================================================================================================================================================================================
Removing:
xcat-inventory noarch 1:0.1.6-c63 @@commandline 249 k
Removing unused dependencies:
python2 ppc64le 2.7.16-12.module+el8.1.0+4148+33a50073 @local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 145 k
python2-PyMySQL noarch 0.8.0-10.module+el8.1.0+3111+de3f2d8e @local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 743 k
python2-babel noarch 2.5.1-9.module+el8.1.0+3111+de3f2d8e @local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 20 M
python2-jinja2 noarch 2.10-8.module+el8.1.0+3111+de3f2d8e @local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 1.2 M
python2-libs ppc64le 2.7.16-12.module+el8.1.0+4148+33a50073 @local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 29 M
python2-markupsafe ppc64le 0.23-19.module+el8.1.0+3111+de3f2d8e @local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 166 k
python2-pip noarch 9.0.3-14.module+el8.1.0+3446+c3d52da3 @local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 8.3 M
python2-pip-wheel noarch 9.0.3-14.module+el8.1.0+3446+c3d52da3 @local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 1.3 M
python2-psycopg2 ppc64le 2.7.5-7.module+el8.1.0+3111+de3f2d8e @local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 689 k
python2-pytz noarch 2017.2-12.module+el8.1.0+3111+de3f2d8e @local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 185 k
python2-pyyaml ppc64le 3.12-16.module+el8.1.0+3111+de3f2d8e @local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 769 k
python2-setuptools noarch 39.0.1-11.module+el8.1.0+3446+c3d52da3 @local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 3.0 M
python2-setuptools-wheel noarch 39.0.1-11.module+el8.1.0+3446+c3d52da3 @local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 339 k
python2-six noarch 1.11.0-5.module+el8.1.0+3111+de3f2d8e @local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 104 k
python2-sqlalchemy ppc64le 1.3.2-1.module+el8.1.0+2994+98e054d6 @local-rhels8.1.0-ppc64le--install-shared_repo-ISOs-rhels8.1.0-ppc64le-AppStream 11 M
Transaction Summary
==============================================================================================================================================================================================
Remove 16 Packages
Freed space: 78 M
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: xcat-inventory-1:0.1.6-c63.noarch 1/16
Erasing : xcat-inventory-1:0.1.6-c63.noarch 1/16
Erasing : python2-jinja2-2.10-8.module+el8.1.0+3111+de3f2d8e.noarch 2/16
Erasing : python2-babel-2.5.1-9.module+el8.1.0+3111+de3f2d8e.noarch 3/16
Erasing : python2-pytz-2017.2-12.module+el8.1.0+3111+de3f2d8e.noarch 4/16
Erasing : python2-markupsafe-0.23-19.module+el8.1.0+3111+de3f2d8e.ppc64le 5/16
Erasing : python2-psycopg2-2.7.5-7.module+el8.1.0+3111+de3f2d8e.ppc64le 6/16
Erasing : python2-pyyaml-3.12-16.module+el8.1.0+3111+de3f2d8e.ppc64le 7/16
Erasing : python2-sqlalchemy-1.3.2-1.module+el8.1.0+2994+98e054d6.ppc64le 8/16
Erasing : python2-PyMySQL-0.8.0-10.module+el8.1.0+3111+de3f2d8e.noarch 9/16
Erasing : python2-six-1.11.0-5.module+el8.1.0+3111+de3f2d8e.noarch 10/16
Erasing : python2-pip-9.0.3-14.module+el8.1.0+3446+c3d52da3.noarch 11/16
Erasing : python2-setuptools-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch 12/16
Erasing : python2-2.7.16-12.module+el8.1.0+4148+33a50073.ppc64le 13/16
Running scriptlet: python2-2.7.16-12.module+el8.1.0+4148+33a50073.ppc64le 13/16
Erasing : python2-libs-2.7.16-12.module+el8.1.0+4148+33a50073.ppc64le 14/16
Erasing : python2-pip-wheel-9.0.3-14.module+el8.1.0+3446+c3d52da3.noarch 15/16
Erasing : python2-setuptools-wheel-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch 16/16
Running scriptlet: python2-setuptools-wheel-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch 16/16
Verifying : python2-2.7.16-12.module+el8.1.0+4148+33a50073.ppc64le 1/16
Verifying : python2-PyMySQL-0.8.0-10.module+el8.1.0+3111+de3f2d8e.noarch 2/16
Verifying : python2-babel-2.5.1-9.module+el8.1.0+3111+de3f2d8e.noarch 3/16
Verifying : python2-jinja2-2.10-8.module+el8.1.0+3111+de3f2d8e.noarch 4/16
Verifying : python2-libs-2.7.16-12.module+el8.1.0+4148+33a50073.ppc64le 5/16
Verifying : python2-markupsafe-0.23-19.module+el8.1.0+3111+de3f2d8e.ppc64le 6/16
Verifying : python2-pip-9.0.3-14.module+el8.1.0+3446+c3d52da3.noarch 7/16
Verifying : python2-pip-wheel-9.0.3-14.module+el8.1.0+3446+c3d52da3.noarch 8/16
Verifying : python2-psycopg2-2.7.5-7.module+el8.1.0+3111+de3f2d8e.ppc64le 9/16
Verifying : python2-pytz-2017.2-12.module+el8.1.0+3111+de3f2d8e.noarch 10/16
Verifying : python2-pyyaml-3.12-16.module+el8.1.0+3111+de3f2d8e.ppc64le 11/16
Verifying : python2-setuptools-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch 12/16
Verifying : python2-setuptools-wheel-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch 13/16
Verifying : python2-six-1.11.0-5.module+el8.1.0+3111+de3f2d8e.noarch 14/16
Verifying : python2-sqlalchemy-1.3.2-1.module+el8.1.0+2994+98e054d6.ppc64le 15/16
Verifying : xcat-inventory-1:0.1.6-c63.noarch 16/16
Installed products updated.
Removed:
xcat-inventory-1:0.1.6-c63.noarch python2-2.7.16-12.module+el8.1.0+4148+33a50073.ppc64le
python2-PyMySQL-0.8.0-10.module+el8.1.0+3111+de3f2d8e.noarch python2-babel-2.5.1-9.module+el8.1.0+3111+de3f2d8e.noarch
python2-jinja2-2.10-8.module+el8.1.0+3111+de3f2d8e.noarch python2-libs-2.7.16-12.module+el8.1.0+4148+33a50073.ppc64le
python2-markupsafe-0.23-19.module+el8.1.0+3111+de3f2d8e.ppc64le python2-pip-9.0.3-14.module+el8.1.0+3446+c3d52da3.noarch
python2-pip-wheel-9.0.3-14.module+el8.1.0+3446+c3d52da3.noarch python2-psycopg2-2.7.5-7.module+el8.1.0+3111+de3f2d8e.ppc64le
python2-pytz-2017.2-12.module+el8.1.0+3111+de3f2d8e.noarch python2-pyyaml-3.12-16.module+el8.1.0+3111+de3f2d8e.ppc64le
python2-setuptools-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch python2-setuptools-wheel-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch
python2-six-1.11.0-5.module+el8.1.0+3111+de3f2d8e.noarch python2-sqlalchemy-1.3.2-1.module+el8.1.0+2994+98e054d6.ppc64le
Complete!
I thought this looked promising: https://rpm.org/user_doc/boolean_dependencies.html
So I tried to build a package on RHEL8.1 with the following Requires:
(intended to find python-psycopg2
on RHEL7.X and find python2-psycopg2
on RHEL8.X)
Requires: (python-psycopg2 or python2-psycopg2)
Installation succeeded on RHEL8.1, but fails on RHEL7.6:
[root@fs2vm100 xcat-inventory]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.6 (Maipo)
[root@fs2vm100 xcat-inventory]# yum install /tmp/xcat-inventory-0.1.6-c63.noarch.rpm
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Examining /tmp/xcat-inventory-0.1.6-c63.noarch.rpm: 1:xcat-inventory-0.1.6-c63.noarch
Marking /tmp/xcat-inventory-0.1.6-c63.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package xcat-inventory.noarch 1:0.1.6-c63 will be installed
Error: Invalid version flag: or
[root@fs2vm100 xcat-inventory]# rpm --version
RPM version 4.11.3
The problem appears to be that support for boolean dependencies was added with rpm version 4.13, but RHEL7.6 ships with version 4.11.3. Back to the drawing board...
I agree that "yum install" should be used and more convenient since it resolves dependencies too.
I think one point in my Question (1) is that "yum install" or "rpm -i" does not complain about MySQL-python, a Python package, which is not an RPM. In fact, there is no such RPM available with the name MySQL-python. The corresponding RPM is python2-PyMySQL.
Indeed, if we change the name from MySQL-python to python2-PyMySQL, yum should be able to find and install it.
Again, I wonder why there is no complaint when MySQL-python is specified in Requires on the python2 node. It seems to say Python packages are recognized too, but it does not seem to be.
Both MySQL-python
and python2-PyMySql
are valid rpms on RHEL7.6. I think during my experiments I accidentally switched to looking for python2-PyMySql
, but I suspect MySQL-python
is the correct dependency.
[root@fs2vm100 xcat-inventory]# yum -q list MySQL-python
Installed Packages
MySQL-python.ppc64le 1.2.5-1.el7 @local-rhels7.6-ppc64le--install-REPO-os-rhels-7.6-rhels7.6-ga-ppc64le
[root@fs2vm100 xcat-inventory]# yum -q list python2-PyMySql
Installed Packages
python2-PyMySQL.noarch 0.9.2-3.el7 @epel
Can't we just use Dist Tags for this in the spec file? https://docs.fedoraproject.org/en-US/packaging-guidelines/DistTag/#_conditionals
Current xcat-inventory only supports python2. On rhels8.1, python3 is supported. the xcat-inventory depends packages are different on the python3 environment.