Bug 577497 - 3.2.27+ does range requests for new updateinfo
Summary: 3.2.27+ does range requests for new updateinfo
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 585696 (view as bug list)
Depends On:
Blocks: 582357
TreeView+ depends on / blocked
 
Reported: 2010-03-27 15:05 UTC by James Antill
Modified: 2014-01-21 23:14 UTC (History)
8 users (show)

Fixed In Version: yum-3.2.27-3.fc12
Clone Of:
: 582357 (view as bug list)
Environment:
Last Closed: 2010-04-16 23:31:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description James Antill 2010-03-27 15:05:20 UTC
Description of problem:
 This is likely due to us turning reget on for metadata, and updateinfo not being unique filenamed.
 But I just tried to get updateinfo for F12 and got pages of:

http://ftp.ussg.iu.edu/linux/fedora/linux/updates/testing/12/i386/repodata/updateinfo.xml.gz: [Errno 14] HTTP Error 416 : http://ftp.ussg.iu.edu/linux/fedora/linux/updates/testing/12/i386/repodata/updateinfo.xml.gz 
Trying other mirror.
http://mirrordenver.fdcservers.net/fedora/updates/testing/12/i386/repodata/updateinfo.xml.gz: [Errno 14] HTTP Error 416 : http://mirrordenver.fdcservers.net/fedora/updates/testing/12/i386/repodata/updateinfo.xml.gz 
Trying other mirror.
http://astromirror.uchicago.edu/fedora/linux/updates/testing/12/i386/repodata/updateinfo.xml.gz: [Errno 14] HTTP Error 416 : http://astromirror.uchicago.edu/fedora/linux/updates/testing/12/i386/repodata/updateinfo.xml.gz 
Trying other mirror.


...both updates and updates-testing updateinfo are called just "updateinfo.xml.gz", so I assume I had an old version ... this didn't go away with a "clean expire-cache" so likely there is a bug there, but we should also do the thing we do for pkg downloads Eg. if local_size >= remote_size then unlink().

Comment 1 seth vidal 2010-03-30 15:43:04 UTC
hmm - having them just called updateinfo.xml.gz is a bug, imo. There's no reason for that anymore as "modern" createrepo's can make the sha-names for modifyrepo'd metadata.

I agree on the fix but I think we can aslo make this other problem stop.

Comment 2 Andre Costa 2010-04-04 15:37:05 UTC
I'm not sure it's related, but I'm getting error 416 consitently with 'google-chrome' and 'virtualbox' repos -- and apparently only with them:

yum search yum
Loaded plugins: presto, refresh-packagekit
http://dl.google.com/linux/rpm/stable/x86_64/repodata/primary.xml.gz: [Errno 14] HTTP Error 416 : http://dl.google.com/linux/rpm/stable/x86_64/repodata/primary.xml.gz 
Trying other mirror.
Error: failure: repodata/primary.xml.gz from google-chrome: [Errno 256] No more mirrors to try.


yum --disablerepo=google-chrome search yum
Loaded plugins: presto, refresh-packagekit
http://download.virtualbox.org/virtualbox/rpm/fedora/12/x86_64/repodata/primary.xml.gz: [Errno 14] HTTP Error 416 : http://download.virtualbox.org/virtualbox/rpm/fedora/12/x86_64/repodata/primary.xml.gz 
Trying other mirror.
Error: failure: repodata/primary.xml.gz from virtualbox: [Errno 256] No more mirrors to try.


yum --disablerepo=google-chrome --disablerepo=virtualbox search yum
Loaded plugins: presto, refresh-packagekit
================================= Matched: yum =================================
yum-NetworkManager-dispatcher.noarch : NetworkManager script which tells yum to
                                     : check it's cache on network change
...

This is making it painful to use yum. Any chance this gets fixed soon?

Comment 3 James Antill 2010-04-05 15:00:10 UTC
Can you try this patch? It'd be against "/usr/lib*/python2.6/site-packages/yum/yumRepo.py"

commit 4205d44ccb9d823b2ff71f39cde0e0a59d006d3f
Author: James Antill <james>
Date:   Wed Mar 31 00:12:09 2010 -0400

    Should work around the reget MD problems

diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 8d7617e..b67b897 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -1552,9 +1552,17 @@ class YumRepository(Repository, config.RepoConf):
         try:
             checkfunc = (self.checkMD, (mdtype,), {})
             text = "%s/%s" % (self.id, mdtype)
+            if thisdata.size is None:
+                reget = None
+            else:
+                reget = 'simple'
+                if os.path.exists(local):
+                    if os.stat(local).st_size >= int(thisdata.size):
+                        misc.unlink_f(local)
             local = self._getFile(relative=remote,
                                   local=local, 
                                   copy_local=1,
+                                  reget=reget,
                                   checkfunc=checkfunc, 
                                   text=text,
                                   cache=self.http_caching == 'all',

...also Andre, do you know about spot's Chromium repo: http://fedorapeople.org/~spot/chromium/

Comment 4 James Antill 2010-04-05 15:00:58 UTC
Oh, and in case it wasn't obvious "yum clean metadata" will work around the problem too.

Comment 5 Andre Costa 2010-04-06 13:47:36 UTC
Hi James,

(In reply to comment #4)
> Oh, and in case it wasn't obvious "yum clean metadata" will work around the
> problem too.    

unfortunately, it doesn't help (I had tried it):

shadow ~ sudo yum clean metadata
Loaded plugins: presto, refresh-packagekit
35 metadata files removed
18 sqlite files removed
0 metadata files removed

shadow ~ yum search gimp
Loaded plugins: presto, refresh-packagekit
http://dl.google.com/linux/rpm/stable/x86_64/repodata/primary.xml.gz: [Errno 14] HTTP Error 416 : http://dl.google.com/linux/rpm/stable/x86_64/repodata/primary.xml.gz 
Trying other mirror.
Error: failure: repodata/primary.xml.gz from google-chrome: [Errno 256] No more mirrors to try.

shadow ~ sudo yum upgrade
Loaded plugins: presto, refresh-packagekit
fedora/metalink                                          | 2.4 kB     00:00     
fedora                                                   | 4.2 kB     00:00     
fedora/primary_db                                        |  12 MB     00:35     
google-chrome                                            |  951 B     00:00     
google-chrome/primary                                    | 1.9 kB     00:00     
google-chrome                                                               4/4
rpmfusion-free                                           | 3.8 kB     00:00     
rpmfusion-free/primary_db                                | 344 kB     00:01     
rpmfusion-free-updates                                   | 3.3 kB     00:00     
rpmfusion-free-updates/primary_db                        | 328 kB     00:02     
rpmfusion-nonfree                                        | 3.3 kB     00:00     
rpmfusion-nonfree/primary_db                             |  91 kB     00:00     
rpmfusion-nonfree-updates                                | 2.8 kB     00:00     
rpmfusion-nonfree-updates/primary_db                     |  73 kB     00:00     
updates/metalink                                         | 2.4 kB     00:00     
updates                                                  | 4.4 kB     00:00     
updates/primary_db                                       | 4.8 MB     00:15     
virtualbox                                               |  951 B     00:00     
virtualbox/primary                                       | 2.8 kB     00:00     
virtualbox                                                                  7/7
Setting up Upgrade Process
No Packages marked for Update

shadow ~ yum search gimp
Loaded plugins: presto, refresh-packagekit
http://dl.google.com/linux/rpm/stable/x86_64/repodata/primary.xml.gz: [Errno 14] HTTP Error 416 : http://dl.google.com/linux/rpm/stable/x86_64/repodata/primary.xml.gz 
Trying other mirror.
Error: failure: repodata/primary.xml.gz from google-chrome: [Errno 256] No more mirrors to try.

As for Chromium, I used to use it before official Google packages came in (also Chromium packages stalled for a while). I might give it another try, though.

Comment 6 Andre Costa 2010-04-06 13:50:27 UTC
(In reply to comment #3)
> Can you try this patch? It'd be against
> "/usr/lib*/python2.6/site-packages/yum/yumRepo.py"

It works! =) I saved your patch as /tmp/yum.patch, went to /usr/lib/python2.6/site-packages/yum and ran

patch -b -p2 /tmp/yum.patch

After that, 'yum search <whatever>' works again! Well done =)

Please, please, merge it to production code ASAP ;-)

Comment 7 seth vidal 2010-04-06 13:55:25 UTC
so if you run yum clean metadata as the same user you're running the search as - then it will work.

Comment 8 Andre Costa 2010-04-06 15:13:30 UTC
Ops, sorry for the noise, I confess I didn't know there were different metadata for each user ={ I just tested it with the unpatched yumRepo.py and it indeed works.

Comment 9 seth vidal 2010-04-09 14:18:27 UTC
And this should be in yum-3.2.27-3 for f12 and f13 - currently only in koji - will soon be in updates-testing

Comment 10 Fedora Update System 2010-04-09 14:26:17 UTC
yum-3.2.27-3.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/yum-3.2.27-3.fc12

Comment 11 Fedora Update System 2010-04-09 14:26:22 UTC
yum-3.2.27-3.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/yum-3.2.27-3.fc13

Comment 12 Fedora Update System 2010-04-09 21:06:04 UTC
yum-3.2.27-3.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update yum'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/yum-3.2.27-3.fc13

Comment 13 Fedora Update System 2010-04-10 10:28:35 UTC
yum-3.2.27-3.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update yum'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/yum-3.2.27-3.fc12

Comment 14 Fedora Update System 2010-04-16 23:31:22 UTC
yum-3.2.27-3.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Nicola Soranzo 2010-04-19 13:07:22 UTC
The F12 package needs to be pushed to stable before this bug can be considered CLOSED ERRATA.

Comment 16 Fedora Update System 2010-04-28 01:18:08 UTC
yum-3.2.27-3.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 seth vidal 2010-04-29 18:27:50 UTC
*** Bug 585696 has been marked as a duplicate of this bug. ***


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