Bug 4965 - Not possible to pass the preferred version to bitbake on the command line
Summary: Not possible to pass the preferred version to bitbake on the command line
Status: RESOLVED WONTFIX
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: All Multiple
: Low enhancement
Target Milestone: Future
Assignee: Robert Yang
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-07-31 11:24 UTC by Laszlo Papp
Modified: 2017-08-17 15:20 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laszlo Papp 2013-07-31 11:24:42 UTC
It would be nice to have this feature for experimenting, at least, around.

u-boot is getting several versions, and it would be simpler to test a different version in case of tracking buys and so forth rather than modifying the config file, and then modifying it back.

If one uses the -b option for absolute path to the recipe, then it will not handle the dependencies automatically.

If it is already possible, then document it, please.
Comment 1 Saul Wold 2013-08-01 06:35:40 UTC
Thanks for the report.

One can use the PREFERRED_VERSION_u-boot = "<version>" in your local.conf file, I believe the variable is documented in the manual.  We use this method for the compiler and eglibc, and they are set in the distro/include/tcmode-default.inc or distro/include/default-versions.  So examples exist.

Is that information sufficient?
Comment 2 Laszlo Papp 2013-08-01 06:43:44 UTC
local.conf != command line.
Comment 3 Robert Yang 2013-08-29 03:27:19 UTC
(In reply to comment #0)
> It would be nice to have this feature for experimenting, at least, around.
> 
> u-boot is getting several versions, and it would be simpler to test a
> different version in case of tracking buys and so forth rather than
> modifying the config file, and then modifying it back.
> 
> If one uses the -b option for absolute path to the recipe, then it will not
> handle the dependencies automatically.
> 

I think that you can use "bitbake uboot-<version>" .

> If it is already possible, then document it, please.
Comment 4 Robert Yang 2013-09-12 02:23:42 UTC
(In reply to comment #3)
> (In reply to comment #0)
> > It would be nice to have this feature for experimenting, at least, around.
> > 
> > u-boot is getting several versions, and it would be simpler to test a
> > different version in case of tracking buys and so forth rather than
> > modifying the config file, and then modifying it back.
> > 
> > If one uses the -b option for absolute path to the recipe, then it will not
> > handle the dependencies automatically.
> > 
> 
> I think that you can use "bitbake uboot-<version>" .
> 

Now, we can't use the bitbake uboot-<version>, but you can set BB_PRESERVE_ENV=1 and then set PREFERRED_VERSION_xxx from the environment.

There is one other problem, you can't use "-" in a shell environment variable so you can't do:

PREFERRED_VERSION_make-native = xxx

which is annoying. We might want to add some kind of mangling mechanism
like a double underscore translating to a dash or something...

Cheers,

Richard

We will go on working on it in 1.6

> > If it is already possible, then document it, please.
Comment 5 Richard Purdie 2017-08-17 15:20:23 UTC
I don't think this is worth doing, particularly given the complexities of invalid chars in the environment variable names. No action in a long time so closing.