summaryrefslogtreecommitdiffstats
path: root/scripts/pstage-scanner
diff options
context:
space:
mode:
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: