ius-coredev team mailing list archive
-
ius-coredev team
-
Mailing list archive
-
Message #00007
[Bug 453543] Re: Dependency resolution issues
http://yum.baseurl.org/ticket/296
---
The following is the Yum feature request added upstream
---
An issue exists with compare_providers if the packages that provide a
dependency do not have the same name. For example:
root@el5-x86_64 ~]# rpm -qa | grep php
php53-5.3.0-5.ius
php53-common-5.3.0-5.ius
php53-cli-5.3.0-5.ius
root@el5-x86_64 ~]# yum install cacti
In this situation, the following is true based on the repos available:
* cacti requires php-mysql, php-snmp
* php53-mysql provides php-mysql, php53-snmp provides php-snmp
* php-mysql provides php-mysql, php-snmp provides php-snmp (stock rhel packages)
That said, Yum resolves the dependency with stock php-mysql, and php-
snmp even though php53 is installed and php53-mysql/php53-snmp are
available. This happens because compare_providers does not compare
versions if the package name is different, and php-mysql/php-snmp are
the shortest package names so they win out.
I propose an additional check to add to compare providers to accommodate
the comparison of different package names that provide the same
dependency, based on whether that provider's sourcerpm is already
installed. Meaning, if the providers source rpm is already installed and
provides the dependency then it should be awarded points.
This might sound expensive, but the only expensive part is generating
the self.installedSourceRPMS list (which is only once). The per pkg
operation is simply a 'if po.sourcerpm in self.installedSourceRPMS'
check.
Patch against latest git checkout attached.
--
Dependency resolution issues
https://bugs.launchpad.net/bugs/453543
You received this bug notification because you are a member of IUS Core
Development, which is subscribed to IUS Community Project.
Status in IUS Community Project: Confirmed
Bug description:
[root@centos5-2 ~]# rpm -qa | grep php
php52-common-5.2.11-1.1.ius.el5
php52-cli-5.2.11-1.1.ius.el5
php52-5.2.11-1.1.ius.el5
[root@centos5-2 ~]# yum repolist
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
* epel: mirrors.tummy.com
* base: mirror.5ninesolutions.com
* updates: mirror.raystedman.net
* addons: www.cyberuse.com
* ius: dl.iuscommunity.org
* extras: www.cyberuse.com
epel | 3.4 kB 00:00
base | 1.1 kB 00:00
updates | 951 B 00:00
addons | 951 B 00:00
ius | 1.9 kB 00:00
primary.sqlite.bz2 | 105 kB 00:00
extras | 1.1 kB 00:00
repo id repo name status
addons CentOS-5 - Addons enabled : 0
base CentOS-5 - Base enabled : 3272
epel Extra Packages for Enterprise Linux 5 - enabled : 4469
extras CentOS-5 - Extras enabled : 288
ius IUS Community Packages for Enterprise Li enabled : 187
updates CentOS-5 - Updates enabled : 700
repolist: 8916
[root@centos5-2 ~]# yum install cacti
...output snipped...
Resolving Dependencies
--> Running transaction check
---> Package cacti.noarch 0:0.8.7e-1.el5 set to be updated
--> Processing Dependency: php-mysql for package: cacti
--> Processing Dependency: php-snmp for package: cacti
--> Running transaction check
---> Package php-mysql.x86_64 0:5.1.6-23.el5 set to be updated
--> Processing Dependency: php-common = 5.1.6-23.el5 for package: php-mysql
--> Processing Dependency: php-pdo for package: php-mysql
---> Package php-snmp.x86_64 0:5.1.6-23.el5 set to be updated
--> Running transaction check
---> Package php-common.x86_64 0:5.1.6-23.el5 set to be updated
---> Package php-pdo.x86_64 0:5.1.6-23.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
====================================================================================================
Package Arch Version Repository Size
====================================================================================================
Installing:
cacti noarch 0.8.7e-1.el5 epel 2.1 M
Installing for dependencies:
php-common x86_64 5.1.6-23.el5 base 154 k
php-mysql x86_64 5.1.6-23.el5 base 87 k
php-pdo x86_64 5.1.6-23.el5 base 64 k
php-snmp x86_64 5.1.6-23.el5 base 29 k
Transaction Summary
====================================================================================================
Install 5 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 2.5 M
Is this ok [y/N]:
References