[oe-commits] [bitbake] 01/14: knotty: provide a symlink to the latest console log

git at git.openembedded.org git at git.openembedded.org
Fri Jul 1 15:42:00 UTC 2016


rpurdie pushed a commit to branch master-next
in repository bitbake.

commit e9f41c0507a6527bf2ed86506813d4d4a89f8ebf
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
AuthorDate: Thu Jun 23 22:59:03 2016 +1200

    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.
    
    Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/ui/knotty.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py
index 9605c8e..ddd36d5 100644
--- a/lib/bb/ui/knotty.py
+++ b/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])

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list