Re: [PATCH] Allow % as wildcard in the end of PREFERRED_VERSION_pkg

Martin Jansa

On Tue, Sep 15, 2009 at 11:31:51AM +0100, Phil Blundell wrote:
On Tue, 2009-09-15 at 11:16 +0200, Martin Jansa wrote:
I wrote a bit more about my problem here:

If I want to prefer bbfile with
then PV will change with every commit
so what PV should be in PREFERRED_VERSION_pkg?

With this patch I can put there "1.0+git%" which will match just this
one bbfile.
I would have thought you would be better off setting a positive
DEFAULT_PREFERENCE for your own DISTRO inside the bb file in question.
That doesn't require any bitbake changes and doesn't introduce any
semantically-murky extensions.

Your scheme of setting "1.0+git%" may work fine if there is just a
single git-based bb file in the repository but it would obviously break
down if a second one were ever to appear. That seems like an unhealthy
state of affairs.

Ok, but then you can say, that the same problem is when there is two or
more packages with PV = "1.0".

You can have as many git-based bb files as long as they have different
PV prefix like 1.0+git% and then 1.1+git% or 2.0+git.

Why would you have more bbffiles with the same PN and all git-based with
PV = "1.0+gitr${SRCPV}" ?

Setting PREFERRED_VERSION_pkg at least close enough to match
"1.0+gitr${SRCPV}" seems better for me than not setting preferred at
all and rely on DEFAULT_PREFERENCE.

BTW: in shr there is one distribution "shr" with -testing and -unstable
variants, main difference is which files with srcrevs and preferred
versions are included during build, how to set DEFAULT_PREFERENCE in
bbfile for this case (-testing wants some relased version, -unstable
using AUTOREV on _git version)?


uin:136542059 jid:Martin.Jansa@...
Jansa Martin sip:jamasip@...

Join { to automatically receive all group messages.