Bug 301981

Summary: yumdownloader doesn't resolve mirror URLs correctly
Product: [Fedora] Fedora Reporter: Carl Roth <roth>
Component: yum-utilsAssignee: Seth Vidal <skvidal>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 6CC: pmatilai, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.1.8-1.fc7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-26 18:46:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Carl Roth 2007-09-23 02:36:35 UTC
Description of problem:

yumdownloader isn't able to find RPMS or SRPMS in channels that are configured
using mirror lists.

The URLs it returns are not valid paths to the RPMs in question; it appears to
be dropping the last path element of the mirror URL each time.

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

yum-utils-1.0.3-1.fc6
(I think this bug also affects the FC7 version)

How reproducible:

Always

Steps to Reproduce:
1. yumdownloader --enablerepo=updates --urls kernel
2.
3.
  
Actual results:

Should generate the correct URL!

In this case, the value returned is (for this spin of the mirrors)

 
ftp://mirror.colorado.edu/pub/fedora/linux/core/updates/6/kernel-2.6.22.5-49.fc6.x86_64.rpm

the correct result should be

 
ftp://mirror.colorado.edu/pub/fedora/linux/core/updates/6/x86_64/kernel-2.6.22.5-49.fc6.x86_64.rpm

Expected results:


Additional info:

I think the culprit (or one of the culprits) is the 'urlparse.urljoin' line on
169 of /usr/bin/yumdownloader.  Note that 'urlparse.urljoin' works differently
from 'os.path.join'.  The left-hand argument is *not* assumed to be a directory
path unless it's terminated with a slash character:

  >>> import urlparse
  >>> urlparse.urljoin("a/b", "c")
  'a/c'
  >>> urlparse.urljoin("a/b/", "c")
  'a/b/c'

Comment 1 Tim Lauridsen 2007-09-23 06:47:54 UTC
Thanks,
I have fixed it upstream.

Tim

Comment 2 Fedora Update System 2007-10-24 07:03:54 UTC
yum-utils-1.1.8-1.fc7 has been pushed to the Fedora 7 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-utils'

Comment 3 Fedora Update System 2007-11-26 18:46:20 UTC
yum-utils-1.1.8-1.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.