* [PATCH 0/7] denzil pull request
@ 2013-01-27 23:41 Scott Garman
2013-01-27 23:41 ` [PATCH 1/7] bison: move remove-gets.patch to BASE_SRC_URI, it's needed for bison-native too if host has (e)glibc-2.16 Scott Garman
` (7 more replies)
0 siblings, 8 replies; 11+ messages in thread
From: Scott Garman @ 2013-01-27 23:41 UTC (permalink / raw)
To: poky
Hello,
This is a pull request for denzil. It includes a bitbake fix from
MatthewM (poky-based tree only) and some Fedora 18 build fixes from
Koen.
Build status: 100% Green.
nightly-x86: Green
http://autobuilder.yoctoproject.org:8010/builders/nightly-x86/builds/885
nightly-x86-lsb: Green
http://autobuilder.yoctoproject.org:8010/builders/nightly-x86-lsb/builds/214
nightly-x86-64: Green
http://autobuilder.yoctoproject.org:8010/builders/nightly-x86-64/builds/810
nightly-x86-64-lsb: Green
http://autobuilder.yoctoproject.org:8010/builders/nightly-x86-64-lsb/builds/209
nightly-arm: Green
http://autobuilder.yoctoproject.org:8010/builders/nightly-arm/builds/814
nightly-arm-lsb: Green
http://autobuilder.yoctoproject.org:8010/builders/nightly-arm-lsb/builds/207
nightly-mips: Green
http://autobuilder.yoctoproject.org:8010/builders/nightly-mips/builds/786
nightly-mips-lsb: Green
http://autobuilder.yoctoproject.org:8010/builders/nightly-mips-lsb/builds/213
nightly-ppc: Green
http://autobuilder.yoctoproject.org:8010/builders/nightly-ppc/builds/765
nightly-ppc-lsb: Green
http://autobuilder.yoctoproject.org:8010/builders/nightly-ppc-lsb/builds/217
nightly-non-gpl3: Green
http://autobuilder.yoctoproject.org:8010/builders/nightly-non-gpl3/builds/443
nightly-multilib: Green
http://autobuilder.yoctoproject.org:8010/builders/nightly-multilib/builds/444
nightly-tiny: Green
http://autobuilder.yoctoproject.org:8010/builders/nightly-tiny/builds/420
build-appliance: Green
http://autobuilder.yoctoproject.org:8010/builders/build-appliance/builds/220
eclipse-plugin: Green
http://autobuilder.yoctoproject.org:8010/builders/eclipse-plugin/builds/763
The following changes since commit 3456295898bf157e40ea1f8c335f0b7285d3d8a7:
build-appliance-image: Bump SRCREV (2013-01-04 22:23:43 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib sgarman/denzil-next
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=sgarman/denzil-next
Christopher Larson (1):
bitbake: command: add error to return of runCommand
Martin Jansa (1):
bison: move remove-gets.patch to BASE_SRC_URI, it's needed for
bison-native too if host has (e)glibc-2.16
Nitin A Kamble (1):
libtasn1: fix build with automake 1.12
Richard Purdie (2):
bitbake: command: Add missing import traceback
bitbake: command: Fix getCmdLineAction bugs
Saul Wold (2):
libtasn1: Update to 2.12
libtasn1: Upgrade to 2.13
bitbake/lib/bb/command.py | 46 +++++++++++++-------
bitbake/lib/bb/server/process.py | 2 +-
bitbake/lib/bb/ui/crumbs/hobeventhandler.py | 5 ++-
bitbake/lib/bb/ui/depexp.py | 38 ++++++++++------
bitbake/lib/bb/ui/goggle.py | 17 +++++---
bitbake/lib/bb/ui/knotty.py | 45 +++++++++++++------
bitbake/lib/bb/ui/ncurses.py | 21 ++++++---
meta/recipes-devtools/bison/bison_2.5.bb | 4 +-
.../libtasn1/libtasn1_fix_for_automake_1.12.patch | 28 ++++++++++++
.../gnutls/{libtasn1_2.11.bb => libtasn1_2.13.bb} | 8 ++--
10 files changed, 150 insertions(+), 64 deletions(-)
create mode 100644 meta/recipes-support/gnutls/libtasn1/libtasn1_fix_for_automake_1.12.patch
rename meta/recipes-support/gnutls/{libtasn1_2.11.bb => libtasn1_2.13.bb} (65%)
--
1.7.9.5
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH 1/7] bison: move remove-gets.patch to BASE_SRC_URI, it's needed for bison-native too if host has (e)glibc-2.16 2013-01-27 23:41 [PATCH 0/7] denzil pull request Scott Garman @ 2013-01-27 23:41 ` Scott Garman 2013-01-27 23:41 ` [PATCH 2/7] libtasn1: Update to 2.12 Scott Garman ` (6 subsequent siblings) 7 siblings, 0 replies; 11+ messages in thread From: Scott Garman @ 2013-01-27 23:41 UTC (permalink / raw) To: poky From: Martin Jansa <martin.jansa@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- meta/recipes-devtools/bison/bison_2.5.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/recipes-devtools/bison/bison_2.5.bb b/meta/recipes-devtools/bison/bison_2.5.bb index e3f9273..4d82723 100644 --- a/meta/recipes-devtools/bison/bison_2.5.bb +++ b/meta/recipes-devtools/bison/bison_2.5.bb @@ -9,15 +9,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" SECTION = "devel" DEPENDS = "bison-native flex-native" -PR = "r2" +PR = "r3" BASE_SRC_URI = "${GNU_MIRROR}/bison/bison-${PV}.tar.gz \ file://m4.patch \ + file://remove-gets.patch \ " SRC_URI = "${BASE_SRC_URI} \ file://fix_cross_manpage_building.patch \ - file://remove-gets.patch \ " SRC_URI[md5sum] = "687e1dcd29452789d34eaeea4c25abe4" -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/7] libtasn1: Update to 2.12 2013-01-27 23:41 [PATCH 0/7] denzil pull request Scott Garman 2013-01-27 23:41 ` [PATCH 1/7] bison: move remove-gets.patch to BASE_SRC_URI, it's needed for bison-native too if host has (e)glibc-2.16 Scott Garman @ 2013-01-27 23:41 ` Scott Garman 2013-01-27 23:41 ` [PATCH 3/7] libtasn1: fix build with automake 1.12 Scott Garman ` (5 subsequent siblings) 7 siblings, 0 replies; 11+ messages in thread From: Scott Garman @ 2013-01-27 23:41 UTC (permalink / raw) To: poky From: Saul Wold <sgw@linux.intel.com> Use the GUN_MIRROR correctly Signed-off-by: Saul Wold <sgw@linux.intel.com> --- .../gnutls/{libtasn1_2.11.bb => libtasn1_2.12.bb} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename meta/recipes-support/gnutls/{libtasn1_2.11.bb => libtasn1_2.12.bb} (71%) diff --git a/meta/recipes-support/gnutls/libtasn1_2.11.bb b/meta/recipes-support/gnutls/libtasn1_2.12.bb similarity index 71% rename from meta/recipes-support/gnutls/libtasn1_2.11.bb rename to meta/recipes-support/gnutls/libtasn1_2.12.bb index 1a87fc8..aae409e 100644 --- a/meta/recipes-support/gnutls/libtasn1_2.11.bb +++ b/meta/recipes-support/gnutls/libtasn1_2.12.bb @@ -10,10 +10,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ PR = "r0" -SRC_URI = "ftp://ftp.gnu.org/gnu/libtasn1/libtasn1-${PV}.tar.gz" +SRC_URI = "${GNU_MIRROR}/libtasn1/libtasn1-${PV}.tar.gz" -SRC_URI[md5sum] = "ee8076752f2afcbcd12f3dd9bc622748" -SRC_URI[sha256sum] = "f4d43c77c12ceabf1a72911472fc8c67e43728b328dfb1b83fd519ed5d079afb" +SRC_URI[md5sum] = "4eba39fb962d6cf5a370267eae8ff52b" +SRC_URI[sha256sum] = "0e257a8a01c80e464f73262e13c226e04a15165c2ad087a340f53902281a1c5d" inherit autotools binconfig lib_package -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/7] libtasn1: fix build with automake 1.12 2013-01-27 23:41 [PATCH 0/7] denzil pull request Scott Garman 2013-01-27 23:41 ` [PATCH 1/7] bison: move remove-gets.patch to BASE_SRC_URI, it's needed for bison-native too if host has (e)glibc-2.16 Scott Garman 2013-01-27 23:41 ` [PATCH 2/7] libtasn1: Update to 2.12 Scott Garman @ 2013-01-27 23:41 ` Scott Garman 2013-01-27 23:41 ` [PATCH 4/7] libtasn1: Upgrade to 2.13 Scott Garman ` (4 subsequent siblings) 7 siblings, 0 replies; 11+ messages in thread From: Scott Garman @ 2013-01-27 23:41 UTC (permalink / raw) To: poky From: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> --- .../libtasn1/libtasn1_fix_for_automake_1.12.patch | 28 ++++++++++++++++++++ meta/recipes-support/gnutls/libtasn1_2.12.bb | 6 +++-- 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-support/gnutls/libtasn1/libtasn1_fix_for_automake_1.12.patch diff --git a/meta/recipes-support/gnutls/libtasn1/libtasn1_fix_for_automake_1.12.patch b/meta/recipes-support/gnutls/libtasn1/libtasn1_fix_for_automake_1.12.patch new file mode 100644 index 0000000..5540bef --- /dev/null +++ b/meta/recipes-support/gnutls/libtasn1/libtasn1_fix_for_automake_1.12.patch @@ -0,0 +1,28 @@ +Upstream-Status: Pending + +This patch avoids following issues with automake 1.12: + +| automake: warnings are treated as errors +| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/automake-1.12/am/ltlibrary.am: warning: 'libtasn1.la': linking libtool libraries using a non-POSIX +| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/automake-1.12/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac' + +Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> +2012/05/02 + + +Index: libtasn1-2.11/configure.ac +=================================================================== +--- libtasn1-2.11.orig/configure.ac ++++ libtasn1-2.11/configure.ac +@@ -38,6 +38,11 @@ lgl_EARLY + AC_PROG_YACC + AC_PROG_LN_S + ++# automake 1.12 seems to require this, but automake 1.11 doesn't recognize it ++m4_pattern_allow([AM_PROG_AR]) ++AM_PROG_AR ++ ++ + dnl Checks for programs. + AC_PROG_INSTALL + AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir) diff --git a/meta/recipes-support/gnutls/libtasn1_2.12.bb b/meta/recipes-support/gnutls/libtasn1_2.12.bb index aae409e..d0b4191 100644 --- a/meta/recipes-support/gnutls/libtasn1_2.12.bb +++ b/meta/recipes-support/gnutls/libtasn1_2.12.bb @@ -8,9 +8,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \ file://README;endline=8;md5=c3803a3e8ca5ab5eb1e5912faa405351" -PR = "r0" +PR = "r1" -SRC_URI = "${GNU_MIRROR}/libtasn1/libtasn1-${PV}.tar.gz" +SRC_URI = "${GNU_MIRROR}/libtasn1/libtasn1-${PV}.tar.gz \ + file://libtasn1_fix_for_automake_1.12.patch \ + " SRC_URI[md5sum] = "4eba39fb962d6cf5a370267eae8ff52b" SRC_URI[sha256sum] = "0e257a8a01c80e464f73262e13c226e04a15165c2ad087a340f53902281a1c5d" -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 4/7] libtasn1: Upgrade to 2.13 2013-01-27 23:41 [PATCH 0/7] denzil pull request Scott Garman ` (2 preceding siblings ...) 2013-01-27 23:41 ` [PATCH 3/7] libtasn1: fix build with automake 1.12 Scott Garman @ 2013-01-27 23:41 ` Scott Garman 2013-01-27 23:41 ` [PATCH 5/7] bitbake: command: add error to return of runCommand Scott Garman ` (3 subsequent siblings) 7 siblings, 0 replies; 11+ messages in thread From: Scott Garman @ 2013-01-27 23:41 UTC (permalink / raw) To: poky From: Saul Wold <sgw@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> --- .../gnutls/{libtasn1_2.12.bb => libtasn1_2.13.bb} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename meta/recipes-support/gnutls/{libtasn1_2.12.bb => libtasn1_2.13.bb} (80%) diff --git a/meta/recipes-support/gnutls/libtasn1_2.12.bb b/meta/recipes-support/gnutls/libtasn1_2.13.bb similarity index 80% rename from meta/recipes-support/gnutls/libtasn1_2.12.bb rename to meta/recipes-support/gnutls/libtasn1_2.13.bb index d0b4191..891c5b6 100644 --- a/meta/recipes-support/gnutls/libtasn1_2.12.bb +++ b/meta/recipes-support/gnutls/libtasn1_2.13.bb @@ -8,14 +8,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \ file://README;endline=8;md5=c3803a3e8ca5ab5eb1e5912faa405351" -PR = "r1" +PR = "r0" SRC_URI = "${GNU_MIRROR}/libtasn1/libtasn1-${PV}.tar.gz \ file://libtasn1_fix_for_automake_1.12.patch \ " -SRC_URI[md5sum] = "4eba39fb962d6cf5a370267eae8ff52b" -SRC_URI[sha256sum] = "0e257a8a01c80e464f73262e13c226e04a15165c2ad087a340f53902281a1c5d" +SRC_URI[md5sum] = "df27eaddcc46172377e6b907e33ddc83" +SRC_URI[sha256sum] = "a56e46483d1d42fe44ba58c9758620844042468d7c2d75f6318cdf3222745a91" inherit autotools binconfig lib_package -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 5/7] bitbake: command: add error to return of runCommand 2013-01-27 23:41 [PATCH 0/7] denzil pull request Scott Garman ` (3 preceding siblings ...) 2013-01-27 23:41 ` [PATCH 4/7] libtasn1: Upgrade to 2.13 Scott Garman @ 2013-01-27 23:41 ` Scott Garman 2013-01-27 23:41 ` [PATCH 6/7] bitbake: command: Add missing import traceback Scott Garman ` (2 subsequent siblings) 7 siblings, 0 replies; 11+ messages in thread From: Scott Garman @ 2013-01-27 23:41 UTC (permalink / raw) To: poky From: Christopher Larson <chris_larson@mentor.com> Currently, command.py can return an error message from runCommand, due to being unable to run the command, yet few of our UIs (just hob) can handle it today. This can result in seeing a TypeError with traceback in certain rare circumstances. To resolve this, we need a clean way to get errors back from runCommand, without having to isinstance() the return value. This implements such a thing by making runCommand also return an error (or None if no error occurred). As runCommand now has a method of returning errors, we can also alter the getCmdLineAction bits such that the returned value is just the action, not an additional message. If a sync command wants to return an error, it raises CommandError(message), and the message will be passed to the caller appropriately. Example Usage: result, error = server.runCommand(...) if error: log.error('Unable to run command: %s' % error) return 1 (Bitbake rev: 717831b8315cb3904d9b590e633000bc897e8fb6) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- bitbake/lib/bb/command.py | 43 +++++++++++++++---------- bitbake/lib/bb/server/process.py | 2 +- bitbake/lib/bb/ui/crumbs/hobeventhandler.py | 5 ++- bitbake/lib/bb/ui/depexp.py | 38 ++++++++++++++-------- bitbake/lib/bb/ui/goggle.py | 17 +++++----- bitbake/lib/bb/ui/knotty.py | 45 ++++++++++++++++++--------- bitbake/lib/bb/ui/ncurses.py | 21 ++++++++----- 7 files changed, 112 insertions(+), 59 deletions(-) diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index fd8912a..00b854e 100644 --- a/bitbake/lib/bb/command.py +++ b/bitbake/lib/bb/command.py @@ -44,6 +44,9 @@ class CommandFailed(CommandExit): self.error = message CommandExit.__init__(self, 1) +class CommandError(Exception): + pass + class Command: """ A queue of asynchronous commands for bitbake @@ -57,21 +60,25 @@ class Command: self.currentAsyncCommand = None def runCommand(self, commandline): - try: - command = commandline.pop(0) - if command in CommandsSync.__dict__: - # Can run synchronous commands straight away - return getattr(CommandsSync, command)(self.cmds_sync, self, commandline) - if self.currentAsyncCommand is not None: - return "Busy (%s in progress)" % self.currentAsyncCommand[0] - if command not in CommandsAsync.__dict__: - return "No such command" - self.currentAsyncCommand = (command, commandline) - self.cooker.server_registration_cb(self.cooker.runCommands, self.cooker) - return True - except: - import traceback - return traceback.format_exc() + command = commandline.pop(0) + if hasattr(CommandsSync, command): + # Can run synchronous commands straight away + command_method = getattr(self.cmds_sync, command) + try: + result = command_method(self, commandline) + except CommandError as exc: + return None, exc.args[0] + except Exception: + return None, traceback.format_exc() + else: + return result, None + if self.currentAsyncCommand is not None: + return None, "Busy (%s in progress)" % self.currentAsyncCommand[0] + if command not in CommandsAsync.__dict__: + return None, "No such command" + self.currentAsyncCommand = (command, commandline) + self.cooker.server_registration_cb(self.cooker.runCommands, self.cooker) + return True, None def runAsyncCommand(self): try: @@ -139,7 +146,11 @@ class CommandsSync: """ Get any command parsed from the commandline """ - return command.cooker.commandlineAction + cmd_action = command.cooker.commandlineAction + if cmd_action['msg']: + raise CommandError(msg) + else: + return cmd_action['action'] def getVariable(self, command, params): """ diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py index ba91336..3ae9ede 100644 --- a/bitbake/lib/bb/server/process.py +++ b/bitbake/lib/bb/server/process.py @@ -48,7 +48,7 @@ class ServerCommunicator(): if self.connection.poll(.5): return self.connection.recv() else: - return None + return None, "Timeout while attempting to communicate with bitbake server" except KeyboardInterrupt: pass diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py index 52acec1..21bea23 100644 --- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py +++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py @@ -102,7 +102,10 @@ class HobHandler(gobject.GObject): def runCommand(self, commandline): try: - return self.server.runCommand(commandline) + result, error = self.server.runCommand(commandline) + if error: + raise Exception("Error running command '%s': %s" % (commandline, error)) + return result except Exception as e: self.commands_async = [] self.clear_busy() diff --git a/bitbake/lib/bb/ui/depexp.py b/bitbake/lib/bb/ui/depexp.py index b62adbf..1254128 100644 --- a/bitbake/lib/bb/ui/depexp.py +++ b/bitbake/lib/bb/ui/depexp.py @@ -198,17 +198,23 @@ class gtkthread(threading.Thread): def main(server, eventHandler): try: - cmdline = server.runCommand(["getCmdLineAction"]) - if cmdline and not cmdline['action']: - print(cmdline['msg']) - return - elif not cmdline or (cmdline['action'] and cmdline['action'][0] != "generateDotGraph"): + cmdline, error = server.runCommand(["getCmdLineAction"]) + if error: + print("Error getting bitbake commandline: %s" % error) + return 1 + elif not cmdline: + print("Nothing to do. Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information.") + return 1 + elif not cmdline or cmdline[0] != "generateDotGraph": print("This UI is only compatible with the -g option") - return - ret = server.runCommand(["generateDepTreeEvent", cmdline['action'][1], cmdline['action'][2]]) - if ret != True: - print("Couldn't run command! %s" % ret) - return + return 1 + ret, error = server.runCommand(["generateDepTreeEvent", cmdline[1], cmdline[2]]) + if error: + print("Error running command '%s': %s" % (cmdline, error)) + return 1 + elif ret != True: + print("Error running command '%s': returned %s" % (cmdline, ret)) + return 1 except xmlrpclib.Fault as x: print("XMLRPC Fault getting commandline:\n %s" % x) return @@ -229,7 +235,9 @@ def main(server, eventHandler): try: event = eventHandler.waitEvent(0.25) if gtkthread.quit.isSet(): - server.runCommand(["stateStop"]) + _, error = server.runCommand(["stateStop"]) + if error: + print('Unable to cleanly stop: %s' % error) break if event is None: @@ -302,9 +310,13 @@ def main(server, eventHandler): break if shutdown == 1: print("\nSecond Keyboard Interrupt, stopping...\n") - server.runCommand(["stateStop"]) + _, error = server.runCommand(["stateStop"]) + if error: + print('Unable to cleanly stop: %s' % error) if shutdown == 0: print("\nKeyboard Interrupt, closing down...\n") - server.runCommand(["stateShutdown"]) + _, error = server.runCommand(["stateShutdown"]) + if error: + print('Unable to cleanly shutdown: %s' % error) shutdown = shutdown + 1 pass diff --git a/bitbake/lib/bb/ui/goggle.py b/bitbake/lib/bb/ui/goggle.py index b2fd274..c0785b7 100644 --- a/bitbake/lib/bb/ui/goggle.py +++ b/bitbake/lib/bb/ui/goggle.py @@ -80,16 +80,19 @@ def main (server, eventHandler): running_build.connect ("build-failed", running_build_failed_cb) try: - cmdline = server.runCommand(["getCmdLineAction"]) - if not cmdline: + cmdline, error = server.runCommand(["getCmdLineAction"]) + if err: + print("Error getting bitbake commandline: %s" % error) + return 1 + elif not cmdline: print("Nothing to do. Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information.") return 1 - elif not cmdline['action']: - print(cmdline['msg']) + ret, error = server.runCommand(cmdline) + if error: + print("Error running command '%s': %s" % (cmdline, error)) return 1 - ret = server.runCommand(cmdline['action']) - if ret != True: - print("Couldn't get default commandline! %s" % ret) + elif ret != True: + print("Error running command '%s': returned %s" % (cmdline, ret)) return 1 except xmlrpclib.Fault as x: print("XMLRPC Fault getting commandline:\n %s" % x) diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py index 0167416..439a792 100644 --- a/bitbake/lib/bb/ui/knotty.py +++ b/bitbake/lib/bb/ui/knotty.py @@ -107,9 +107,18 @@ class TerminalFilter(object): def main(server, eventHandler, tf = TerminalFilter): # Get values of variables which control our output - includelogs = server.runCommand(["getVariable", "BBINCLUDELOGS"]) - loglines = server.runCommand(["getVariable", "BBINCLUDELOGS_LINES"]) - consolelogfile = server.runCommand(["getVariable", "BB_CONSOLELOG"]) + includelogs, error = server.runCommand(["getVariable", "BBINCLUDELOGS"]) + if error: + logger.error("Unable to get the value of BBINCLUDELOGS variable: %s" % error) + return 1 + loglines, error = server.runCommand(["getVariable", "BBINCLUDELOGS_LINES"]) + if error: + logger.error("Unable to get the value of BBINCLUDELOGS_LINES variable: %s" % error) + return 1 + consolelogfile, error = server.runCommand(["getVariable", "BB_CONSOLELOG"]) + if error: + logger.error("Unable to get the value of BB_CONSOLELOG variable: %s" % error) + return 1 helper = uihelper.BBUIHelper() @@ -125,19 +134,22 @@ def main(server, eventHandler, tf = TerminalFilter): logger.addHandler(consolelog) try: - cmdline = server.runCommand(["getCmdLineAction"]) - if not cmdline: + cmdline, error = server.runCommand(["getCmdLineAction"]) + if error: + logger.error("Unable to get bitbake commandline arguments: %s" % error) + return 1 + elif not cmdline: print("Nothing to do. Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information.") return 1 - elif not cmdline['action']: - print(cmdline['msg']) + ret, error = server.runCommand(cmdline) + if error: + logger.error("Command '%s' failed: %s" % (cmdline, error)) return 1 - ret = server.runCommand(cmdline['action']) - if ret != True: - print("Couldn't get default commandline! %s" % ret) + elif ret != True: + logger.error("Command '%s' failed: returned %s" % (cmdline, ret)) return 1 except xmlrpclib.Fault as x: - print("XMLRPC Fault getting commandline:\n %s" % x) + logger.error("XMLRPC Fault getting commandline:\n %s" % x) return 1 parseprogress = None @@ -318,14 +330,19 @@ def main(server, eventHandler, tf = TerminalFilter): if ioerror.args[0] == 4: pass except KeyboardInterrupt: + import time termfilter.clearFooter() if main.shutdown == 1: print("\nSecond Keyboard Interrupt, stopping...\n") - server.runCommand(["stateStop"]) + _, error = server.runCommand(["stateStop"]) + if error: + logger.error("Unable to cleanly stop: %s" % error) if main.shutdown == 0: - interrupted = True print("\nKeyboard Interrupt, closing down...\n") - server.runCommand(["stateShutdown"]) + interrupted = True + _, error = server.runCommand(["stateShutdown"]) + if error: + logger.error("Unable to cleanly shutdown: %s" % error) main.shutdown = main.shutdown + 1 pass diff --git a/bitbake/lib/bb/ui/ncurses.py b/bitbake/lib/bb/ui/ncurses.py index 8524446..896ed01 100644 --- a/bitbake/lib/bb/ui/ncurses.py +++ b/bitbake/lib/bb/ui/ncurses.py @@ -230,15 +230,18 @@ class NCursesUI: shutdown = 0 try: - cmdline = server.runCommand(["getCmdLineAction"]) + cmdline, error = server.runCommand(["getCmdLineAction"]) if not cmdline: print("Nothing to do. Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information.") return - elif not cmdline['action']: - print(cmdline['msg']) + elif error: + print("Error getting bitbake commandline: %s" % error) return - ret = server.runCommand(cmdline['action']) - if ret != True: + ret, error = server.runCommand(cmdline) + if error: + print("Error running command '%s': %s" % (cmdline, error)) + return + elif ret != True: print("Couldn't get default commandlind! %s" % ret) return except xmlrpclib.Fault as x: @@ -337,10 +340,14 @@ class NCursesUI: exitflag = True if shutdown == 1: mw.appendText("Second Keyboard Interrupt, stopping...\n") - server.runCommand(["stateStop"]) + _, error = server.runCommand(["stateStop"]) + if error: + print("Unable to cleanly stop: %s" % error) if shutdown == 0: mw.appendText("Keyboard Interrupt, closing down...\n") - server.runCommand(["stateShutdown"]) + _, error = server.runCommand(["stateShutdown"]) + if error: + print("Unable to cleanly shutdown: %s" % error) shutdown = shutdown + 1 pass -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 6/7] bitbake: command: Add missing import traceback 2013-01-27 23:41 [PATCH 0/7] denzil pull request Scott Garman ` (4 preceding siblings ...) 2013-01-27 23:41 ` [PATCH 5/7] bitbake: command: add error to return of runCommand Scott Garman @ 2013-01-27 23:41 ` Scott Garman 2013-01-27 23:41 ` [PATCH 7/7] bitbake: command: Fix getCmdLineAction bugs Scott Garman 2013-01-28 12:44 ` [PATCH 0/7] denzil pull request Richard Purdie 7 siblings, 0 replies; 11+ messages in thread From: Scott Garman @ 2013-01-27 23:41 UTC (permalink / raw) To: poky From: Richard Purdie <richard.purdie@linuxfoundation.org> Without this, if an exception occurs the server will silently crash with no feedback to the user about why (since traceback isn't imported). (Bitbake rev: e637a635bf7b5a9a2e9dc20afc18aceec98d578f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- bitbake/lib/bb/command.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index 00b854e..c08e2ce 100644 --- a/bitbake/lib/bb/command.py +++ b/bitbake/lib/bb/command.py @@ -69,6 +69,7 @@ class Command: except CommandError as exc: return None, exc.args[0] except Exception: + import traceback return None, traceback.format_exc() else: return result, None -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 7/7] bitbake: command: Fix getCmdLineAction bugs 2013-01-27 23:41 [PATCH 0/7] denzil pull request Scott Garman ` (5 preceding siblings ...) 2013-01-27 23:41 ` [PATCH 6/7] bitbake: command: Add missing import traceback Scott Garman @ 2013-01-27 23:41 ` Scott Garman 2013-01-28 12:44 ` [PATCH 0/7] denzil pull request Richard Purdie 7 siblings, 0 replies; 11+ messages in thread From: Scott Garman @ 2013-01-27 23:41 UTC (permalink / raw) To: poky From: Richard Purdie <richard.purdie@linuxfoundation.org> Executing "bitbake" doesn't get a sane message since the None return value wasn't being handled correctly. Also fix msg -> cmd_action['msg'] as otherwise an invalid variable is accessed which then crashes the server due to the previous bug. (Bitbake rev: c6211291ae07410832031a5274690437cc2b09a6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- bitbake/lib/bb/command.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index c08e2ce..a143aed 100644 --- a/bitbake/lib/bb/command.py +++ b/bitbake/lib/bb/command.py @@ -148,8 +148,10 @@ class CommandsSync: Get any command parsed from the commandline """ cmd_action = command.cooker.commandlineAction - if cmd_action['msg']: - raise CommandError(msg) + if cmd_action is None: + return None + elif 'msg' in cmd_action and cmd_action['msg']: + raise CommandError(cmd_action['msg']) else: return cmd_action['action'] -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 0/7] denzil pull request 2013-01-27 23:41 [PATCH 0/7] denzil pull request Scott Garman ` (6 preceding siblings ...) 2013-01-27 23:41 ` [PATCH 7/7] bitbake: command: Fix getCmdLineAction bugs Scott Garman @ 2013-01-28 12:44 ` Richard Purdie 7 siblings, 0 replies; 11+ messages in thread From: Richard Purdie @ 2013-01-28 12:44 UTC (permalink / raw) To: Scott Garman; +Cc: poky On Sun, 2013-01-27 at 15:41 -0800, Scott Garman wrote: > Hello, > > This is a pull request for denzil. It includes a bitbake fix from > MatthewM (poky-based tree only) and some Fedora 18 build fixes from > Koen. [...] > The following changes since commit 3456295898bf157e40ea1f8c335f0b7285d3d8a7: > > build-appliance-image: Bump SRCREV (2013-01-04 22:23:43 +0000) > > are available in the git repository at: > > git://git.yoctoproject.org/poky-contrib sgarman/denzil-next > http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=sgarman/denzil-next > > Christopher Larson (1): > bitbake: command: add error to return of runCommand > > Martin Jansa (1): > bison: move remove-gets.patch to BASE_SRC_URI, it's needed for > bison-native too if host has (e)glibc-2.16 > > Nitin A Kamble (1): > libtasn1: fix build with automake 1.12 > > Richard Purdie (2): > bitbake: command: Add missing import traceback > bitbake: command: Fix getCmdLineAction bugs > > Saul Wold (2): > libtasn1: Update to 2.12 > libtasn1: Upgrade to 2.13 Merged to denzil, thanks. Richard ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 0/7] denzil pull request
@ 2012-06-04 21:00 Scott Garman
2012-06-05 22:10 ` Richard Purdie
0 siblings, 1 reply; 11+ messages in thread
From: Scott Garman @ 2012-06-04 21:00 UTC (permalink / raw)
To: poky
Hello,
This is a pull request for the poky denzil branch, based on a set of
commits I've been testing from my sgarman/denzil-next branch.
These commits have passed an array of build and runtime tests,
including the following nightly build:
http://autobuilder.yoctoproject.org:8010/builders/nightly/builds/492
a non-gplv3 build:
http://autobuilder.yoctoproject.org:8010/builders/nightly-non-gpl3/builds/87
and a tiny build:
http://autobuilder.yoctoproject.org:8010/builders/nightly-tiny/builds/69
Please give this pull request a few days to receive feedback and ACKs
from the community.
Thanks,
Scott
The following changes since commit 7552ccd06c6327b5f36ee0cceb432946f8e98d3f:
documentation/yocto-project-qs/yocto-project-qs.xml: pre-built example fix (2012-05-31 21:22:29 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib sgarman/denzil-next-testing
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=sgarman/denzil-next-pull1
Dongxiao Xu (1):
Hob: Clear the building status if command failed
Liming An (2):
Hob: change the refresh icon speed to make it view clear
Hob: add original url show function with the tooltip hyperlink for
user
Richard Purdie (2):
netbase: Correctly set FILESEXTRAPATHS to include the version
Update version to 1.15.2 (correspdoning to Yocto 1.2 release)
Tom Zanussi (2):
yocto-kernel: use BUILDDIR to find bblayers.conf
yocto-bsp: clarify help with reference to meta-intel
bitbake/bin/bitbake | 2 +-
bitbake/lib/bb/__init__.py | 2 +-
bitbake/lib/bb/ui/crumbs/hobeventhandler.py | 2 +
bitbake/lib/bb/ui/crumbs/hobwidget.py | 2 +-
bitbake/lib/bb/ui/crumbs/persistenttooltip.py | 19 ++++++++
.../recipes-core/netbase/netbase_4.47.bbappend | 2 +-
scripts/lib/bsp/help.py | 48 ++++++++++++++++++--
scripts/lib/bsp/kernel.py | 7 ++-
8 files changed, 75 insertions(+), 9 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH 0/7] denzil pull request 2012-06-04 21:00 Scott Garman @ 2012-06-05 22:10 ` Richard Purdie 0 siblings, 0 replies; 11+ messages in thread From: Richard Purdie @ 2012-06-05 22:10 UTC (permalink / raw) To: Scott Garman; +Cc: poky On Mon, 2012-06-04 at 14:00 -0700, Scott Garman wrote: > This is a pull request for the poky denzil branch, based on a set of > commits I've been testing from my sgarman/denzil-next branch. > > These commits have passed an array of build and runtime tests, > including the following nightly build: > > http://autobuilder.yoctoproject.org:8010/builders/nightly/builds/492 > > a non-gplv3 build: > > http://autobuilder.yoctoproject.org:8010/builders/nightly-non-gpl3/builds/87 > > and a tiny build: > > http://autobuilder.yoctoproject.org:8010/builders/nightly-tiny/builds/69 I've merged these into poky's denzil branch, thanks. Richard ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2013-01-28 12:45 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-01-27 23:41 [PATCH 0/7] denzil pull request Scott Garman 2013-01-27 23:41 ` [PATCH 1/7] bison: move remove-gets.patch to BASE_SRC_URI, it's needed for bison-native too if host has (e)glibc-2.16 Scott Garman 2013-01-27 23:41 ` [PATCH 2/7] libtasn1: Update to 2.12 Scott Garman 2013-01-27 23:41 ` [PATCH 3/7] libtasn1: fix build with automake 1.12 Scott Garman 2013-01-27 23:41 ` [PATCH 4/7] libtasn1: Upgrade to 2.13 Scott Garman 2013-01-27 23:41 ` [PATCH 5/7] bitbake: command: add error to return of runCommand Scott Garman 2013-01-27 23:41 ` [PATCH 6/7] bitbake: command: Add missing import traceback Scott Garman 2013-01-27 23:41 ` [PATCH 7/7] bitbake: command: Fix getCmdLineAction bugs Scott Garman 2013-01-28 12:44 ` [PATCH 0/7] denzil pull request Richard Purdie -- strict thread matches above, loose matches on Subject: below -- 2012-06-04 21:00 Scott Garman 2012-06-05 22:10 ` Richard Purdie
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.