summaryrefslogtreecommitdiffstats
path: root/scripts/oe-pkgdata-util
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/oe-pkgdata-util')
-rwxr-xr-xscripts/oe-pkgdata-util19
1 files changed, 7 insertions, 12 deletions
diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util
index 17e946e1e4..03c8f95305 100755
--- a/scripts/oe-pkgdata-util
+++ b/scripts/oe-pkgdata-util
@@ -262,25 +262,20 @@ def find_path(args, usage, debug=False):
262 print('ERROR: Unable to find pkgdata directory %s' % pkgdata_dir) 262 print('ERROR: Unable to find pkgdata directory %s' % pkgdata_dir)
263 sys.exit(1) 263 sys.exit(1)
264 264
265 import ast 265 import json
266 import fnmatch 266 import fnmatch
267 267
268 for root, dirs, files in os.walk(os.path.join(pkgdata_dir, 'runtime')): 268 for root, dirs, files in os.walk(os.path.join(pkgdata_dir, 'runtime')):
269 for fn in files: 269 for fn in files:
270 pkgsplitname = '/packages-split/%s' % fn
271 with open(os.path.join(root,fn)) as f: 270 with open(os.path.join(root,fn)) as f:
272 for line in f: 271 for line in f:
273 if line.startswith('FILES_INFO:'): 272 if line.startswith('FILES_INFO:'):
274 val = line.split(':', 1)[1].strip().replace('\\\'', '\'') 273 val = line.split(':', 1)[1].strip()
275 dictval = ast.literal_eval(val) 274 dictval = json.loads(val)
276 for parent, dirlist in dictval.items(): 275 for fullpth in dictval.keys():
277 idx = parent.find(pkgsplitname) 276 if fnmatch.fnmatchcase(fullpth, targetpath):
278 if idx > -1: 277 print("%s: %s" % (fn, fullpth))
279 parent = parent[idx+len(pkgsplitname):] 278 break
280 for basename in dirlist:
281 fullpth = os.path.join(parent, basename)
282 if fnmatch.fnmatchcase(fullpth, targetpath):
283 print("%s: %s" % (fn, fullpth))
284 279
285 280
286def main(): 281def main():