Bug 446248 - yum doesn't tolerate broken mirrorlist in cache
yum doesn't tolerate broken mirrorlist in cache
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
9
All Linux
low Severity low
: ---
: ---
Assigned To: James Antill
Fedora Extras Quality Assurance
:
: 445779 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-13 13:59 EDT by Behdad Esfahbod
Modified: 2014-01-21 18:02 EST (History)
6 users (show)

See Also:
Fixed In Version: 3.2.16-2.fc9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-28 22:37:10 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Behdad Esfahbod 2008-05-13 13:59:08 EDT
I got online in a coffeeshop with wifi that needed web login.
Somehow yum decided to fetch a mirrorlist file and cache it.
The day after, trying to run yum gave me this:

YumRepo Warning: not using ftp, http[s], or file for repos, skipping -  <HTML>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping -         
<HEAD>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping -         
        <TITLE>WLAN - ERA</TITLE>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping -         
        <META http-equiv=Content-Type content="text/html; charset=iso-8859-2">
YumRepo Warning: not using ftp, http[s], or file for repos, skipping -         
        <LINK href="/styles/global.css" type=text/css rel=stylesheet>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping -         
</HEAD>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping -          <!--
YumRepo Warning: not using ftp, http[s], or file for repos, skipping -         
<?xml version="1.0" encoding="UTF-8"?>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - 
<WISPAccessGatewayParam
xsi:noNamespaceSchemaLocation="http://www.erahotspot.pl/roaming/WISPR/WISPAccessGatewayParamSchema.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
YumRepo Warning: not using ftp, http[s], or file for repos, skipping -         
<Redirect>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping -         
        <AccessProcedure>1.0</AccessProcedure>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping -         
        <AccessLocation>12</AccessLocation>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping -         
        <LocationName>ERA:PL</LocationName>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping -         
        <LoginURL>https://www.erahotspot.pl/roaming/WISPR/logon/</LoginURL>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping -         
       
<AbortLoginURL>https://www.erahotspot.pl/roaming/WISPR/abort/</AbortLoginURL>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping -         
        <MessageType>100</MessageType>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping -         
        <ResponseCode>0</ResponseCode>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping -         
</Redirect>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - 
</WISPAccessGatewayParam>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping -          -->
YumRepo Warning: not using ftp, http[s], or file for repos, skipping -         
                <BODY bottomMargin=0 bgColor=#ffffff leftMargin=0 topMargin=0
rightMargin=0 marginheight="0" marginwidth="0"
onload="document.location.href='https://www.erahotspot.pl/pl/zalogowany.jsp'">
YumRepo Warning: not using ftp, http[s], or file for repos, skipping -         
        <CENTER>
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 241, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 116, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 307, in doCommands
    self._getTs()
  File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 98, in _getTs
    self._getTsInfo()
  File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 104, in _getTsInfo
    self._tsInfo.setDatabases(self.rpmdb, self.pkgSack)
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 576, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 419, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.5/site-packages/yum/repos.py", line 245, in populateSack
    sack.populate(repo, mdtype, callback, cacheonly)
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 149, in populate
    if self._check_db_version(repo, mydbtype):
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 203, in
_check_db_version
    return repo._check_db_version(mdtype)
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 928, in
_check_db_version
    repoXML = self.repoXML
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1086, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1078, in _getRepoXML
    self._loadRepoXML(text=self)
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1068, in _loadRepoXML
    return self._groupLoadRepoXML(text, ["primary"])
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1052, in
_groupLoadRepoXML
    if self._commonLoadRepoXML(text):
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 904, in
_commonLoadRepoXML
    result = self._getFileRepoXML(local, text)
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 772, in
_getFileRepoXML
    cache=self.http_caching == 'all')
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 643, in _getFile
    result = self.grab.urlgrab(relative, local,
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 463, in <lambda>
    grab = property(lambda self: self._getgrab())
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 458, in _getgrab
    self._setupGrab()
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 447, in _setupGrab
    self._setupGrab()
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 447, in _setupGrab
    self._grab = mgclass(self._grabfunc, self.urls,
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 548, in <lambda>
    urls = property(fget=lambda self: self._geturls(),
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 545, in _geturls
    self._baseurlSetup()
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 514, in _baseurlSetup
    self.mirrorurls = self._replace_and_check_url(mirrorurls)
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 536, in
_replace_and_check_url
    print 'YumRepo Warning: not using ftp, http[s], or file for repos, skipping
- %s' % (url)
  File "/usr/lib/python2.5/codecs.py", line 303, in write
    data, consumed = self.encode(object, self.errors)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xb6 in position 78: ordinal
not in range(128)





Removing /var/cache/yum/fedora/mirrorlist.txt (that had that HTML in it) fixed it.
Comment 1 James Antill 2008-05-13 14:29:54 EDT
 So I think this would have done the "right" thing if it wasn't for the
encoding/decoding problem ... so if you can reproduce it, it'd be nice to see
what type "url" is on line 536 (I think it's a unicode object, which is screwing
everything up).
 If you can't reproduce it, then we can add some code which will probably fix it.

 Also "yum clean expire-cache" will remove all the mirrorlists (and not much else).
Comment 2 Behdad Esfahbod 2008-05-13 14:41:58 EDT
Tried to reproduce it by modifying mirrorlist, didn't help.  Just protect it and
hopefully will be fixed....
Comment 3 James Antill 2008-05-14 00:55:37 EDT
*** Bug 445779 has been marked as a duplicate of this bug. ***
Comment 4 Fedora Update System 2008-05-16 15:05:45 EDT
yum-3.2.16-1.fc9 has been submitted as an update for Fedora 9
Comment 5 Fedora Update System 2008-05-17 18:23:26 EDT
yum-3.2.16-1.fc9 has been pushed to the Fedora 9 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'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-4076
Comment 6 Fedora Update System 2008-05-18 11:16:53 EDT
yum-3.2.16-2.fc9 has been submitted as an update for Fedora 9
Comment 7 Fedora Update System 2008-05-28 22:36:55 EDT
yum-3.2.16-2.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 8 Fedora Update System 2008-07-09 10:51:13 EDT
yum-3.2.17-1.fc9 has been submitted as an update for Fedora 9
Comment 9 Fedora Update System 2008-07-22 13:28:38 EDT
yum-3.2.17-2.fc8 has been submitted as an update for Fedora 8
Comment 10 Fedora Update System 2008-07-23 22:11:03 EDT
yum-3.2.17-2.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 11 Fedora Update System 2008-08-07 13:17:07 EDT
yum-3.2.18-1.fc8 has been submitted as an update for Fedora 8
Comment 12 Fedora Update System 2008-08-27 14:02:43 EDT
yum-3.2.19-1.fc8 has been submitted as an update for Fedora 8.
http://admin.fedoraproject.org/updates/yum-3.2.19-1.fc8
Comment 13 Fedora Update System 2008-09-10 02:58:58 EDT
yum-3.2.19-3.fc8 has been pushed to the Fedora 8 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.