[OE-core] package_rpm.bbclass: Replace shell provides/requires script with python version

Richard Purdie richard.purdie at linuxfoundation.org
Fri Apr 27 17:09:58 UTC 2012


On Thu, 2012-04-26 at 15:34 -0500, Mark Hatle wrote:
> On 4/26/12 2:54 PM, Richard Purdie wrote:
> > The existing shell script is a fork bomb and forks off hundreds of
> > grep/cur/wc calls as it reads from its input stream and iterates over
> > the file data table for each line of input. This patch replaces the
> > shell code with python code which doesn't exec anything and hence runs
> > much faster without the exec() overhead. This speeds up rpm packaging
> > considerably, as can be measured simply by timing it, or watching the
> > processor utilisation.
> 
> Just an FYI, the intent was to replace this code completely with a patch to RPM 
> when it got upgraded.  Then RPM could read in the dependencies directly and not 
> have to worry about hacky script solutions.
> 
> Needless to say we're not yet at that point, so this is fine..  but hopefully 
> we're getting closer.

I agree with the objective. I've had the patch lying around for a while
and in use in my builds so it was already written and doesn't seem to
regress anything. It seems to make sense to include it for now until the
rpm upgrade happens and we fix things properly.

The patch also has a partner in crime:

http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=rpurdie/t2&id=c0cbf016f59b06f461961df4d6cdfcd0928c96ee

but I suspect you'd dislike that one even if functionally it doesn't
change much at the moment.

Cheers,

Richard





More information about the Openembedded-core mailing list