Skip to contentSkip to conversation

Fixes for warnings during parse with multilib

PATCH Superseded Paul Eggleton 2 participants 5 messages Sep 21, 2012 – Sep 22, 2012

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Fixes for warnings during parse with multilib

The following changes since commit 5e03d1e83d0536a2fc69a88d3e5407108836203f:

gcc: Use 4.7.2 release tarball (2012-09-21 14:55:26 +0100)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib paule/multilib
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/multilib

Paul Eggleton (2):
classes/multilib: ensure MLPREFIX is set for image recipes classes/multilib: prevent multilib extension of nativesdk recipes

 meta/classes/multilib.bbclass |   17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/2 classes/multilib: ensure MLPREFIX is set for image recipes

We need MLPREFIX to be set so that oe.utils.prune_suffix() (as used for the value of BPN) can derive the bare name from the multilib-extended name for image recipes. BPN being set correctly avoids missing file warnings during parse from the file checksum code for (unusual) images that set SRC_URI, such as build-appliance-image.

First half of the fix for [YOCTO #3146].

---
 meta/classes/multilib.bbclass |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
meta/classes/multilib.bbclass +8 -6
index b1a593e..25cf068 100644
@@ -11,13 +11,17 @@ python multilib_virtclass_handler () {
     if bb.data.inherits_class('kernel', e.data) or bb.data.inherits_class('module-base', e.data):
         raise bb.parse.SkipPackage("We shouldn't have multilib variants for the kernel")
 
-    if bb.data.inherits_class('image', e.data):
-        e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False))
-        return
-
     if bb.data.inherits_class('native', e.data):
         raise bb.parse.SkipPackage("We can't extend native recipes")
 
+    # Set variables suitable for image recipes (as well as everything else)
+    e.data.setVar("MLPREFIX", variant + "-")
+    e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False))
+
+    if bb.data.inherits_class('image', e.data):
+        # We've set all we need to set for images here
+        return
+
     save_var_name=e.data.getVar("MULTILIB_SAVE_VARNAME", True) or ""
     for name in save_var_name.split():
         val=e.data.getVar(name, True)
@@ -29,8 +33,6 @@ python multilib_virtclass_handler () {
  
     override = ":virtclass-multilib-" + variant
 
-    e.data.setVar("MLPREFIX", variant + "-")
-    e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False))
     e.data.setVar("SHLIBSDIR_virtclass-multilib-" + variant ,e.data.getVar("SHLIBSDIR", False) + "/" + variant)
     if e.data.getVar("TARGET_VENDOR_virtclass-multilib-" + variant, False) is None:
 	    e.data.setVar("TARGET_VENDOR_virtclass-multilib-" + variant, e.data.getVar("TARGET_VENDOR", False) + "ml" + variant)
Signature · 1 line
1.7.9.5
#4 lore raw

PATCH 2/2 classes/multilib: prevent multilib extension of nativesdk recipes

In reply to Paul Eggleton

It isn't supported to mix multilib and nativesdk in the same target, so explicitly skip multilib processing if nativesdk is inherited. As a bonus this fixes a bunch of related "missing file" warnings from the file checksum code during parsing because BPN was not correctly stripped for these targets.

Second half of the fix for [YOCTO #3146].

---
 meta/classes/multilib.bbclass |    3 +++
 1 file changed, 3 insertions(+)
meta/classes/multilib.bbclass +3 -0
index 25cf068..6923822 100644
@@ -14,6 +14,9 @@ python multilib_virtclass_handler () {
     if bb.data.inherits_class('native', e.data):
         raise bb.parse.SkipPackage("We can't extend native recipes")
 
+    if bb.data.inherits_class('nativesdk', e.data):
+        raise bb.parse.SkipPackage("We can't extend nativesdk recipes")
+
     # Set variables suitable for image recipes (as well as everything else)
     e.data.setVar("MLPREFIX", variant + "-")
     e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False))
Signature · 1 line
1.7.9.5
#2 lore raw

Re: [PATCH 1/2] classes/multilib: ensure MLPREFIX is set for image recipes

In reply to Paul Eggleton
Quoted 40 lines · Paul Eggleton

We need MLPREFIX to be set so that oe.utils.prune_suffix() (as used for the value of BPN) can derive the bare name from the multilib-extended name for image recipes. BPN being set correctly avoids missing file warnings during parse from the file checksum code for (unusual) images that set SRC_URI, such as build-appliance-image.

First half of the fix for [YOCTO #3146].

---
 meta/classes/multilib.bbclass |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
meta/classes/multilib.bbclass +8 -4
index b1a593e..25cf068 100644
@@ -11,13 +11,17 @@ python multilib_virtclass_handler () {
     if bb.data.inherits_class('kernel', e.data) or bb.data.inherits_class('module-base', e.data):
         raise bb.parse.SkipPackage("We shouldn't have multilib variants for the kernel")
 
-    if bb.data.inherits_class('image', e.data):
-        e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False))
-        return
-
     if bb.data.inherits_class('native', e.data):
         raise bb.parse.SkipPackage("We can't extend native recipes")
 
+    # Set variables suitable for image recipes (as well as everything else)
+    e.data.setVar("MLPREFIX", variant + "-")
+    e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False))
+
+    if bb.data.inherits_class('image', e.data):
+        # We've set all we need to set for images here
+        return
+
     save_var_name=e.data.getVar("MULTILIB_SAVE_VARNAME", True) or ""
     for name in save_var_name.split():
         val=e.data.getVar(name, True)

meta/classes/multilib.bbclass python multilib_virtclass_handler () { · line 38

Quoted 8 lines
meta/classes/multilib.bbclass +0 -2
@@ -29,8 +33,6 @@ python multilib_virtclass_handler () {
 
     override = ":virtclass-multilib-" + variant
 
-    e.data.setVar("MLPREFIX", variant + "-")
-    e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False))
     e.data.setVar("SHLIBSDIR_virtclass-multilib-" + variant ,e.data.getVar("SHLIBSDIR", False) + "/" + variant)
     if e.data.getVar("TARGET_VENDOR_virtclass-multilib-" + variant, False) is None:
 	    e.data.setVar("TARGET_VENDOR_virtclass-multilib-" + variant, e.data.getVar("TARGET_VENDOR", False) + "ml" + variant)

We can't do this due to MULTILIB_SAVE_VARNAME which may then get influenced by the PN change. This is why the PN setting is duplicated, we probably need to just duplicate the MLPREFIX line too. Ugly but such is life :/

Cheers

Richard

#3 lore raw

Re: [PATCH 1/2] classes/multilib: ensure MLPREFIX is set for image recipes

Quoted 15 lines · On Saturday 22 September 2012 12:55:53 Richard Purdie wrote:
Quoted 14 lines · Paul Eggleton

We need MLPREFIX to be set so that oe.utils.prune_suffix() (as used for the value of BPN) can derive the bare name from the multilib-extended name for image recipes. BPN being set correctly avoids missing file warnings during parse from the file checksum code for (unusual) images that set SRC_URI, such as build-appliance-image.

First half of the fix for [YOCTO #3146].

---

 meta/classes/multilib.bbclass |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
Quoted 7 lines

meta/classes/multilib.bbclass python multilib_virtclass_handler () { · line 12

Quoted 7 lines
meta/classes/multilib.bbclass +0 -0
index b1a593e..25cf068 100644
@@ -11,13 +11,17 @@ python multilib_virtclass_handler () {
 
     if bb.data.inherits_class('kernel', e.data) or 

bb.data.inherits_class('module-base', e.data):

Quoted 26 lines
Quoted 26 lines
meta/classes/multilib.bbclass +7 -4
         raise bb.parse.SkipPackage("We shouldn't have multilib variants
         for the kernel")> 
-    if bb.data.inherits_class('image', e.data):
-        e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False))
-        return
-
 
     if bb.data.inherits_class('native', e.data):
         raise bb.parse.SkipPackage("We can't extend native recipes")
 
+    # Set variables suitable for image recipes (as well as everything
 else) +    e.data.setVar("MLPREFIX", variant + "-")
+    e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False))
+
+    if bb.data.inherits_class('image', e.data):
+        # We've set all we need to set for images here
+        return
+
 
     save_var_name=e.data.getVar("MULTILIB_SAVE_VARNAME", True) or ""
 
     for name in save_var_name.split():
         val=e.data.getVar(name, True)
@@ -29,8 +33,6 @@ python multilib_virtclass_handler () {
 
Quoted 8 lines
Quoted 8 lines
meta/classes/multilib.bbclass +0 -2
     override = ":virtclass-multilib-" + variant
 
-    e.data.setVar("MLPREFIX", variant + "-")
-    e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False))
 
     e.data.setVar("SHLIBSDIR_virtclass-multilib-" + variant
     ,e.data.getVar("SHLIBSDIR", False) + "/" + variant)>      

if e.data.getVar("TARGET_VENDOR_virtclass-multilib-" + variant,

False) is None:

Quoted 7 lines

meta/classes/multilib.bbclass

Quoted 2 lines
meta/classes/multilib.bbclass +0 -0
 	    e.data.setVar("TARGET_VENDOR_virtclass-multilib-" + variant,
 	    e.data.getVar("TARGET_VENDOR", False) + "ml" + variant)

We can't do this due to MULTILIB_SAVE_VARNAME which may then get influenced by the PN change. This is why the PN setting is duplicated, we probably need to just duplicate the MLPREFIX line too. Ugly but such is life :/

Oops. I'll send a v2 shortly.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre