summaryrefslogtreecommitdiffstats
path: root/scripts/lib/recipetool/create.py
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2016-12-14 21:13:05 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-16 10:23:23 +0000
commitc0f2890c01882e9ea14e781c044f3a84f75bd0fc (patch)
tree0962d17b0bf752ba4c009fb624f044b89fd6fd87 /scripts/lib/recipetool/create.py
parentc4e2c59088765d1f1de7ec57cde91980f887c2ff (diff)
downloadpoky-c0f2890c01882e9ea14e781c044f3a84f75bd0fc.tar.gz
scripts: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 0a36bd96e6b29fd99a296efc358ca3e9fb5af735) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@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.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index ab265318e5..0801223582 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -68,8 +68,8 @@ class RecipeHandler(object):
68 return 68 return
69 # First build up library->package mapping 69 # First build up library->package mapping
70 shlib_providers = oe.package.read_shlib_providers(d) 70 shlib_providers = oe.package.read_shlib_providers(d)
71 libdir = d.getVar('libdir', True) 71 libdir = d.getVar('libdir')
72 base_libdir = d.getVar('base_libdir', True) 72 base_libdir = d.getVar('base_libdir')
73 libpaths = list(set([base_libdir, libdir])) 73 libpaths = list(set([base_libdir, libdir]))
74 libname_re = re.compile('^lib(.+)\.so.*$') 74 libname_re = re.compile('^lib(.+)\.so.*$')
75 pkglibmap = {} 75 pkglibmap = {}
@@ -85,7 +85,7 @@ class RecipeHandler(object):
85 logger.debug('unable to extract library name from %s' % lib) 85 logger.debug('unable to extract library name from %s' % lib)
86 86
87 # Now turn it into a library->recipe mapping 87 # Now turn it into a library->recipe mapping
88 pkgdata_dir = d.getVar('PKGDATA_DIR', True) 88 pkgdata_dir = d.getVar('PKGDATA_DIR')
89 for libname, pkg in pkglibmap.items(): 89 for libname, pkg in pkglibmap.items():
90 try: 90 try:
91 with open(os.path.join(pkgdata_dir, 'runtime', pkg)) as f: 91 with open(os.path.join(pkgdata_dir, 'runtime', pkg)) as f:
@@ -109,9 +109,9 @@ class RecipeHandler(object):
109 '''Build up development file->recipe mapping''' 109 '''Build up development file->recipe mapping'''
110 if RecipeHandler.recipeheadermap: 110 if RecipeHandler.recipeheadermap:
111 return 111 return
112 pkgdata_dir = d.getVar('PKGDATA_DIR', True) 112 pkgdata_dir = d.getVar('PKGDATA_DIR')
113 includedir = d.getVar('includedir', True) 113 includedir = d.getVar('includedir')
114 cmakedir = os.path.join(d.getVar('libdir', True), 'cmake') 114 cmakedir = os.path.join(d.getVar('libdir'), 'cmake')
115 for pkg in glob.glob(os.path.join(pkgdata_dir, 'runtime', '*-dev')): 115 for pkg in glob.glob(os.path.join(pkgdata_dir, 'runtime', '*-dev')):
116 with open(os.path.join(pkgdata_dir, 'runtime', pkg)) as f: 116 with open(os.path.join(pkgdata_dir, 'runtime', pkg)) as f:
117 pn = None 117 pn = None
@@ -140,9 +140,9 @@ class RecipeHandler(object):
140 '''Build up native binary->recipe mapping''' 140 '''Build up native binary->recipe mapping'''
141 if RecipeHandler.recipebinmap: 141 if RecipeHandler.recipebinmap:
142 return 142 return
143 sstate_manifests = d.getVar('SSTATE_MANIFESTS', True) 143 sstate_manifests = d.getVar('SSTATE_MANIFESTS')
144 staging_bindir_native = d.getVar('STAGING_BINDIR_NATIVE', True) 144 staging_bindir_native = d.getVar('STAGING_BINDIR_NATIVE')
145 build_arch = d.getVar('BUILD_ARCH', True) 145 build_arch = d.getVar('BUILD_ARCH')
146 fileprefix = 'manifest-%s-' % build_arch 146 fileprefix = 'manifest-%s-' % build_arch
147 for fn in glob.glob(os.path.join(sstate_manifests, '%s*-native.populate_sysroot' % fileprefix)): 147 for fn in glob.glob(os.path.join(sstate_manifests, '%s*-native.populate_sysroot' % fileprefix)):
148 with open(fn, 'r') as f: 148 with open(fn, 'r') as f:
@@ -837,7 +837,7 @@ def get_license_md5sums(d, static_only=False):
837 md5sums = {} 837 md5sums = {}
838 if not static_only: 838 if not static_only:
839 # Gather md5sums of license files in common license dir 839 # Gather md5sums of license files in common license dir
840 commonlicdir = d.getVar('COMMON_LICENSE_DIR', True) 840 commonlicdir = d.getVar('COMMON_LICENSE_DIR')
841 for fn in os.listdir(commonlicdir): 841 for fn in os.listdir(commonlicdir):
842 md5value = bb.utils.md5_file(os.path.join(commonlicdir, fn)) 842 md5value = bb.utils.md5_file(os.path.join(commonlicdir, fn))
843 md5sums[md5value] = fn 843 md5sums[md5value] = fn
@@ -1007,7 +1007,7 @@ def split_pkg_licenses(licvalues, packages, outlines, fallback_licenses=None, pn
1007 return outlicenses 1007 return outlicenses
1008 1008
1009def read_pkgconfig_provides(d): 1009def read_pkgconfig_provides(d):
1010 pkgdatadir = d.getVar('PKGDATA_DIR', True) 1010 pkgdatadir = d.getVar('PKGDATA_DIR')
1011 pkgmap = {} 1011 pkgmap = {}
1012 for fn in glob.glob(os.path.join(pkgdatadir, 'shlibs2', '*.pclist')): 1012 for fn in glob.glob(os.path.join(pkgdatadir, 'shlibs2', '*.pclist')):
1013 with open(fn, 'r') as f: 1013 with open(fn, 'r') as f:
@@ -1117,7 +1117,7 @@ def convert_rpm_xml(xmlfile):
1117 1117
1118 1118
1119def check_npm(d, debugonly=False): 1119def check_npm(d, debugonly=False):
1120 if not os.path.exists(os.path.join(d.getVar('STAGING_BINDIR_NATIVE', True), 'npm')): 1120 if not os.path.exists(os.path.join(d.getVar('STAGING_BINDIR_NATIVE'), 'npm')):
1121 log_error_cond('npm required to process specified source, but npm is not available - you need to build nodejs-native first', debugonly) 1121 log_error_cond('npm required to process specified source, but npm is not available - you need to build nodejs-native first', debugonly)
1122 sys.exit(14) 1122 sys.exit(14)
1123 1123