Bug 872518

Summary: yum downloads metadata for user when not necessary
Product: Red Hat Enterprise Linux 6 Reporter: Karel Srot <ksrot>
Component: yumAssignee: James Antill <james.antill>
Status: CLOSED ERRATA QA Contact: Patrik Kis <pkis>
Severity: low Docs Contact:
Priority: low    
Version: 6.4CC: ddumas, pkis
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: yum-3.2.29-33.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 872517 Environment:
Last Closed: 2013-02-21 10:12:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Karel Srot 2012-11-02 10:10:41 UTC
Present on RHEL6.3 too

+++ This bug was initially created as a clone of Bug #872517 +++

Description of problem:

when yum is executed by regular user, yum downloads metadata even if the "root" metadata are up-to-date.


[root@server ~]# rpm -q yum
yum-3.2.22-40.el5
[root@server ~]# yum list bash
Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Excluding Packages in global exclude list
Finished
Installed Packages
bash.i386                                         3.2-32.el5                                         installed
[root@server ~]# su - karel
[karel@server ~]$ yum list bash
Loaded plugins: product-id, security, subscription-manager
beaker-client                                                                                           28/28
beaker-harness                                                                                          35/35
qa-tools                                                                                              193/193
rhel-5                                                                                              2518/2518
rhel-5-debug                                                                                        1022/1022
Excluding Packages in global exclude list
Finished
Installed Packages
bash.i386                                         3.2-32.el5                                         installed


Probably fixed upstream with 
http://yum.baseurl.org/gitweb?p=yum.git;a=commitdiff;h=a5e26a78e485

http://yum.baseurl.org/gitweb?p=yum.git;a=commitdiff;h=a5e26a78e485

Comment 2 Karel Srot 2012-11-02 15:12:13 UTC
Tried to manually patched my yum. It helped a bit. The output is not the same, 
probably the 3 lines that makes the difference exist because of creating sqlite db from xml.gz. Don't know why yum doesn't copy that from the "root" metadata.

patched yum:

# yum makecache
# yum list bash
Loaded plugins: security
Installed Packages
bash.x86_64           4.1.2-8.el6              @rhel6.2-server
Available Packages
bash.x86_64           4.1.2-9.el6_2            rhel63-server  

$ yum list bash
Loaded plugins: security
beaker-client                   14/14
google-talkplugin                 1/1
qa    193/193
Installed Packages
bash.x86_64           4.1.2-8.el6              @rhel6.2-server
Available Packages
bash.x86_64           4.1.2-9.el6_2            rhel63-server

Comment 3 James Antill 2012-11-02 15:21:42 UTC
 ACKing the patch, and that it should provide better behaviour (with no regressions) ... but I'm not saying it'll be perfect (Eg. we may still download things we don't really need to, lots of changes have happened upstream to mitigate this and hopefully RHEL-7 will be much better).

Comment 9 errata-xmlrpc 2013-02-21 10:12:59 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.

http://rhn.redhat.com/errata/RHBA-2013-0406.html