[PATCH] _readRawRepoFile: return only valid (ini, section_id). BZ 1018795

Zdenek Pavlas zpavlas at redhat.com
Tue Nov 5 10:22:58 UTC 2013


> matching repo.id in that file. About the only way I can think of that
> happening is for something to rewrite the file between yum first opening
> it and yum reopening it to get the raw data, or maybe having a repo.id
> containing $vars, and changing those vars after repo. loading. Both of
> which would be in the "don't do that, then" bucket.

I was not able to reproduce the bug, even with $releasever in repo_id.
But I'm sure it's the only possible path leading to the exception.

>  I guess returning None is the best we can do (about the only other
> option is a big deathly exception), so ACK, but we should put a giant
> comment in saying "give up hope all ye who try to understand how we hit
> this"

The code already silently ignores failures to open() the .repo file
and returns None, so this just does the same. Pushed.


More information about the Yum-devel mailing list