From peppe at surepay.nl Wed Feb 27 19:49:51 2019 From: peppe at surepay.nl (Peppe Chiesa) Date: Wed, 27 Feb 2019 20:49:51 +0100 Subject: New urlgrabber package is breaking yum functionalities Message-ID: This morning has been released a major updated of urlgrabber package This package is breaking yum functionality when downloading metalink files. How to reproduce it: - on a vanilla centos or docker centos:7 as root when I run the commands: # yum update -y # curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python get-pip.py # yum install -y curl-devel openssl-devel gcc python-devel # pip install six # export PYCURL_SSL_LIBRARY=nss # pip install --upgrade --ignore-installed urlgrabber # yum install -y epel-release # yum search vim The ouput of the yum search is: --- Loaded plugins: fastestmirror, ovl Loading mirror speeds from cached hostfile epel/x86_64/metalink | 28 kB 00:00:00 * base: mirror.serverius.net * epel: ftp.nluug.nl Traceback (most recent call last): File "/usr/bin/yum", line 29, in yummain.user_main(sys.argv[1:], exit_code=True) File "/usr/share/yum-cli/yummain.py", line 375, in user_main errcode = main(args) File "/usr/share/yum-cli/yummain.py", line 184, in main result, resultmsgs = base.doCommands() File "/usr/share/yum-cli/cli.py", line 585, in doCommands return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds) File "/usr/share/yum-cli/yumcommands.py", line 1731, in doCommand return base.search(extcmds) File "/usr/share/yum-cli/cli.py", line 1503, in search for (po, keys, matched_value) in matching: File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 3250, in searchGenerator for sack in self.pkgSack.sacks.values(): File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1075, in pkgSack = property(fget=lambda self: self._getSacks(), File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 778, in _getSacks self.repos.populateSack(which=repos) File "/usr/lib/python2.7/site-packages/yum/repos.py", line 347, in populateSack self.doSetup() File "/usr/lib/python2.7/site-packages/yum/repos.py", line 122, in doSetup self.ayum.plugins.run('prereposetup') File "/usr/lib/python2.7/site-packages/yum/plugins.py", line 188, in run func(conduitcls(self, self.base, conf, **kwargs)) File "/usr/lib/yum-plugins/fastestmirror.py", line 240, in prereposetup_hook repo.setupGrab() File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 603, in setupGrab self._setupGrab() File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 663, in _setupGrab failure_callback=mirror_failure) File "/usr/lib/python2.7/site-packages/urlgrabber/mirror.py", line 288, in __init__ self.mirrors.sort(key=estimate, reverse=True) File "/usr/lib/python2.7/site-packages/urlgrabber/mirror.py", line 282, in estimate speed, fail = _TH.estimate(m['mirror']) File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 2547, in estimate host = urlparse.urlsplit(baseurl).netloc.split(b'@')[-1] or baseurl File "/usr/lib64/python2.7/urlparse.py", line 175, in urlsplit cached = _parse_cache.get(key, None) TypeError: unhashable type: 'dict' If I downgrade urlgrabber to the previous version with the commands: # pip install --upgrade urlgrabber==3.10.2 # yum search vim The output of the yum search is the expected one. -- *Giuseppe Chiesa* *Senior SRE / DevOPS Engineer* peppe at surepay.nl www.surepay.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: