diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-03-09 17:48:49 +1300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-09 17:00:29 +0000 |
commit | 2b6a35212dca1c6f6e85ac7be18f1ac70c7a8bd6 (patch) | |
tree | c8293b80c5236ff2a211d6f40526a01a28969346 /scripts/lib/recipetool/create.py | |
parent | 1607fac5210437dd13a96017dc65c5f2f46dbf65 (diff) | |
download | poky-2b6a35212dca1c6f6e85ac7be18f1ac70c7a8bd6.tar.gz |
recipetool: create: improve mapping for autotools program macros
Make the following improvements to mapping items specified in
AC_CHECK_PROG, AC_PATH_PROG and AX_WITH_PROG to recipes/classes:
* Produce a map of native recipe -> binary for all binaries currently in
STAGING_BINDIR_NATIVE and use this when mapping items
* Add some more entries to the class map
* Ignore autotools binaries since they are covered by the inherit of
autotools
* Ignore coreutils-native since that would almost always be a bogus
dependency
(From OE-Core rev: 5614c5ae6a004d4367eccc34dd3cc7ee61fb7e57)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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)) |