1
0
mirror of https://git.yoctoproject.org/poky synced 2026-07-16 15:57:04 +00:00

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>
This commit is contained in:
Paul Eggleton
2016-03-09 17:48:49 +13:00
committed by Richard Purdie
parent 1607fac521
commit 2b6a35212d
2 changed files with 50 additions and 8 deletions
+20 -2
View File
@@ -1,6 +1,6 @@
# Recipe creation tool - create command plugin
#
# Copyright (C) 2014-2015 Intel Corporation
# Copyright (C) 2014-2016 Intel Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
@@ -44,6 +44,7 @@ class RecipeHandler(object):
recipelibmap = {}
recipeheadermap = {}
recipecmakefilemap = {}
recipebinmap = {}
@staticmethod
def load_libmap(d):
@@ -121,6 +122,23 @@ class RecipeHandler(object):
for fn in cmakefiles:
RecipeHandler.recipecmakefilemap[fn] = pn
@staticmethod
def load_binmap(d):
'''Build up native binary->recipe mapping'''
if RecipeHandler.recipebinmap:
return
sstate_manifests = d.getVar('SSTATE_MANIFESTS', True)
staging_bindir_native = d.getVar('STAGING_BINDIR_NATIVE', True)
build_arch = d.getVar('BUILD_ARCH', True)
fileprefix = 'manifest-%s-' % build_arch
for fn in glob.glob(os.path.join(sstate_manifests, '%s*-native.populate_sysroot' % fileprefix)):
with open(fn, 'r') as f:
pn = os.path.basename(fn).rsplit('.', 1)[0][len(fileprefix):]
for line in f:
if line.startswith(staging_bindir_native):
prog = os.path.basename(line.rstrip())
RecipeHandler.recipebinmap[prog] = pn
@staticmethod
def checkfiles(path, speclist, recursive=False):
results = []
@@ -143,7 +161,7 @@ class RecipeHandler(object):
RecipeHandler.load_libmap(d)
ignorelibs = ['socket']
ignoredeps = ['gcc-runtime', 'glibc', 'uclibc', 'musl', 'tar-native', 'binutils-native']
ignoredeps = ['gcc-runtime', 'glibc', 'uclibc', 'musl', 'tar-native', 'binutils-native', 'coreutils-native']
unmappedpc = []
pcdeps = list(set(pcdeps))