Skip to contentSkip to conversation

Usage of NATIVE_INSTALL_WORKS

DISCUSSION Enrico Scholz 3 participants 5 messages Aug 16, 2010 – Aug 17, 2010

lore
Share & tools
lore
#0 lore raw

Hi,

http://wiki.openembedded.org/index.php/Legacy_staging states that NATIVE_INSTALL_WORKS must be set when there is a non trivial do_install() function and BBCLASSEXTEND is used.

But

| git grep NATIVE_INSTALL_WORKS conf/ classes/ lib/

shows only one place where this variable is evaluated:

| classes/staging.bbclass: elif bb.data.getVar('NATIVE_INSTALL_WORKS', d, 1) == "1":
| classes/staging.bbclass- legacy = False

And there, it is used only in the is_legacy_staging() function, to override legacy/non-legacy detection results.

Is there still any use for this variable in modern staging? Or shall it be purged from non-legacy recipes?

Enrico

#1 lore raw
Quoted 16 lines · Enrico Scholz

Hi,

http://wiki.openembedded.org/index.php/Legacy_staging states that NATIVE_INSTALL_WORKS must be set when there is a non trivial do_install() function and BBCLASSEXTEND is used.

But

| git grep NATIVE_INSTALL_WORKS conf/ classes/ lib/

shows only one place where this variable is evaluated:

| classes/staging.bbclass: elif bb.data.getVar('NATIVE_INSTALL_WORKS',
d, 1) == "1":
| classes/staging.bbclass- legacy = False

Quoted 6 lines

And there, it is used only in the is_legacy_staging() function, to override legacy/non-legacy detection results.

Is there still any use for this variable in modern staging? Or shall it be purged from non-legacy recipes?

If you purge it from particular non-legacy recipes, the legacy detection code will misidentify those as legacy and fail to do the correct thing.

Signature · 5 lines
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
#2 lore raw
Quoted 23 lines · Chris Larson
Quoted 20 lines · Enrico Scholz

Hi,

http://wiki.openembedded.org/index.php/Legacy_staging states that NATIVE_INSTALL_WORKS must be set when there is a non trivial do_install() function and BBCLASSEXTEND is used.

But

| git grep NATIVE_INSTALL_WORKS conf/ classes/ lib/

shows only one place where this variable is evaluated:

| classes/staging.bbclass: elif bb.data.getVar('NATIVE_INSTALL_WORKS',
d, 1) == "1":
| classes/staging.bbclass- legacy = False

And there, it is used only in the is_legacy_staging() function, to override legacy/non-legacy detection results.

Quoted 6 lines
Quoted 2 lines

Is there still any use for this variable in modern staging? Or shall it be purged from non-legacy recipes?

If you purge it from particular non-legacy recipes, the legacy detection code will misidentify those as legacy and fail to do the correct thing.

Can we update the wiki page to expand on when this is needed a little bit more then? My quick read of is_legacy_staging() says that if do_stage is empty (and it should be if you convert from do_stage to do_install right) NATIVE_INSTALL_WORKS shouldn't be needed.

Signature · 2 lines
Tom Rini
Mentor Graphics Corporation
#3 lore raw
Quoted 30 lines · Tom Rini
Quoted 28 lines · Chris Larson

On Mon, Aug 16, 2010 at 4:37 AM, Enrico Scholz <
[email protected]> wrote:

Hi,

Quoted 22 lines

http://wiki.openembedded.org/index.php/Legacy_staging states that NATIVE_INSTALL_WORKS must be set when there is a non trivial do_install() function and BBCLASSEXTEND is used.

But

| git grep NATIVE_INSTALL_WORKS conf/ classes/ lib/

shows only one place where this variable is evaluated:

| classes/staging.bbclass: elif bb.data.getVar('NATIVE_INSTALL_WORKS',
d, 1) == "1":
| classes/staging.bbclass- legacy = False

And there, it is used only in the is_legacy_staging() function, to override legacy/non-legacy detection results.

Is there still any use for this variable in modern staging? Or shall it be purged from non-legacy recipes?

Quoted 8 lines
Quoted 3 lines

If you purge it from particular non-legacy recipes, the legacy detection code will misidentify those as legacy and fail to do the correct thing.

Can we update the wiki page to expand on when this is needed a little bit more then? My quick read of is_legacy_staging() says that if do_stage is empty (and it should be if you convert from do_stage to do_install right) NATIVE_INSTALL_WORKS shouldn't be needed.

Removing the do_stage function from the recipe doesn't necessarily result in an empty do_stage. If you look at native.bbclass, you'll see that do_stage is do_stage_native. If your do_stage is do_stage_native and you haven't set AUTOTOOLS_NATIVE_STAGE_INSTALL, it'll fall back to legacy staging, at least if I'm reading is_legacy_staging correctly.

Signature · 5 lines
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
#4 lore raw
Quoted 39 lines · Chris Larson
Quoted 28 lines · Tom Rini
Quoted 26 lines · Chris Larson

On Mon, Aug 16, 2010 at 4:37 AM, Enrico Scholz <
[email protected]> wrote:

Hi,

Quoted 21 lines

http://wiki.openembedded.org/index.php/Legacy_staging states that NATIVE_INSTALL_WORKS must be set when there is a non trivial do_install() function and BBCLASSEXTEND is used.

But

| git grep NATIVE_INSTALL_WORKS conf/ classes/ lib/

shows only one place where this variable is evaluated:

| classes/staging.bbclass: elif bb.data.getVar('NATIVE_INSTALL_WORKS',
d, 1) == "1":
| classes/staging.bbclass- legacy = False

And there, it is used only in the is_legacy_staging() function, to override legacy/non-legacy detection results.

Is there still any use for this variable in modern staging? Or shall it be purged from non-legacy recipes?

Quoted 7 lines
Quoted 3 lines

If you purge it from particular non-legacy recipes, the legacy detection code will misidentify those as legacy and fail to do the correct thing.

Can we update the wiki page to expand on when this is needed a little bit more then? My quick read of is_legacy_staging() says that if do_stage is empty (and it should be if you convert from do_stage to do_install right) NATIVE_INSTALL_WORKS shouldn't be needed.

Quoted 5 lines

Removing the do_stage function from the recipe doesn't necessarily result in an empty do_stage. If you look at native.bbclass, you'll see that do_stage is do_stage_native. If your do_stage is do_stage_native and you haven't set AUTOTOOLS_NATIVE_STAGE_INSTALL, it'll fall back to legacy staging, at least if I'm reading is_legacy_staging correctly.

So, perhaps it's time to convert that real quick? Or is there some reason I'm not seeing as to why we wouldn't want to:
- Change native.bbclass do_stage / do_stage_native to do_install / do_install
- Drop NATIVE_INSTALL_WORKS

Signature · 2 lines
Tom Rini
Mentor Graphics Corporation