Once yum3 is removed and yum4 is installed yum-utils should not been there.
- Agreed. But, I have not encountered or tested this scenario yet. From the looks of the install_dnf.sh script and the output, yum is "upgraded" to version 4, but this doesn't look like it will trigger an uninstall of yum/yum-3 dependent RPM's. Perhaps an explicit uninstall of yum followed by the install of yum-4? But it would be nice to output the "incompatible" packages that are going to be removed and not compatible with yum-4/dnf.
And also it should not get installed if yum-3 is not there as it is not suppose to work with yum4.
- Based on your response and my observations, that is what I understand as well. I did find a bug indicating this "yum >=3 with yum < 4" may now be possible with the "with" rich requirement. Perhaps something to look at.
https://bugzilla.redhat.com/show_bug.cgi?id=1389871
https://github.com/rpm-software-management/rpm/issues/159It looks like the rpm version should support it.
# lslpp -l rpm.rte
Fileset Level State Description
----------------------------------------------------------------------------
Path: /usr/lib/objrepos
rpm.rte 4.15.1.3 COMMITTED RPM Package Manager
Path: /etc/objrepos
rpm.rte 4.15.1.3 COMMITTED RPM Package Manager
# rpm --version
RPM version 4.15.1
But I'm not sure about dnf based on the last line of the dnf requirements...
# rpm -qR dnf
/bin/sh
/bin/sh
/bin/sh
/bin/sh
/opt/freeware/bin/python3_32
python3-dnf = 4.2.17-32_1
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(RichDependencies) <= 4.12.0-1
I also tried to determine a list of rpm's that may need to have their yum-3 dependency updated. We can see yum-utils is at the bottom of the list, so at least that's some validation.
Original Message:
Sent: Tue January 25, 2022 12:26 AM
From: SANKET RATHI
Subject: DNF breaks yumdb (and maybe rest of yum-utils?)
Thanks Cory. Now I got your point.
We will look into these issues and fix them.
Once yum3 is removed and yum4 is installed yum-utils should not been there.
And also it should not get installed if yum-3 is not there as it is not suppose to work with yum4.
We will discuss internally and see what is the best way to fix them.
------------------------------
SANKET RATHI
Original Message:
Sent: Mon January 24, 2022 09:14 AM
From: Cory
Subject: DNF breaks yumdb (and maybe rest of yum-utils?)
I understand yum-utils is to work with yum-3.
What I'm trying to say is that I think the yum-utils should have a dependency to also exclude the yum-4 "wrapper" (just looks like a symlink to me). Technically, the way IBM has packaged yum-4, the symlink to dnf meets the requirement, although it should not.
# rpm -qR yum-utilsyum >= 3.2.29/opt/freeware/bin/python2
What is the strategy to handle these packages that depend on yum or dnf, but are incompatible with the other?
Having them co-mingled in the same repo is very confusing. Not having proper dependencies will lead to errors.
------------------------------
Cory
Original Message:
Sent: Mon January 24, 2022 04:38 AM
From: SANKET RATHI
Subject: DNF breaks yumdb (and maybe rest of yum-utils?)
yum-utils is a package for yum-3 once you migrate to dnf it is recommended that you use dnf.
There is yum wrapper provided for dnf called yum-4 but yum-utils does not work with that.
------------------------------
SANKET RATHI
Original Message:
Sent: Fri January 21, 2022 05:46 PM
From: Cory
Subject: DNF breaks yumdb (and maybe rest of yum-utils?)
Hi Jan
I have not, as the server is still AIX 7.1
# oslevel -s7100-05-08-2114
But even following some of the steps to see if any apply, I don't see any errors.
# /usr/sbin/updtvpkgPlease wait...# dnf check#
But going further down the "yum-utils dependency" trail, we see that yum-utils has a dependency on yum version 3.2.29+, but the installed yum is just a symlink.
# rpm -qR yum-utilsyum >= 3.2.29/opt/freeware/bin/python2# which yum/opt/freeware/bin/yum# yum --version4.2.17 Installed: dnf-0:4.2.17-32_1.noarch at Thu Oct 14 12:32:39 2021 Built : IBM AIX Toolbox <https://ibm.biz/AIXToolbox> at Wed Jul 21 08:42:32 2021# rpm -q yumyum-4.2.17-32_1.noarch# ls -l /opt/freeware/bin/yumlrwxrwxrwx 1 root system 5 Oct 14 08:32 /opt/freeware/bin/yum -> dnf-3
I just feel like there is a missing "yum < 4" dependency for the yum-utils package.
We can see yum-4.2.17-32_1.aix7.1.noarch.rpm is coming from the dnf_bundle, only providing the yum -> dnf-3 symlink, and not advertised in the rpm repo.
# tar -tvf dnf_bundle_aix_71_72.tar |grep yum-rw------- 0 0 9188 Jul 21 07:10:25 2021 yum-4.2.17-32_1.aix7.1.noarch.rpm# rpm -qlp yum-4.2.17-32_1.aix7.1.noarch.rpm/opt/freeware/bin/yum# dnf --showduplicates list yumLast metadata expiration check: 4:27:50 ago on Fri Jan 21 12:13:47 2022.Available Packagesyum.noarch 3.4.3-1 AIX_Toolbox yum.noarch 3.4.3-1 AIX_Toolbox_noarchyum.noarch 3.4.3-1 AIX_Toolbox_ppc yum.noarch 3.4.3-2 AIX_Toolbox_noarchyum.noarch 3.4.3-3 AIX_Toolbox_noarchyum.noarch 3.4.3-4 AIX_Toolbox_noarchyum.noarch 3.4.3-5 AIX_Toolbox_noarchyum.noarch 3.4.3-6 AIX_Toolbox_noarchyum.noarch 3.4.3-7 AIX_Toolbox_noarchyum.noarch 3.4.3-8 AIX_Toolbox_noarch
Or maybe some other option? I'm just not sure, as the best solution requires a better understanding of other activities happening during the YUM to DNF migration.
NOTE: But even with uninstalling the yum-4 rpm, I worry about accidentally installing yum-3 via a dependency. I wonder if all rpm's in the repo should be checked for yum dependency and updated to require <4 or if there maybe should be a separate repo for YUM and its dependent rpm's vs. DNF.
# dnf remove yum (output omitted)# dnf install yum-utilsLast metadata expiration check: 4:43:48 ago on Fri Jan 21 12:13:47 2022.Dependencies resolved.============================================================================================== Package Architecture Version Repository Size==============================================================================================Installing: yum-utils noarch 1.1.31-2 AIX_Toolbox_noarch 88 kInstalling dependencies: yum noarch 3.4.3-8 AIX_Toolbox_noarch 1.3 MTransaction Summary==============================================================================================Install 2 PackagesTotal size: 1.4 M
In the meantime, I've uninstalled yum-4 and excluded yum at the end of the [main] section in dnf.conf:
# grep -p exclude /opt/freeware/etc/dnf/dnf.conf[main]cachedir=/var/cache/dnfkeepcache=1debuglevel=2logfile=/var/log/dnf.logexactarch=1gpgcheck=1installonly_limit=3clean_requirements_on_remove=Truebest=Trueexclude=yum
This at least generates an error when trying to install a yum dependent rpm:
# dnf install yum-utils Last metadata expiration check: 0:02:03 ago on Fri Jan 21 17:39:33 2022.Error: Problem: package yum-utils-1.1.31-2.noarch requires yum >= 3.2.29, but none of the providers can be installed - cannot install the best candidate for the job - package yum-3.4.3-1.noarch is filtered out by exclude filtering - package yum-3.4.3-2.noarch is filtered out by exclude filtering - package yum-3.4.3-3.noarch is filtered out by exclude filtering - package yum-3.4.3-4.noarch is filtered out by exclude filtering - package yum-3.4.3-5.noarch is filtered out by exclude filtering - package yum-3.4.3-6.noarch is filtered out by exclude filtering - package yum-3.4.3-7.noarch is filtered out by exclude filtering - package yum-3.4.3-8.noarch is filtered out by exclude filtering(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
------------------------------
Cory
Original Message:
Sent: Tue January 18, 2022 09:37 PM
From: Jan Harris
Subject: DNF breaks yumdb (and maybe rest of yum-utils?)
Hi Cory
Have you gone through the following steps yet?
--> AIX migration with DNF
https://community.ibm.com/community/user/power/blogs/sangamesh-mallayya1/2022/01/10/aix-migration-with-dnf
------------------------------
Jan Harris
Original Message:
Sent: Tue January 18, 2022 05:30 PM
From: Cory
Subject: DNF breaks yumdb (and maybe rest of yum-utils?)
After upgrading to DNF, yumdb throws below error:
# yumdb unset from_repoTraceback (most recent call last): File "/usr/sbin/yumdb", line 7, in <module> import yumImportError: No module named yum
We can see that yumdb is a python2 script:
# which yumdb/usr/sbin/yumdb# ls -l /usr/sbin/yumdblrwxrwxrwx 1 root system 29 Jan 7 15:24 /usr/sbin/yumdb -> ../../opt/freeware/sbin/yumdb# head /opt/freeware/sbin/yumdb#!/opt/freeware/bin/python2 -ttimport sysimport optparseimport fnmatchimport yumimport shlexparser = None
On a yum system, I can see a python2.7 yum module
MULTIBOS> find ./opt/ -name "yum*" ..../opt/freeware/lib/python2.7/site-packages/yum
vs. a system running dnf:
# find /opt/freeware/lib* -name "yum*"/opt/freeware/lib/python2.7/site-packages/yum_metadata_parser-1.1.4-py2.7.egg-info/opt/freeware/lib/python2.7/site-packages/yumutils/opt/freeware/lib/python3.7/site-packages/dnf/yum
It looks like the required python2 yum module is packaged with yum:
MULTIBOS> rpm -qf /opt/freeware/lib/python2.7/site-packages/yumyum-3.4.3-7.noarch
So what to do?
I'm pretty sure yum-utils.rpm need to have a dependency of yum.rpm, and thus will be removed with YUM during a migration to DNF.
(Since the github project is marked deprecated).
https://github.com/rpm-software-management/yum-utils
https://github.com/rpm-software-management/yum-utils/blob/master/README
It seems there is no direct yum-utils / yumdb replacement in DNF.
https://bugzilla.redhat.com/show_bug.cgi?id=1227949
https://bugzilla.redhat.com/show_bug.cgi?id=1682969
------------------------------
Cory
------------------------------