From: Paul Eggleton Date: Thu, 23 Jun 2016 10:59:03 +0000 (+1200) Subject: bitbake: knotty: provide a symlink to the latest console log X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=481048cd2a64a08501bb5ea7ec0bc9ef0a9a5cc9;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git bitbake: knotty: provide a symlink to the latest console log If you're looking to find the latest console log repeatedly it can be a bit tedious - let's just create a symlink just as we do with other logs to make it easy to find. (Bitbake rev: e9f41c0507a6527bf2ed86506813d4d4a89f8ebf) Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py index 9605c8ee506..ddd36d50f69 100644 --- a/bitbake/lib/bb/ui/knotty.py +++ b/bitbake/lib/bb/ui/knotty.py @@ -287,6 +287,12 @@ def main(server, eventHandler, params, tf = TerminalFilter): bb.msg.addDefaultlogFilter(consolelog) consolelog.setFormatter(conlogformat) logger.addHandler(consolelog) + loglink = os.path.join(os.path.dirname(consolelogfile), 'console-latest.log') + bb.utils.remove(loglink) + try: + os.symlink(os.path.basename(consolelogfile), loglink) + except OSError: + pass llevel, debug_domains = bb.msg.constructLogOptions() server.runCommand(["setEventMask", server.getEventHandle(), llevel, debug_domains, _evt_list])