There are now several scripts in scripts/ that need to be able to find bitbake and add its lib/bb directory to sys.path. Each of these scripts is doing this in a different way; it would be an improvement if we had one function to do this that all of the python scripts under scripts/ could make use of. Scripts that need to do this currently include: scripts/bitbake-whatchanged scripts/buildhistory-diff scripts/contrib/list-packageconfig-flags.py
Merged to master: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=2b4e1506f054fded57dd361c347bdb25ddd9e245
Verified with poky master:03c6fd0caab0ea8dcc2e0c3ab827a287a4f36910