[oe] [PATCH 1/3] Make package_update_index_ipk proper task with locking

Richard Purdie rpurdie at rpsys.net
Thu Jun 18 13:35:54 UTC 2009


On Thu, 2009-06-18 at 14:16 +0100, Phil Blundell wrote: 
> On Thu, 2009-06-18 at 14:05 +0100, Richard Purdie wrote:
> > Can I suggest we actually add the ability to lock from shell scripts? A
> > couple of python scripts (bitbake-lock/bitbake-unlock) which just call
> > the python locking functions should be trivial to write and then mean we
> > can add sane locking to specialist functions much more easily. It should
> > allow us to solve the opkg.conf file issue you were seeing easily too.
> > 
> > Adding those shell scripts is slightly trickt - I'm happy to have them
> > in bitbake but we'll need another release before OE.dev can depend on
> > use them. We're overdue a bitbake release so perhaps we can get this
> > done quite quickly though...
> 
> In this particular case there probably isn't any need for the locks to
> be shared between the shell and python worlds since all the ipk handling
> is done in shell.  So I guess it should be fine to just have the shell
> code call something like flock(2) directly, and hence no need for a new
> bitbake release.
> 
> If the issue is just that concurrent calls to ipkg-make-index will
> collide, it's probably as simple as replacing the call to
> ipkg-make-index with "flock some-path -c ipkg-make-index ...".

Agreed, it just somehow seemed nicer to use the same locking functions
for both and its very simple to make it happen at a code level, just the
logistics are tricky.

I probably will add locking scripts to bitbake in case we do want it but
there are other ways simpler ways to solve this particular problem.

Cheers,

Richard





More information about the Openembedded-devel mailing list