Bug 734428 - yum update confused when using priorities
Summary: yum update confused when using priorities
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum-utils
Version: 6.1
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: James Antill
QA Contact: BaseOS QE Security Team
Depends On:
Blocks: 743047
TreeView+ depends on / blocked
Reported: 2011-08-30 11:44 UTC by Marko Myllynen
Modified: 2014-01-21 06:24 UTC (History)
4 users (show)

Fixed In Version: yum-utils-1.1.30-10.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 800528 (view as bug list)
Last Closed: 2011-12-06 17:35:37 UTC

Attachments (Terms of Use)
repository setup files (6.78 KB, application/x-gzip)
2011-09-21 07:23 UTC, Karel Srot
no flags Details

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1703 normal SHIPPED_LIVE yum-utils bug fix and enhancement update 2011-12-06 01:02:31 UTC

Description Marko Myllynen 2011-08-30 11:44:55 UTC
Description of problem:
I'm having an issue at a customer where "yum update" does nothing but "yum update pkg" would update the package as expected.

I'm suspecting this might be related to the fact that the packages are available in local repo and in EPEL, packages from EPEL being least favorable.

I'm attaching a log from "yum -d 9 update" and "yum -d 9 update clamav-db" runs, please let me know if there's any more information you'd like.


Version-Release number of selected component (if applicable):
RHEL 6.1 / yum-3.2.29-17.el6

Comment 3 seth vidal 2011-08-30 13:07:16 UTC

yum --showduplicates list clamav-db

Comment 6 seth vidal 2011-08-30 16:05:18 UTC
if you run:

yum list updates

what do you get?

Comment 8 James Antill 2011-08-30 19:47:00 UTC
 Can you run:

yum --noplugins --showduplicates list clamav-db

...I'm guessing that the latest clamav-db is being excluded, and that is hiding the real update.

Comment 10 seth vidal 2011-08-30 20:26:05 UTC
It's definitely being excluded - you can see that in the first set of debug output. I thought I had fixed this problem before, though. However, it could be a new problem b/c of where the priority plugin is excluding the pkgs.

Comment 11 Karel Srot 2011-09-01 06:42:14 UTC
I am facing same(?) problem on my test system.

I have a package with versions from 1.0-1 to 1.0-4:
  1.0-1 and 1.0-3 in repo3 (priority 20)
  1.0-2 in repo1 (priority 10)
  1.0-4 in repo2 (priority 30)

A) yum doesn't let me to install yum-priorities-test-pkgD-1.0-1 from repo3:

# yum -y install yum-priorities-test-pkgD-1.0-1.noarch

Loaded plugins: priorities, product-id, refresh-packagekit, rhnplugin, subscription-manager
Updating Red Hat repositories.
This system is not registered with RHN.
RHN Satellite or RHN Classic support will be disabled.
8 packages excluded due to repository priority protections
Setting up Install Process
No package yum-priorities-test-pkgD-1.0-1.noarch available.
Error: Nothing to do

B) When I install the 1.0-1 version manually from the repo3, yum ignores the update 1.0-3 from the repo3 and prefers 1.0-2 udpate from repo1 (because of higher priority)

# yum --disablerepo=\* --enablerepo=yum-priorities-test-repo3 install yum-priorities-test-pkgD-1.0-1

# yum update yum-priorities-test-pkgD
Loaded plugins: priorities, product-id, refresh-packagekit, rhnplugin, subscription-manager
Updating Red Hat repositories.
This system is not registered with RHN.
RHN Satellite or RHN Classic support will be disabled.
8 packages excluded due to repository priority protections
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package yum-priorities-test-pkgD.noarch 0:1.0-1 will be updated
---> Package yum-priorities-test-pkgD.noarch 0:1.0-2 will be an update

I don't think this is the correct behavior. I think that priorities plugin should not allow to update package installed from higher priority repo with an update from a lower priority repo. But it should let me to update the package from the install repo (repo3) even if there is another (but older) update in the higher priority repo (repo1).

Comment 12 James Antill 2011-09-01 14:44:13 UTC
 From the documentation in the plugin:

# By default, this plugin excludes packages from lower priority repositories
# based on the package name. If you want to exclude packages based ony the
# package name and architecture, enable the 'only_samearch' bool:
# only_samearch=N
# You can add priorities to repositories, by adding the line:
# priority=N
# to the repository entry, where N is an integer number. The default
# priority for repositories is 99. The repositories with the lowest
# number have the highest priority.

...so what should be happening is that when you have all three repos. enabled yum will hide everything except 1.0-2.

Comment 13 Marko Myllynen 2011-09-07 09:18:24 UTC
FWIW, while "yum update" doesn't update anything PackageKit-yum-plugin notices the updated packages and suggests to install them.

Comment 14 Karel Srot 2011-09-07 10:29:08 UTC
Thank you. I have finally reproduced this bug. 
Interesting thing is that the update is failing just because the available update in epel (low priority) repo. It works for me when I disable it.

Comment 17 James Antill 2011-09-20 20:02:56 UTC
 So I've created:


...and I've tried a bunch of stuff, but AFAICS everything is working. Given both you and a customer have hit it ... I'm guessing I'm missing something (maybe the repos. need to be in a certain order -- although I did try a few variants).

Comment 18 Karel Srot 2011-09-21 07:23:31 UTC
Created attachment 524144 [details]
repository setup files

Did some more tests... Bug appears only with check_obsoletes=1 in priorities.conf.
This is strange because I do not have any extra obsoletes defined in my test packages.

A have attached the archive with my repo setup. There are 3 repo directories, each contains spec files of packages that will be built and included in the directory.

1. install yum-plugin-priorities
2. echo -e '[main]\nenabled = 1' > /etc/yum/pluginconf.d/priorities.conf
3. extract the archive to /tmp/testrepo
4. # cp /tmp/testrepo/yum-priorities-test.repo /etc/yum.repos.d/
5. # yum -y install yum-priorities-test-pkgB-1.0-1
6. # yum list updates
now 1.0-2 update is listed
7. # echo 'check_obsoletes=1' >> /etc/yum/pluginconf.d/priorities.conf
8. # yum list updates
now 1.0-2 update is not listed
9. # yum --disablerepo=yum-priorities-test-repo2 list updates
now 1.0-2 update is listed again

yum-priorities-test-repo2 (lowest priority) contains just yum-priorities-test-pkgB-1.0-3 built using following spec file.

# cat yum-priorities-test-pkgB.spec
Summary: yum-priorities-test-pkgB Package
Name: yum-priorities-test-pkgB
Version: 1.0
Release: 3
Group: System Environment/Base
License: GPL
BuildArch: noarch
Provides: yum-priorities-test-pkgB


This is a yum-priorities-test-pkgB test package created by make_dummy_package.sh script


Comment 29 errata-xmlrpc 2011-12-06 17:35:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.