Bug 852961 - yum throws an exception when pulling repo name from a repo without an associated configuration file
yum throws an exception when pulling repo name from a repo without an associa...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
18
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Fedora Packaging Toolset Team
Fedora Extras Quality Assurance
:
Depends On:
Blocks: F18Alpha/F18AlphaBlocker F18Alphappc
  Show dependency treegraph
 
Reported: 2012-08-30 01:53 EDT by Tim Flink
Modified: 2014-01-21 18:23 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-31 02:45:16 EDT
Type: Bug
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 Tim Flink 2012-08-30 01:53:57 EDT
Description of problem:
When building an iso with pungi, yum repos are set up without an associated configuration file. With yum >= 3.4.3-36.fc18, the string representation of the repos is pulled directly from the repo's configuration file. If the repo does not have a configuration file, the path is None and and exeption bubbles up, killing the ISO build process.

The following exception is from a ppc DVD build but I was seeing the same thing on x86_64. I don't have that exception on hand but can easily reproduce if needed.

removing /srv/pungi/test, one moment...
Building f18
Pungi:INFO: Adding repo fedora
Pungi:INFO: URL for repo fedora is ['http://ppc.koji.fedoraproject.org/mash/branched-20120829/18-ppc/ppc64/os/']
Pungi:INFO: Adding repo source
Pungi:INFO: URL for repo source is ['http://ppc.koji.fedoraproject.org/mash/branched-20120829/18-ppc/source/SRPMS/']
Pungi:INFO: Adding repo debuginfo
Pungi:INFO: URL for repo debuginfo is ['http://ppc.koji.fedoraproject.org/mash/branched-20120829/18-ppc/ppc64/debug/']
Pungi:INFO: Adding repo localrepo
Pungi:INFO: URL for repo localrepo is ['file:///home/f18-private-packages/']
Pungi:INFO: Getting sacks for arches ['ppc', 'ppc64', 'noarch', 'src']
Traceback (most recent call last):
  File "/usr/bin/pungi", line 256, in <module>
    main()
  File "/usr/bin/pungi", line 96, in main
    mypungi._inityum() # initialize the yum object for things that need it
  File "/usr/lib/python2.7/site-packages/pypungi/__init__.py", line 287, in _inityum
    self.ayum._getSacks(archlist=arches)
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 779, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.7/site-packages/yum/repos.py", line 348, in populateSack
    sack.populate(repo, mdtype, callback, cacheonly)
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 184, in populate
    if self._check_db_version(repo, mydbtype):
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 275, in _check_db_version
    return repo._check_db_version(mdtype)
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1379, in _check_db_version
    repoXML = self.repoXML
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1565, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1561, in _getRepoXML
    self._loadRepoXML(text=self)
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1552, in _loadRepoXML
    return self._groupLoadRepoXML(text, self._mdpolicy2mdtypes())
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1526, in _groupLoadRepoXML
    if self._commonLoadRepoXML(text):
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1350, in _commonLoadRepoXML
    result = self._getFileRepoXML(local, text)
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1128, in _getFileRepoXML
    size=102400) # setting max size as 100K
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 941, in _getFile
    **kwargs
  File "/usr/lib/python2.7/site-packages/urlgrabber/mirror.py", line 424, in urlgrab
    return self._mirror_try(func, url, kw)
  File "/usr/lib/python2.7/site-packages/urlgrabber/mirror.py", line 402, in _mirror_try
    return func_ref( *(fullurl,), **kwargs )
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1126, in urlgrab
    return self._retry(opts, retryfunc, url, filename)
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1020, in _retry
    r = apply(func, (opts,) + args, {})
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1122, in retryfunc
    fo.close()
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1857, in close
    self.opts.progress_obj.end(self._amount_read)
  File "/usr/lib/python2.7/site-packages/urlgrabber/progress.py", line 151, in end
    self._do_end(amount_read, now)
  File "/usr/lib/python2.7/site-packages/urlgrabber/progress.py", line 301, in _do_end
    ui_size, ui_time, ui_end)
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 437, in __str__
    return self.ui_id
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 374, in _ui_id
    val = config._readRawRepoFile(self)
  File "/usr/lib/python2.7/site-packages/yum/config.py", line 1174, in _readRawRepoFile
    ini = INIConfig(open(repo.repofile))
TypeError: coercing to Unicode: need string or buffer, NoneType found


Version-Release number of selected component (if applicable):
yum-3.4.3-36, yum-3.4.3-28

How reproducible:
Every time

Steps to Reproduce:
1. Install yum >= 3.4.3-36 on the build system and have the same version in the
   source repos for the DVD build
2. run pungi

  
Actual results:
Execption from yum bubbles up, killing the ISO build process

Expected results:
ISO builds successfully

Additional info:
I did an ISO build with YumRepository.__str__() returning id instead of ui_id and the same traceback didn't happen.

I also did netinstall and DVD builds using yum-3.4.3-33 adding the patch mentioned in #852240. The build process completed successfully and the ISOs function as expected after the build.
Comment 1 Tim Flink 2012-08-30 01:57:49 EDT
Proposing as a blocker for F18 alpha as this bug prevents successful ISO builds. While it does not directly violate any of the F18 alpha release criteria [1], it does prevent release and hits the high level criterion of:

"Bug hinders execution of required Alpha test plans or dramatically reduces test coverage"

[1] http://fedoraproject.org/wiki/Fedora_18_Alpha_Release_Criteria
Comment 2 Tim Flink 2012-08-30 01:58:37 EDT
Fixing typo in the F18 alpha blocker tracking bug
Comment 3 Mark Hamzy 2012-08-30 11:10:16 EDT
I was able to reproduce this when running a privately built anaconda and -36 of yum.  It crashes the X window:

(anaconda:1028): Gdk-CRITICAL **: gdk_window_get_width: assertion `GDK_IS_WINDOW (window)' failed

(anaconda:1028): Gdk-CRITICAL **: gdk_window_get_height: assertion `GDK_IS_WINDOW (window)' failed

(anaconda:1028): Gdk-CRITICAL **: gdk_cairo_set_source_window: assertion `GDK_IS_WINDOW (window)' failed
[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
python: xcb_io.c:178: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.

Pane is dead
Comment 4 Fedora Update System 2012-08-30 11:21:31 EDT
yum-3.4.3-39.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/FEDORA-2012-12900/yum-3.4.3-39.fc18
Comment 5 Fedora Update System 2012-08-31 02:45:16 EDT
yum-3.4.3-40.fc18 has been pushed to the Fedora 18 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.