more nitpicky pedantry: question about DEFAULT_PREFERENCE
(part of the nitpickiness of some of these questions stems from
that, in my updated courseware, i want to use actual examples out of, say, the openembedded layer, and not just contrived examples involving packages like "foo" and "bar". to that end, i want to be able to explain why some recipes are written the way they are and, conversely, to explain why some recipes might look weird.)
the bitbake manual has a reasonable explanation ofDEFAULT_PREFERENCE but there are examples in the OE layer that seem to not be written as cleanly as they could be.
consider under recipes-devtools the two directories "pkgconfig" and
"pkgconf", and the respective .bb files:
- pkgconfig_git.bb
- pkgconf_1.6.3.bb
the pkgconfig recipe file does *not* contain a PROVIDES setting, while pkgconfig_1.6.3.bb does:
PROVIDES += "pkgconfig"
so, given that, one expects that other recipes should have a DEPENDency on "pkgconfig", which could be satisfied by either of those.
however, oddly, the file pkgconf_1.6.3.bb contains the line:
DEFAULT_PREFERENCE = "-1"
which seems odd as there don't appear to be any other recipes that provide pkgconfig, and AIUI, the default provider for any recipe is the recipe with *exactly* the same name as the target -- in this case, "pkgconfig".
so while that DEFAULT_PREFERENCE line doesn't hurt anything, in this
specific case (assuming i haven't overlooked any other recipes that provide pkgconfig), that DEFAULT_PREFERENCE line is superfluous, correct?
rday
Quoted 18 lines · On Sat, 2020-02-08 at 13:31 -0500, [email protected] wrote:
(part of the nitpickiness of some of these questions stems from
that, in my updated courseware, i want to use actual examples out of, say, the openembedded layer, and not just contrived examples involving
packages like "foo" and "bar". to that end, i want to be able to explain why some recipes are written the way they are and, conversely,
to explain why some recipes might look weird.)the bitbake manual has a reasonable explanation of
DEFAULT_PREFERENCEbut there are examples in the OE layer that seem to
not be written as cleanly as they could be.consider under recipes-devtools the two directories "pkgconfig"
and
"pkgconf", and the respective .bb files:
Quoted 7 lines
- pkgconfig_git.bb
- pkgconf_1.6.3.bbthe pkgconfig recipe file does *not* contain a PROVIDES setting, while pkgconfig_1.6.3.bb does:
PROVIDES += "pkgconfig"
The above looks superfluous at a glance.
Quoted 4 lines
so, given that, one expects that other recipes should have a DEPENDency on "pkgconfig", which could be satisfied by either of those.
Quoted 8 lines
however, oddly, the file pkgconf_1.6.3.bb contains the line:
DEFAULT_PREFERENCE= "-1"which seems odd as there don't appear to be any other recipes that provide pkgconfig, and AIUI, the default provider for any recipe is the recipe with *exactly* the same name as the target -- in this case, "pkgconfig".
DEFAULT_PREFERENCE works against versions, not providers.
I'm not sure what that line is trying to do but I also suspect its superfluous.
Quoted 4 lines
so while that
DEFAULT_PREFERENCEline doesn't hurt anything, in
this specific case (assuming i haven't overlooked any other recipes that provide pkgconfig), thatDEFAULT_PREFERENCEline is superfluous, correct?
For different reasoning, yes :)
Cheers,
Richard
Quoted 8 lines · Richard Purdie
Quoted 6 lines · On Sat, 2020-02-08 at 13:31 -0500, [email protected] wrote:
consider under recipes-devtools the two directories "pkgconfig"
and "pkgconf", and the respective .bb files:- pkgconfig_git.bb
- pkgconf_1.6.3.bb
Quoted 6 lines
Quoted 4 lines
the pkgconfig recipe file does *not* contain a PROVIDES setting, while pkgconfig_1.6.3.bb does:
PROVIDES += "pkgconfig"
The above looks superfluous at a glance.
sorry, i mistyped the above, i should have written:
"the pkgconfig recipe file does *not* contain a PROVIDES setting, while pkgconf_1.6.3.bb does:"
so that PROVIDES line *would* be necessary, yes? (just not the "+=" part). my apologies for reproducing incorrectly.
rday
Quoted 18 lines · On Sat, 2020-02-08 at 13:31 -0500, [email protected] wrote:
(part of the nitpickiness of some of these questions stems from
that, in my updated courseware, i want to use actual examples out of, say, the openembedded layer, and not just contrived examples involving
packages like "foo" and "bar". to that end, i want to be able to explain why some recipes are written the way they are and, conversely,
to explain why some recipes might look weird.)the bitbake manual has a reasonable explanation of
DEFAULT_PREFERENCEbut there are examples in the OE layer that seem to
not be written as cleanly as they could be.consider under recipes-devtools the two directories "pkgconfig"
and
"pkgconf", and the respective .bb files:
Quoted 7 lines
- pkgconfig_git.bb
- pkgconf_1.6.3.bbthe pkgconfig recipe file does *not* contain a PROVIDES setting, while pkgconfig_1.6.3.bb does:
PROVIDES += "pkgconfig"
It doesn't, pkgconf_1.6.3.bb does, which is quite different and it then makes sense.
Cheers,
Richard