diff options
Diffstat (limited to 'scripts/lib/recipetool/create.py')
| -rw-r--r-- | scripts/lib/recipetool/create.py | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py index 7560cdf7cc..a77c1910db 100644 --- a/scripts/lib/recipetool/create.py +++ b/scripts/lib/recipetool/create.py | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # Recipe creation tool - create command plugin | 1 | # Recipe creation tool - create command plugin |
| 2 | # | 2 | # |
| 3 | # Copyright (C) 2014-2015 Intel Corporation | 3 | # Copyright (C) 2014-2016 Intel Corporation |
| 4 | # | 4 | # |
| 5 | # This program is free software; you can redistribute it and/or modify | 5 | # This program is free software; you can redistribute it and/or modify |
| 6 | # it under the terms of the GNU General Public License version 2 as | 6 | # it under the terms of the GNU General Public License version 2 as |
| @@ -44,6 +44,7 @@ class RecipeHandler(object): | |||
| 44 | recipelibmap = {} | 44 | recipelibmap = {} |
| 45 | recipeheadermap = {} | 45 | recipeheadermap = {} |
| 46 | recipecmakefilemap = {} | 46 | recipecmakefilemap = {} |
| 47 | recipebinmap = {} | ||
| 47 | 48 | ||
| 48 | @staticmethod | 49 | @staticmethod |
| 49 | def load_libmap(d): | 50 | def load_libmap(d): |
| @@ -122,6 +123,23 @@ class RecipeHandler(object): | |||
| 122 | RecipeHandler.recipecmakefilemap[fn] = pn | 123 | RecipeHandler.recipecmakefilemap[fn] = pn |
| 123 | 124 | ||
| 124 | @staticmethod | 125 | @staticmethod |
| 126 | def load_binmap(d): | ||
| 127 | '''Build up native binary->recipe mapping''' | ||
| 128 | if RecipeHandler.recipebinmap: | ||
| 129 | return | ||
| 130 | sstate_manifests = d.getVar('SSTATE_MANIFESTS', True) | ||
| 131 | staging_bindir_native = d.getVar('STAGING_BINDIR_NATIVE', True) | ||
| 132 | build_arch = d.getVar('BUILD_ARCH', True) | ||
| 133 | fileprefix = 'manifest-%s-' % build_arch | ||
| 134 | for fn in glob.glob(os.path.join(sstate_manifests, '%s*-native.populate_sysroot' % fileprefix)): | ||
| 135 | with open(fn, 'r') as f: | ||
| 136 | pn = os.path.basename(fn).rsplit('.', 1)[0][len(fileprefix):] | ||
| 137 | for line in f: | ||
| 138 | if line.startswith(staging_bindir_native): | ||
| 139 | prog = os.path.basename(line.rstrip()) | ||
| 140 | RecipeHandler.recipebinmap[prog] = pn | ||
| 141 | |||
| 142 | @staticmethod | ||
| 125 | def checkfiles(path, speclist, recursive=False): | 143 | def checkfiles(path, speclist, recursive=False): |
| 126 | results = [] | 144 | results = [] |
| 127 | if recursive: | 145 | if recursive: |
| @@ -143,7 +161,7 @@ class RecipeHandler(object): | |||
| 143 | RecipeHandler.load_libmap(d) | 161 | RecipeHandler.load_libmap(d) |
| 144 | 162 | ||
| 145 | ignorelibs = ['socket'] | 163 | ignorelibs = ['socket'] |
| 146 | ignoredeps = ['gcc-runtime', 'glibc', 'uclibc', 'musl', 'tar-native', 'binutils-native'] | 164 | ignoredeps = ['gcc-runtime', 'glibc', 'uclibc', 'musl', 'tar-native', 'binutils-native', 'coreutils-native'] |
| 147 | 165 | ||
| 148 | unmappedpc = [] | 166 | unmappedpc = [] |
| 149 | pcdeps = list(set(pcdeps)) | 167 | pcdeps = list(set(pcdeps)) |
