From 971907567cff64e74f21d349d6751dadc8c09827 Mon Sep 17 00:00:00 2001 From: Joshua Lock Date: Wed, 21 Jul 2010 14:55:39 +0100 Subject: 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 <> $ 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 --- scripts/pstage-scanner | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'scripts/pstage-scanner') 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: -- cgit v1.2.3-54-g00ecf