Initialize bitbake session & environment parse variables
PATCH 1/3 Initialize bitbake session & environment parse variables
- source oe-init-env for the connection shell
- parse environment variables
--- .../src/org/yocto/bc/bitbake/BBSession.java | 13 +++-- .../src/org/yocto/bc/bitbake/ShellSession.java | 53 ++++++++------------ 2 files changed, 26 insertions(+), 40 deletions(-)
plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBSession.java +6 -7
@@ -329,18 +329,17 @@ public class BBSession implements IBBSessionListener, IModelElement, Map { } } - protected int checkExecuteError(String result, int code) { + protected void checkExecuteError(String result, boolean hasErrors) { URI recipeURI = getDefaultDepends(); String text = "Parsing " + ((recipeURI != null) ? ("recipe " + recipeURI) : "base configurations"); - if (code != 0) { + if (hasErrors) { text = text + " ERROR!\n" + result; }else { text = text + " SUCCESS.\n"; } if(!silent) { - displayInConsole(text, code, false); + displayInConsole(text, -1, false); } - return code; } protected void displayInConsole(final String result, final int code, boolean clear) {
@@ -377,9 +376,9 @@ public class BBSession implements IBBSessionListener, IModelElement, Map { } try { if(!initialized) { //recheck - int [] codes = {-1}; - String result = shell.execute(parsingCmd, codes); - if(checkExecuteError(result, codes[0]) == 0) { + boolean hasErrors = false; + String result = shell.execute(parsingCmd, hasErrors); + if(!hasErrors) { properties = parseBBEnvironment(result); } else { properties = parseBBEnvironment("");
plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/ShellSession.java +20 -33
84 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Hi Ioana,
The patched won't apply and please rebase against eclipse-poky-windows and resubmit.
Thanks,
Jessica
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Ioana Grigoropol
Sent: Monday, November 26, 2012 2:05 AM
To: [email protected]
Subject: [yocto] [PATCH 1/3] Initialize bitbake session & environment parse variables
- source oe-init-env for the connection shell
- parse environment variables
--- .../src/org/yocto/bc/bitbake/BBSession.java | 13 +++-- .../src/org/yocto/bc/bitbake/ShellSession.java | 53 ++++++++------------ 2 files changed, 26 insertions(+), 40 deletions(-)
plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBSession.java +3 -4
@@ -329,18 +329,17 @@ public class BBSession implements IBBSessionListener, IModelElement, Map { } } - protected int checkExecuteError(String result, int code) { + protected void checkExecuteError(String result, boolean hasErrors) { URI recipeURI = getDefaultDepends(); String text = "Parsing " + ((recipeURI != null) ? ("recipe " + recipeURI) : "base configurations"); - if (code != 0) { + if (hasErrors) { text = text + " ERROR!\n" + result; }else { text = text + " SUCCESS.\n"; } if(!silent) { - displayInConsole(text, code, false); + displayInConsole(text, -1, false); } - return code; } protected void displayInConsole(final String result, final int code, boolean clear) { @@ -377,9 +376,9 @@ public class BBSession implements IBBSessionListener, IModelElement, Map {
}
try {
if(!initialized) { //recheck
- int [] codes = {-1};
- String result = shell.execute(parsingCmd, codes);
- if(checkExecuteError(result, codes[0]) == 0) {
+ boolean hasErrors = false;
+ String result = shell.execute(parsingCmd, hasErrors);
+ if(!hasErrors) {
properties = parseBBEnvironment(result);
} else {
properties = parseBBEnvironment(""); diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/ShellSession.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/ShellSession.javaindex a7ed3d6..a8c46dd 100644
plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/ShellSession.java +20 -33
84 lines not on this page · raw message
--
1.7.9.5
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto