Bug 301981 - yumdownloader doesn't resolve mirror URLs correctly
yumdownloader doesn't resolve mirror URLs correctly
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: yum-utils (Show other bugs)
6
All Linux
low Severity medium
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-22 22:36 EDT by Carl Roth
Modified: 2007-11-30 17:12 EST (History)
2 users (show)

See Also:
Fixed In Version: 1.1.8-1.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-26 13:46:25 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Carl Roth 2007-09-22 22:36:35 EDT
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 02:47:54 EDT
Thanks,
I have fixed it upstream.

Tim
Comment 2 Fedora Update System 2007-10-24 03:03:54 EDT
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 13:46:20 EST
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.

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