buildhistory-diff: prepend to sys.path

Submitted by Christopher Larson on Jan. 8, 2013, 8:31 p.m.

Details

Message ID 1357677067-26082-1-git-send-email-kergoth@gmail.com
State Accepted
Commit 036e8fc414e8a4aab245be64ff0aefdc54cae0c3
Headers show

Commit Message

Christopher Larson Jan. 8, 2013, 8:31 p.m.
From: Christopher Larson <chris_larson@mentor.com>

This ensures that regardless of what else is in our search path, we always use
the bitbake corresponding to the running buildhistory-diff command.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 scripts/buildhistory-diff | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/scripts/buildhistory-diff b/scripts/buildhistory-diff
index 3f27eab..8493da4 100755
--- a/scripts/buildhistory-diff
+++ b/scripts/buildhistory-diff
@@ -44,7 +44,7 @@  def main():
             print("Unable to find bitbake by searching parent directory of this script or PATH")
             sys.exit(1)
 
-    sys.path.extend([newpath, bitbakepath + '/lib'])
+    sys.path[0:0] = [newpath, bitbakepath + '/lib']
     import oe.buildhistory_analysis
 
     if len(sys.argv) > 3: