aboutsummaryrefslogtreecommitdiffstats
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)
downloadopenembedded-core-contrib-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 @@
#!/usr/bin/env python
##
-## This script will scan all of the packages in ${OEROOT}/pstage (or argv[1])
+## This script will scan all of the packages in PSTAGE_DIR (or argv[1])
## in search of packages which install files outside of their native sysroot
##
@@ -16,15 +16,24 @@ def main():
"""Generate a list of pstage packages and scan them for badness"""
package_list = []
- ## First we walk the pstage directory, let's assume we're running from
- ## a sibling of pstage (i.e. scripts) if no path defined
try:
path = sysv.arg[1]
except:
- path = os.path.join(os.environ.get("OEROOT"), "pstage")
+ # Assume pstage is a child of tmp, Poky's default
+ tmpdir = None
+ sub.Popen(["bitbake", "-e"], stdout=sub.PIPE,stderr=sub.PIPE)
+ err, out = p.communicate()
+ if (!out):
+ print("bitbake not in your environment, try pstage-scanner /some/path/to/pstage")
+ exit
+ for line in out:
+ if line.find("PSTAGE_DIR=") != -1:
+ tmpdir = line.partition("=")[2].strip("\"")
+ break
if len(path) < 1 or not os.path.exists(path):
- path = os.path.join(os.environ.get("OEROOT"), "pstage")
+ print ("No path defined and bitbake not in your environment, try pstage-scanner /some/path/to/pstage")
+ exit
global logf
try: