summaryrefslogtreecommitdiffstats
path: root/scripts/pstage-scanner
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2010-07-21 14:55:39 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-21 15:39:53 +0100
commit971907567cff64e74f21d349d6751dadc8c09827 (patch)
treee0cfd7ee0ba3091272eca5c5f1b90edffc3653aa /scripts/pstage-scanner
parent50629b3746c149b22bdd8664842a4c69abb2b989 (diff)
downloadpoky-971907567cff64e74f21d349d6751dadc8c09827.tar.gz
Enable build dir outside of the poky directory
You need to first set up the build directory by sourcing the poky build script, after that builds can be run in that directory so long as bitbake is in $PATH removing the need to source the init script for each build. i.e: $ . poky-init-build-env ~/my-build $ bitbake some-image <<later, in a different shell>> $ cd ~/my-build $ export PATH=/path/to/bitbake/bin:$PATH $ bitbake an-image This patch also removes use of OEROOT in recipes, etc. Signed-off-by: Joshua Lock <josh@linux.intel.com>
Diffstat (limited to 'scripts/pstage-scanner')
-rwxr-xr-xscripts/pstage-scanner19
1 files changed, 14 insertions, 5 deletions
diff --git a/scripts/pstage-scanner b/scripts/pstage-scanner
index 9234912581..4a27aa5d26 100755
--- a/scripts/pstage-scanner
+++ b/scripts/pstage-scanner
@@ -1,7 +1,7 @@
1#!/usr/bin/env python 1#!/usr/bin/env python
2 2
3## 3##
4## This script will scan all of the packages in ${OEROOT}/pstage (or argv[1]) 4## This script will scan all of the packages in PSTAGE_DIR (or argv[1])
5## in search of packages which install files outside of their native sysroot 5## in search of packages which install files outside of their native sysroot
6## 6##
7 7
@@ -16,15 +16,24 @@ def main():
16 """Generate a list of pstage packages and scan them for badness""" 16 """Generate a list of pstage packages and scan them for badness"""
17 package_list = [] 17 package_list = []
18 18
19 ## First we walk the pstage directory, let's assume we're running from
20 ## a sibling of pstage (i.e. scripts) if no path defined
21 try: 19 try:
22 path = sysv.arg[1] 20 path = sysv.arg[1]
23 except: 21 except:
24 path = os.path.join(os.environ.get("OEROOT"), "pstage") 22 # Assume pstage is a child of tmp, Poky's default
23 tmpdir = None
24 sub.Popen(["bitbake", "-e"], stdout=sub.PIPE,stderr=sub.PIPE)
25 err, out = p.communicate()
26 if (!out):
27 print("bitbake not in your environment, try pstage-scanner /some/path/to/pstage")
28 exit
29 for line in out:
30 if line.find("PSTAGE_DIR=") != -1:
31 tmpdir = line.partition("=")[2].strip("\"")
32 break
25 33
26 if len(path) < 1 or not os.path.exists(path): 34 if len(path) < 1 or not os.path.exists(path):
27 path = os.path.join(os.environ.get("OEROOT"), "pstage") 35 print ("No path defined and bitbake not in your environment, try pstage-scanner /some/path/to/pstage")
36 exit
28 37
29 global logf 38 global logf
30 try: 39 try: