aboutsummaryrefslogtreecommitdiffstats
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):
print('ERROR: Unable to find pkgdata directory %s' % pkgdata_dir)
sys.exit(1)
- import ast
+ import json
import fnmatch
for root, dirs, files in os.walk(os.path.join(pkgdata_dir, 'runtime')):
for fn in files:
- pkgsplitname = '/packages-split/%s' % fn
with open(os.path.join(root,fn)) as f:
for line in f:
if line.startswith('FILES_INFO:'):
- val = line.split(':', 1)[1].strip().replace('\\\'', '\'')
- dictval = ast.literal_eval(val)
- for parent, dirlist in dictval.items():
- idx = parent.find(pkgsplitname)
- if idx > -1:
- parent = parent[idx+len(pkgsplitname):]
- for basename in dirlist:
- fullpth = os.path.join(parent, basename)
- if fnmatch.fnmatchcase(fullpth, targetpath):
- print("%s: %s" % (fn, fullpth))
+ val = line.split(':', 1)[1].strip()
+ dictval = json.loads(val)
+ for fullpth in dictval.keys():
+ if fnmatch.fnmatchcase(fullpth, targetpath):
+ print("%s: %s" % (fn, fullpth))
+ break
def main():