View Issue Details

IDProjectCategoryView StatusLast Update
0005852CentOS-6yumpublic2012-07-19 17:36
Reporterddave1 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
Product Version6.3 
Target VersionFixed in Version 
Summary0005852: yum-plugin-priorities does not exclude obsoletes correctly
DescriptionWhen a repo contains a package that obsoletes one from a repo with higher precedence (lower prio) it is correctly excluded from the list of packages from the repo. When there are other lower versions of the excluded package existing in the same repo these are NOT removed, causing yum to attempt an unnecessary upgrade.
Steps To ReproduceI can observe this through inclusion of the rpmforge-extras (http://wiki.centos.org/AdditionalResources/Repositories/RPMForge) repo having a higher priority than the base repo:

[root@localhost ~]# yum update
Loaded plugins: fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
 * base: mirror01.th.ifl.net
 * epel: mirrors.coreix.net
 * extras: mirror01.th.ifl.net
 * rpmforge: ftp.heanet.ie
 * rpmforge-extras: ftp.heanet.ie
 * updates: mirror01.th.ifl.net
1926 packages excluded due to repository priority protections
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package perl-Compress-Zlib.x86_64 0:2.020-127.el6 will be obsoleted
--> Processing Dependency: perl-Compress-Zlib for package: perl-core-5.10.1-127.el6.x86_64
---> Package perl-IO-Compress.noarch 0:2.037-1.el6.rfx will be obsoleting
--> Processing Dependency: perl(Compress::Raw::Bzip2) = 2.037 for package: perl-IO-Compress-2.037-1.el6.rfx.noarch
--> Processing Dependency: perl(Compress::Raw::Zlib) = 2.037 for package: perl-IO-Compress-2.037-1.el6.rfx.noarch
---> Package perl-IO-Compress-Base.x86_64 0:2.020-127.el6 will be obsoleted
--> Processing Dependency: perl-IO-Compress-Base for package: perl-core-5.10.1-127.el6.x86_64
---> Package perl-IO-Compress-Bzip2.x86_64 0:2.020-127.el6 will be obsoleted
--> Processing Dependency: perl-IO-Compress-Bzip2 for package: perl-core-5.10.1-127.el6.x86_64
---> Package perl-IO-Compress-Zlib.x86_64 0:2.020-127.el6 will be obsoleted
--> Processing Dependency: perl-IO-Compress-Zlib for package: perl-core-5.10.1-127.el6.x86_64
--> Finished Dependency Resolution
Error: Package: perl-core-5.10.1-127.el6.x86_64 (@base)
           Requires: perl-IO-Compress-Base
           Removing: perl-IO-Compress-Base-2.020-127.el6.x86_64 (@base)
               perl-IO-Compress-Base = 2.020-127.el6
           Obsoleted By: perl-IO-Compress-2.037-1.el6.rfx.noarch (rpmforge-extras)
               Not found
Error: Package: perl-IO-Compress-2.037-1.el6.rfx.noarch (rpmforge-extras)
           Requires: perl(Compress::Raw::Zlib) = 2.037
           Installed: 1:perl-Compress-Raw-Zlib-2.020-127.el6.x86_64 (@base)
               perl(Compress::Raw::Zlib) = 2.020
Error: Package: perl-core-5.10.1-127.el6.x86_64 (@base)
           Requires: perl-IO-Compress-Bzip2
           Removing: perl-IO-Compress-Bzip2-2.020-127.el6.x86_64 (@base)
               perl-IO-Compress-Bzip2 = 2.020-127.el6
           Obsoleted By: perl-IO-Compress-2.037-1.el6.rfx.noarch (rpmforge-extras)
               Not found
Error: Package: perl-core-5.10.1-127.el6.x86_64 (@base)
           Requires: perl-IO-Compress-Zlib
           Removing: perl-IO-Compress-Zlib-2.020-127.el6.x86_64 (@base)
               perl-IO-Compress-Zlib = 2.020-127.el6
           Obsoleted By: perl-IO-Compress-2.037-1.el6.rfx.noarch (rpmforge-extras)
               Not found
Error: Package: perl-core-5.10.1-127.el6.x86_64 (@base)
           Requires: perl-Compress-Zlib
           Removing: perl-Compress-Zlib-2.020-127.el6.x86_64 (@base)
               perl-Compress-Zlib = 2.020-127.el6
           Obsoleted By: perl-IO-Compress-2.037-1.el6.rfx.noarch (rpmforge-extras)
               Not found
Error: Package: perl-IO-Compress-2.037-1.el6.rfx.noarch (rpmforge-extras)
           Requires: perl(Compress::Raw::Bzip2) = 2.037
           Installed: perl-Compress-Raw-Bzip2-2.020-127.el6.x86_64 (@base)
               perl(Compress::Raw::Bzip2) = 2.020
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
Additional InformationI have included a patch to be applied to '/usr/lib/yum-plugins/priorities.py' that appears to fix the problem by removing all traces of a obsoleting package requiring exclusion from the package list. Whether this is correct behavior I don't know but it works for me.

The patch applies to the version installed by: yum-plugin-priorities-1.1.30-14.el6.noarch
TagsNo tags attached.

Activities

ddave1

ddave1

2012-07-19 17:36

reporter  

priorities.py.patch (945 bytes)
--- /usr/lib/yum-plugins/priorities.py.old	2012-06-22 13:23:02.000000000 +0100
+++ /usr/lib/yum-plugins/priorities.py	2012-07-19 18:28:02.705413035 +0100
@@ -161,6 +161,12 @@
                                 conduit.delPackage(po)
                                 cnt += 1
                                 conduit.info(3," --> %s from %s excluded (priority)" % (po,po.repoid))
+                                # Remove all occurances of this package
+                                for p in conduit.getPackages(repo):
+                                    if p.name==po.name:
+                                        conduit.delPackage(p)
+                                        cnt += 1
+                                        conduit.info(3," --> %s from %s excluded (priority)" % (p,p.repoid))
                                 break
     if cnt:
         conduit.info(2, '%d packages excluded due to repository priority protections' % cnt)
priorities.py.patch (945 bytes)

Issue History

Date Modified Username Field Change
2012-07-19 17:36 ddave1 New Issue
2012-07-19 17:36 ddave1 File Added: priorities.py.patch