[bitbake-devel] PREFERRED_VERSION and wildcards
Martin Jansa
martin.jansa at gmail.com
Wed Mar 14 22:54:18 UTC 2012
On Wed, Mar 14, 2012 at 10:34:59PM +0100, Andreas Oberritter wrote:
> Hi,
>
> I just tried using wildcards, like it's done for gcc, e.g.:
>
> PREFERRED_VERSION_foo = "1.2%"
>
> Now, if I have two foo recipes, foo_1.2.1.bb and foo_1.2.3.bb, in the
> same directory, then Bitbake always chooses 1.2.1 instead of the one
> with the higher version number. Does bitbake always choose the first
> matching version it can find? Is this a general limitation of wildcards,
> or is this a problem that can get corrected? I'd expect it to choose the
> highest matching version.
If you want highest then why do you specify P_V at all? or are those
1.2% foo with e.g. negative D_P? or is there 1.3 you don't want?
It will use first provider which matches (in highest usable prio/D_P group).
sortpkg_pn = sortPriorities(pn, dataCache, pkg_pn)
# Find the highest priority provider with a PREFERRED_VERSION set
(preferred_ver, preferred_file) = findPreferredProvider(pn, cfgData, dataCache, sortpkg_pn, item)
# Find the latest version of the highest priority provider
(latest, latest_f) = findLatestProvider(pn, cfgData, dataCache, sortpkg_pn[0])
if preferred_file is None:
preferred_file = latest_f
preferred_ver = latest
It was added mostly to cover use case with e.g. 1.2+svnr1337 or 1.2+gitrCAFEBABE where
you don't care about exact revision, but you know that you want 1.2 from scm (and there
is just one which matches).
See this thread for details:
http://lists.linuxtogo.org/pipermail/bitbake-devel/2009-September/000458.html
Cheers,
>
> Regards,
> Andreas
>
> _______________________________________________
> bitbake-devel mailing list
> bitbake-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel
--
Martin 'JaMa' Jansa jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20120314/41a61ade/attachment-0001.sig>
More information about the bitbake-devel
mailing list