summaryrefslogtreecommitdiffstats
path: root/scripts/bitbake-whatchanged
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/bitbake-whatchanged')
-rwxr-xr-xscripts/bitbake-whatchanged18
1 files changed, 9 insertions, 9 deletions
diff --git a/scripts/bitbake-whatchanged b/scripts/bitbake-whatchanged
index e4497e03a8..55cfe4b234 100755
--- a/scripts/bitbake-whatchanged
+++ b/scripts/bitbake-whatchanged
@@ -27,17 +27,17 @@ import warnings
27import subprocess 27import subprocess
28from optparse import OptionParser 28from optparse import OptionParser
29 29
30# Figure out where is the bitbake/lib/bb since we need bb.siggen and bb.process 30scripts_path = os.path.abspath(os.path.dirname(os.path.abspath(sys.argv[0])))
31p = subprocess.Popen("bash -c 'echo $(dirname $(which bitbake-diffsigs | grep -v \'^alias\'))/../lib'", 31lib_path = scripts_path + '/lib'
32 shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) 32sys.path = sys.path + [lib_path]
33 33
34err = p.stderr.read() 34import scriptpath
35if err:
36 print("ERROR: Failed to locate bitbake-diffsigs:", file=sys.stderr)
37 print(err, file=sys.stderr)
38 sys.exit(1)
39 35
40sys.path.insert(0, p.stdout.read().rstrip('\n')) 36# Figure out where is the bitbake/lib/bb since we need bb.siggen and bb.process
37bitbakepath = scriptpath.add_bitbake_lib_path()
38if not bitbakepath:
39 sys.stderr.write("Unable to find bitbake by searching parent directory of this script or PATH\n")
40 sys.exit(1)
41 41
42import bb.siggen 42import bb.siggen
43import bb.process 43import bb.process