Bug 3245 - The description for "BPN" variable needs to be improved.
Summary: The description for "BPN" variable needs to be improved.
Status: RESOLVED FIXED
Alias: None
Product: Reference
Classification: Documentation
Component: handbook (show other bugs)
Version: unspecified
Hardware: All Multiple
: Undecided normal
Target Milestone: ---
Assignee: Scott Rifenbark
QA Contact:
URL: http://git.yoctoproject.org/cgit.cgi/...
Whiteboard: 9 Oct 2012 - resolved/fixed
Depends on:
Blocks:
 
Reported: 2012-10-05 22:13 UTC by Patrick Turley
Modified: 2012-10-09 14:29 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Turley 2012-10-05 22:13:04 UTC
The introduction video says the reference manual is the best place to find information about an unrecognized variable name. So, I had a look at "BPN".

Here's what the reference manual current says about BPN:


"Bare name of package with any suffixes like -cross -native removed."


That needs to be substantially improved because it leaves me with too many questions:

1) What is the string from which BPN is derived? Is it ${PN}? Is it the name of the recipe file (which is *probably* the same, but not necessarily)?

2) How does one know where the removable suffix starts? Is it delimited with a dash, as suggested by the documentation? That doesn't seem to match the example in the intro video, which is "psplash_git", suggesting that underscore is actually the delimiter. Or perhaps *both* will work (and perhaps others as well).

3) What suffixes are recognized? The documentation says "like -cross -native removed" -- that's not precise enough. How do I know whether the suffix I'm using will be properly removed?
Comment 1 Richard Purdie 2012-10-08 13:19:37 UTC
How about:

BPN  - A version of the PN variable with common suffixes and prefixes removed (such as "-native", "-cross" and multilib prefixes). The exact list of suffixes removed is listed in the SPECIAL_PKGSUFFIX variable. Any value that MLPREFIX has is removed as a prefix (which happens for multilib and nativesdk cases).
Comment 2 Patrick Turley 2012-10-08 15:27:20 UTC
That seems like an excellent start, in terms of tracking down the true behavior of this variable.

Unfortunately, that can't be the end of it because:

1) Neither SPECIAL_PKGSUFFIX nor MLPREFIX are documented in the reference manual so, to complete the resolution for this bug, those would have to be added as well.

2) I question (but I'm not certain) that we want to document the behavior of this variable in terms of other, obscure variables. That is, I don't know if it's a good idea to say to the reader: "You can know how this works, but you'll have to grep through the Yocto tree to track down the details." It *may* be that there is still no better, practical answer -- but I hope for a trend toward simplicity.
Comment 3 Richard Purdie 2012-10-08 15:36:29 UTC
I think we do aim for simplicity but in order to fully answer your question, we do need to reference the other variables unfrotunately. I suggest we simply define these as:

SPECIAL_PKGSUFFIX - "A list of prefixes to PN used by the build system to create variants of recipes. The list is used to be able to strip off the prefix in certain circumstances such as generation of the BPN variable."

MLPREFIX - "Set when a prefix has been added to PN to create a special version of a recipe, such as a multilib version. It is used in places where this prefix needs to be added to a name or removed from it."
Comment 4 Patrick Turley 2012-10-08 15:39:10 UTC
That seems reasonable to me.
Comment 5 Scott Rifenbark 2012-10-09 14:29:23 UTC
I updated the BPN description per Richard's suggestion with a bit of wordsmithing.  I also created the new glossary entries for SPECIAL_PKGSUFFIX and MLPREFIX as required. 

You can view the BPN entry at http://www.yoctoproject.org/docs/1.3/poky-ref-manual/poky-ref-manual.html#var-BPN.

Scott