Discussion:
createrepo, hangs waiting for stderr
w***@hiwaay.net
2012-01-17 06:45:37 UTC
Permalink
I'm probably about to expose myself
as a complete idiot, but how the heck
can the createrepo script work as written?

Ever since I first started using it (either
just after the release of Fedora 14 or 15, can't
remember which), the script hasn't worked
on my 32 bit Fedora installes (including the most
recent packages in F16) without me having
to modify the file:
/usr/lib/python2.7/site-packages/createrepo/__init__.py

No matter what options I've used, the unmodified
script hangs the very first time that it tries
to perform a readline() on the stderr output. Since
there is no output to stderr, the script blocks at
that point and does not continue. This appears to
be proper behavior for readline() and the subprocess
module. If there is any response from the poll().
then readline() is called for both stdout and stderr.

My quick fixes have ranged from simply commenting out
the "line=job.stderr.readline()" line, to polling
that stream explicitly before any attempt to read
it. After making those changes, the script begins
to work perfectly, until the next time the createrep
package gets updated and I have to do it again.

So, either the script can't possibly properly execute as
written, or I'm an idiot. Since I haven't found any
other online references to anyone having this problem
(from the first time I ran across it at least a year ago),
I can only assume that yes, I am indeed an idiot.

Now that I've come to terms with that I'd really appreciate
it if someone could explain whatever it is that
I'm missing, and help me figure out what I need to do
to get the script to execute without modification.

Robert Wood
woodr -a -t- hiwaay -d- o- t- net

Loading...