Red Hat Bugzilla – Bug 166930
up2date doesn't support password-protected yum sources
Last modified: 2013-02-26 19:49:45 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050720 Fedora/1.0.6-1.1.fc4 Firefox/1.0.6
Description of problem:
up2date in RHEL 4 supports yum repositories (great!), but not when they are password-protected, though yum itself does (oh no!).
urllib2 supports protected directories, and it just takes a few extra lines to set it up. yum itself use urllib2, so the code could easily be borrowed.
Anyway, it would be very nice if one could use password-protected yum repositories with up2date just as with yum. As-is, we have to install yum alongside up2date (and lose the ability to resolve dependencies automatically, since yum doesn't have access to the RHEL repository).
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Setup a yum source that includes a user:pass like so:
2. Run up2date -i some-package
Actual Results: An invalid port error. Specifically:
Traceback (most recent call last):
File "/usr/sbin/up2date", line 1252, in ?
sys.exit(main() or 0)
File "/usr/sbin/up2date", line 800, in main
File "/usr/sbin/up2date", line 1121, in batchRun
File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 65, in init
File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 103, in __findPackagesToUpdate
File "/usr/share/rhn/up2date_client/packageList.py", line 160, in addGlobs
availList = rhnPackageInfo.getAvailablePackageList()
File "/usr/share/rhn/up2date_client/rhnPackageInfo.py", line 219, in getAvailablePackageList
package_list = availablePackageList(
File "/usr/share/rhn/up2date_client/rhnPackageInfo.py", line 153, in availablePackageList
progressCallback = progressCallback)
File "/usr/share/rhn/up2date_client/rpcServer.py", line 309, in doCall
ret = apply(method, args, kwargs)
File "/usr/share/rhn/up2date_client/repoDirector.py", line 20, in listPackages return self.handlers[channel['type']].listPackages(channel, msgCallback, progressCallback)
File "/usr/share/rhn/up2date_client/rpmSource.py", line 229, in listPackages
File "/usr/share/rhn/up2date_client/repoBackends/yumRepo.py", line 207, in listPackages
agent = "Up2date %s/Yum" % up2dateUtils.version())
File "/usr/share/rhn/up2date_client/repoBackends/urlUtils.py", line 324, in fetchUrl
File "/usr/share/rhn/up2date_client/repoBackends/urlUtils.py", line 117, in open_resource
File "/usr/lib/python2.3/urllib2.py", line 326, in open
File "/usr/lib/python2.3/urllib2.py", line 306, in _call_chain
result = func(*args)
File "/usr/lib/python2.3/urllib2.py", line 901, in http_open
return self.do_open(httplib.HTTP, req)
File "/usr/lib/python2.3/urllib2.py", line 860, in do_open
h = http_class(host) # will parse host:port
File "/usr/lib/python2.3/httplib.py", line 1009, in __init__
self._setup(self._connection_class(host, port, strict))
File "/usr/lib/python2.3/httplib.py", line 507, in __init__
File "/usr/lib/python2.3/httplib.py", line 518, in _set_hostport
raise InvalidURL("nonnumeric port: '%s'" % host[i+1:])
httplib.InvalidURL: nonnumeric port: 'firstname.lastname@example.org'
Expected Results: Successful package installation.
Thank you for submitting this issue for consideration in Red Hat Enterprise Linux. The release for which you requested us to review is now End of Life.
Please See https://access.redhat.com/support/policy/updates/errata/
If you would like Red Hat to re-consider your feature request for an active release, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.