Bug 484537 - [PATCH] metalink caching is insufficiently robust.
Summary: [PATCH] metalink caching is insufficiently robust.
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-02-08 03:45 UTC by Adam Jackson
Modified: 2014-01-21 23:08 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-02-09 17:27:15 UTC
Type: ---
Embargoed:


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

Description Adam Jackson 2009-02-08 03:45:01 UTC
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 21:38:18 UTC
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 06:35:48 UTC
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 16:53:37 UTC
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 16:58:45 UTC
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 17:27:15 UTC
 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 18:37:02 UTC
Yep, that works.  Thanks!

Comment 7 Artem S. Tashkinov 2009-06-10 05:57:00 UTC
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 13:59:18 UTC
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 19:33:45 UTC
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-30 01:37:22 UTC
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 16:44:35 UTC
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 12:04:50 UTC
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.