Bug 484537 - [PATCH] metalink caching is insufficiently robust.
[PATCH] metalink caching is insufficiently robust.
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-02-07 22:45 EST by Adam Jackson
Modified: 2014-01-21 18:08 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-02-09 12:27:15 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
metalink-hack.patch (2.46 KB, patch)
2009-02-07 22:45 EST, Adam Jackson
no flags Details | Diff
metalink-hack.patch (2.50 KB, patch)
2009-02-08 16:38 EST, Adam Jackson
no flags Details | Diff

  None (edit)
Description Adam Jackson 2009-02-07 22:45:01 EST
Created attachment 331222 [details]
metalink-hack.patch

Description of problem:

Upgraded from just-past-f10ish to current rawhide.  Rebooted.  Afterwards, tried to install something, and was told:

File //var/cache/yum/rawhide/metalink.xml does not exist

'yum clean all' and retrying made that go away.  Afterwards, if I manually rm that file, I get the same error.  Probably the cache logic is not checking for that file?  Or assuming that the existence of repomd.xml means metalink.xml should exist too?  At any rate, it'll break the first update after 10->11 upgrade I suspect.

Attached patch makes it wfm, but I make no claims as to correctness or good taste.

Version-Release number of selected component (if applicable):

yum-3.2.21-8.fc11.noarch
Comment 1 Adam Jackson 2009-02-08 16:38:18 EST
Created attachment 331254 [details]
metalink-hack.patch

Previous patch was broken, the download result would just get thrown away.  So it'd work if you had no metalink data, but not if you did.  Oops.

Still not claiming it's correct, of course.
Comment 2 James Antill 2009-02-09 01:35:48 EST
metalinkCurrent already checks this, and I just checked it and it works ... if run in cache-only mode (as user) it doesn't need it, if run as root yum downloads a new metalink.

Did you not have a network or something?

Can you paste terminal output of it failing?
Comment 3 Adam Jackson 2009-02-09 11:53:37 EST
Definitely have network, definitely running as root (well, sudo, but same thing).

After deleting metalink.xml:

synephrine:~% sudo yum install xrestop
Loaded plugins: dellsysidplugin2, refresh-packagekit
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package xrestop.x86_64 0:0.4-5.fc10 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package          Arch            Version                Repository        Size
================================================================================
Installing:
 xrestop          x86_64          0.4-5.fc10             rawhide           19 k

Transaction Summary
================================================================================
Install      1 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)         

Total download size: 19 k
Is this ok [y/N]: y
Downloading Packages:


File //var/cache/yum/rawhide/metalink.xml does not exist
synephrine:~%
Comment 4 James Antill 2009-02-09 11:58:45 EST
ha ... ok, thanks ... having the fastestmirror plugin enabled makes the bug go away, my bad. I'll fix.
Comment 5 James Antill 2009-02-09 12:27:15 EST
 Ok, this is fixed upstream in commit:

510e9d47f9e5892a22f634fecbc5578fc7bd4d5c

...confirmation would be nice, but we both know I'm infallible ;).
Comment 6 Adam Jackson 2009-02-09 13:37:02 EST
Yep, that works.  Thanks!
Comment 7 Artem S. Tashkinov 2009-06-10 01:57:00 EDT
Bad: Yum in Fedora 11 still doesn't include this patch or it is NOT working.

Pity!

yum install subversion-devel                
Loaded plugins: dellsysidplugin2, downloadonly                 
Excluding Packages in global exclude list                      
Finished                                                       
Setting up Install Process                                     
Resolving Dependencies                                         
--> Running transaction check                                  
---> Package subversion-devel.i586 0:1.6.1-5.fc11 set to be updated
--> Processing Dependency: subversion = 1.6.1-5.fc11 for package: subversion-devel-1.6.1-5.fc11.i586
--> Processing Dependency: libsvn_wc-1.so.0 for package: subversion-devel-1.6.1-5.fc11.i586         
--> Processing Dependency: libsvn_repos-1.so.0 for package: subversion-devel-1.6.1-5.fc11.i586      
--> Processing Dependency: libsvn_fs_base-1.so.0 for package: subversion-devel-1.6.1-5.fc11.i586    
--> Processing Dependency: libsvn_ra_neon-1.so.0 for package: subversion-devel-1.6.1-5.fc11.i586    
--> Processing Dependency: libsvn_fs_fs-1.so.0 for package: subversion-devel-1.6.1-5.fc11.i586      
--> Processing Dependency: libsvn_delta-1.so.0 for package: subversion-devel-1.6.1-5.fc11.i586      
--> Processing Dependency: libsvn_ra-1.so.0 for package: subversion-devel-1.6.1-5.fc11.i586         
--> Processing Dependency: libsvn_subr-1.so.0 for package: subversion-devel-1.6.1-5.fc11.i586       
--> Processing Dependency: libsvn_ra_svn-1.so.0 for package: subversion-devel-1.6.1-5.fc11.i586     
--> Processing Dependency: libsvn_diff-1.so.0 for package: subversion-devel-1.6.1-5.fc11.i586       
--> Processing Dependency: libsvn_fs_util-1.so.0 for package: subversion-devel-1.6.1-5.fc11.i586    
--> Processing Dependency: libsvn_ra_local-1.so.0 for package: subversion-devel-1.6.1-5.fc11.i586   
--> Processing Dependency: libsvn_fs-1.so.0 for package: subversion-devel-1.6.1-5.fc11.i586         
--> Processing Dependency: libsvn_client-1.so.0 for package: subversion-devel-1.6.1-5.fc11.i586     
--> Running transaction check                                                                       
---> Package subversion.i586 0:1.6.1-5.fc11 set to be updated                                       
--> Finished Dependency Resolution                                                                  

Dependencies Resolved

==============================================================================================================================================================
 Package                                     Arch                            Version                                 Repository                          Size 
==============================================================================================================================================================
Installing:                                                                                                                                                   
 subversion-devel                            i586                            1.6.1-5.fc11                            updates                            271 k 
Installing for dependencies:                                                                                                                                  
 subversion                                  i586                            1.6.1-5.fc11                            updates                            3.0 M 

Transaction Summary
==============================================================================================================================================================
Install      2 Package(s)                                                                                                                                     
Update       0 Package(s)                                                                                                                                     
Remove       0 Package(s)                                                                                                                                     

Total download size: 3.3 M
Is this ok [y/N]: y       
Downloading Packages:     


File /var/cache/yum/updates/metalink.xml does not exist.

(Here yum has aborted).
Comment 8 James Antill 2009-06-13 09:59:18 EDT
Ok, this is to do with the mirrorlist as metalink ... it should have fixed itself now, but this patch will fix it:

diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 94e352c..2f67752 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -821,6 +821,7 @@ class YumRepository(Repository, config.RepoConf):
         else return False. This result is cached, so that metalink/repomd.xml
         are synchronized."""
         if self._metadataCurrent is None:
+            self._hack_mirrorlist_for_anaconda()
             mlfn = self.cachedir + '/' + 'metalink.xml'
             if self.metalink and not os.path.exists(mlfn):
                 self._metadataCurrent = False
Comment 9 Fedora Update System 2009-09-03 15:33:45 EDT
yum-3.2.24-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/yum-3.2.24-1.fc11
Comment 10 Fedora Update System 2009-09-29 21:37:22 EDT
yum-3.2.24-2.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 11 Fedora Update System 2009-10-19 12:44:35 EDT
yum-3.2.24-2.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/yum-3.2.24-2.fc10
Comment 12 Fedora Update System 2009-11-04 07:04:50 EST
yum-3.2.24-2.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

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