summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-03-20 16:06:24 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-21 15:33:06 +0000
commit0b8a693fb4154a7efa811178ff166a9d3fb8a211 (patch)
treee4376dfaa746ac27df29cbb8aea4d5e74c3c4135 /scripts
parentfb7eeb395402ce6ec923cd4be411de2ddbe61310 (diff)
downloadast2050-yocto-poky-0b8a693fb4154a7efa811178ff166a9d3fb8a211.zip
ast2050-yocto-poky-0b8a693fb4154a7efa811178ff166a9d3fb8a211.tar.gz
buildhistory_analysis: use bb.utils.explode_dep_versions
Previously this had its own implementation of splitting a list of packages with optional version e.g. "libncurses-dev (>= 5.9)"; switch to using the already existing bitbake function which does this as it is much better tested. (From OE-Core rev: de21a483063d9803c4ce1d62b03913ccad2931bd) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/buildhistory-diff21
1 files changed, 18 insertions, 3 deletions
diff --git a/scripts/buildhistory-diff b/scripts/buildhistory-diff
index 6b344eb..9936a4b 100755
--- a/scripts/buildhistory-diff
+++ b/scripts/buildhistory-diff
@@ -6,7 +6,7 @@
# Author: Paul Eggleton <paul.eggleton@linux.intel.com>
import sys
-import os.path
+import os
# Ensure PythonGit is installed (buildhistory_analysis needs it)
try:
@@ -24,8 +24,23 @@ def main():
sys.exit(1)
# Set path to OE lib dir so we can import the buildhistory_analysis module
- newpath = os.path.abspath(os.path.dirname(os.path.abspath(sys.argv[0])) + '/../meta/lib')
- sys.path = sys.path + [newpath]
+ basepath = os.path.abspath(os.path.dirname(os.path.abspath(sys.argv[0])) + '/..')
+ newpath = basepath + '/meta/lib'
+ # Set path to bitbake lib dir so the buildhistory_analysis module can load bb.utils
+ if os.path.exists(basepath + '/bitbake/lib/bb'):
+ bitbakepath = basepath + '/bitbake'
+ else:
+ # look for bitbake/bin dir in PATH
+ bitbakepath = None
+ for pth in os.environ['PATH'].split(':'):
+ if os.path.exists(os.path.join(pth, '../lib/bb')):
+ bitbakepath = os.path.abspath(os.path.join(pth, '..'))
+ break
+ if not bitbakepath:
+ print("Unable to find bitbake by searching parent directory of this script or PATH")
+ sys.exit(1)
+
+ sys.path.extend([newpath, bitbakepath + '/lib'])
import oe.buildhistory_analysis
if len(sys.argv) > 3:
OpenPOWER on IntegriCloud