Skip to contentSkip to conversation

llvm, openjdk: Use bb.error instread of oefatal

PATCH In review Khem Raj 2 participants 4 messages Jan 5, 2012 – Jan 8, 2012

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 llvm, openjdk: Use bb.error instread of oefatal

oefatal is not available in oe-core so replace it with bbfatal in classes and oe.error in recipes which use it in anonymous python. bb.fatal aborts parsing. So we want to give an error but not stop parsing.

---
 classes/java.bbclass                      |    6 +++---
 recipes-core/llvm/llvm.inc                |    2 +-
 recipes-core/openjdk/openjdk-6-common.inc |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
classes/java.bbclass +3 -3
index 6a45065..fe24648 100644
@@ -39,7 +39,7 @@ oe_jarinstall() {
       destname=$1
       ;;
     -*)
-      oefatal "oe_jarinstall: unknown option: $1"
+      bbfatal "oe_jarinstall: unknown option: $1"
       ;;
     *)
       break;
@@ -105,7 +105,7 @@ oe_makeclasspath() {
               fi
               ;;
           -*)
-              oefatal "oe_makeclasspath: unknown option: $1"
+              bbfatal "oe_makeclasspath: unknown option: $1"
               ;;
           *)
               file=$dir/$1.jar
@@ -146,7 +146,7 @@ oe_java_simple_wrapper() {
       output=$1
       ;;
     -*)
-      oefatal "oe_java_simple_wrapper: unknown option: $1"
+      bbfatal "oe_java_simple_wrapper: unknown option: $1"
       ;;
     *)
       if [ $mainclass ]
recipes-core/llvm/llvm.inc +1 -1
index c675c4d..5cc9957 100644
@@ -208,7 +208,7 @@ def get_llvm_arch(d):
   elif arch == "powerpc":
     arch = "PowerPC"
   else:
-    oefatal("Your target architecture is not supported by this recipe");
+    bb.error("%s does not support %s yet" % (bb.data.getVar('PN', d, 1), arch) );
 
   return arch
 
recipes-core/openjdk/openjdk-6-common.inc +1 -1
index 1a3c52b..461ccd9 100644
@@ -158,7 +158,7 @@ def get_llvm_configure_arch(d):
   elif arch == "powerpc":
     arch = "powerpc"
   else:
-    oefatal("Your target architecture is not supported by this recipe");
+    bb.error("%s does not support %s yet" % (bb.data.getVar('PN', d, 1), arch) );
 
   return arch
 
Signature · 1 line
1.7.5.4
author
#1 lore raw

PATCH 2/2 llvm, openjdk: Add mips to known architectures

correct a typo Mips -> mips

---
 recipes-core/llvm/llvm.inc                |    4 ++--
 recipes-core/openjdk/openjdk-6-common.inc |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
recipes-core/llvm/llvm.inc +2 -2
index 5cc9957..578cd40 100644
@@ -203,8 +203,8 @@ def get_llvm_arch(d):
     arch = "X86"
   elif arch == "arm":
     arch = "ARM"
-  elif arch == "mipsel":
-    arch = "Mips"
+  elif arch == "mipsel" or arch == "mips":
+    arch = "mips"
   elif arch == "powerpc":
     arch = "PowerPC"
   else:
recipes-core/openjdk/openjdk-6-common.inc +1 -1
index 461ccd9..bc56105 100644
@@ -153,7 +153,7 @@ def get_llvm_configure_arch(d):
     arch = "x86"
   elif arch == "arm":
     arch = "arm"
-  elif arch == "mipsel":
+  elif arch == "mipsel" or arch == "mips":
     arch = "mips"
   elif arch == "powerpc":
     arch = "powerpc"
Signature · 1 line
1.7.5.4
#2 lore raw

Re: [meta-java][PATCH 2/2] llvm, openjdk: Add mips to known architectures

Quoted 38 lines · Khem Raj

correct a typo Mips -> mips

---
 recipes-core/llvm/llvm.inc                |    4 ++--
 recipes-core/openjdk/openjdk-6-common.inc |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
recipes-core/llvm/llvm.inc +2 -2
index 5cc9957..578cd40 100644
@@ -203,8 +203,8 @@ def get_llvm_arch(d):
     arch = "X86"
   elif arch == "arm":
     arch = "ARM"
-  elif arch == "mipsel":
-    arch = "Mips"
+  elif arch == "mipsel" or arch == "mips":
+    arch = "mips"
   elif arch == "powerpc":
     arch = "PowerPC"
   else:
recipes-core/openjdk/openjdk-6-common.inc +1 -1
index 461ccd9..bc56105 100644
@@ -153,7 +153,7 @@ def get_llvm_configure_arch(d):
     arch = "x86"
   elif arch == "arm":
     arch = "arm"
-  elif arch == "mipsel":
+  elif arch == "mipsel" or arch == "mips":
     arch = "mips"
   elif arch == "powerpc":
     arch = "powerpc"
Signature · 1 line
1.7.5.4

Thanks Khem,

it is applied.

Bye Henning

#3 lore raw
In reply to Khem Raj
Quoted 70 lines · Khem Raj

oefatal is not available in oe-core so replace it with bbfatal in classes and oe.error in recipes which use it in anonymous python. bb.fatal aborts parsing. So we want to give an error but not stop parsing.

---
 classes/java.bbclass                      |    6 +++---
 recipes-core/llvm/llvm.inc                |    2 +-
 recipes-core/openjdk/openjdk-6-common.inc |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
classes/java.bbclass +3 -3
index 6a45065..fe24648 100644
@@ -39,7 +39,7 @@ oe_jarinstall() {
       destname=$1
       ;;
     -*)
-      oefatal "oe_jarinstall: unknown option: $1"
+      bbfatal "oe_jarinstall: unknown option: $1"
       ;;
     *)
       break;
@@ -105,7 +105,7 @@ oe_makeclasspath() {
               fi
               ;;
           -*)
-              oefatal "oe_makeclasspath: unknown option: $1"
+              bbfatal "oe_makeclasspath: unknown option: $1"
               ;;
           *)
               file=$dir/$1.jar
@@ -146,7 +146,7 @@ oe_java_simple_wrapper() {
       output=$1
       ;;
     -*)
-      oefatal "oe_java_simple_wrapper: unknown option: $1"
+      bbfatal "oe_java_simple_wrapper: unknown option: $1"
       ;;
     *)
       if [ $mainclass ]
recipes-core/llvm/llvm.inc +1 -1
index c675c4d..5cc9957 100644
@@ -208,7 +208,7 @@ def get_llvm_arch(d):
   elif arch == "powerpc":
     arch = "PowerPC"
   else:
-    oefatal("Your target architecture is not supported by this recipe");
+    bb.error("%s does not support %s yet" % (bb.data.getVar('PN', d, 1), arch) );
 
   return arch
 
recipes-core/openjdk/openjdk-6-common.inc +1 -1
index 1a3c52b..461ccd9 100644
@@ -158,7 +158,7 @@ def get_llvm_configure_arch(d):
   elif arch == "powerpc":
     arch = "powerpc"
   else:
-    oefatal("Your target architecture is not supported by this recipe");
+    bb.error("%s does not support %s yet" % (bb.data.getVar('PN', d, 1), arch) );
 
   return arch
 
Quoted 1 line

1.7.5.4

Thanks Khem,

it is applied.

Bye Henning