summaryrefslogtreecommitdiffstats
path: root/meta/classes/archiver.bbclass
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2016-12-14 21:13:06 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-16 10:23:23 +0000
commit3c59b1bf93adb0b9f723bda1d8702c8720733677 (patch)
treed1939643e2d02f0ce2e9ef33e235cd23cd5000d3 /meta/classes/archiver.bbclass
parentc0f2890c01882e9ea14e781c044f3a84f75bd0fc (diff)
downloadpoky-3c59b1bf93adb0b9f723bda1d8702c8720733677.tar.gz
meta: remove True option to getVarFlag calls
getVarFlag() now defaults to expanding by default, thus remove the True option from getVarFlag() calls with a regex search and replace. Search made with the following regex: getVarFlag ?\(( ?[^,()]*, ?[^,()]*), True\) (From OE-Core rev: 2dea9e490a98377010b3d4118d054814c317a735) 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 'meta/classes/archiver.bbclass')
-rw-r--r--meta/classes/archiver.bbclass28
1 files changed, 14 insertions, 14 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 52959776c3..ee4790dd68 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -73,9 +73,9 @@ python () {
73 bb.debug(1, 'archiver: %s is excluded, covered by gcc-source' % pn) 73 bb.debug(1, 'archiver: %s is excluded, covered by gcc-source' % pn)
74 return 74 return
75 75
76 ar_src = d.getVarFlag('ARCHIVER_MODE', 'src', True) 76 ar_src = d.getVarFlag('ARCHIVER_MODE', 'src')
77 ar_dumpdata = d.getVarFlag('ARCHIVER_MODE', 'dumpdata', True) 77 ar_dumpdata = d.getVarFlag('ARCHIVER_MODE', 'dumpdata')
78 ar_recipe = d.getVarFlag('ARCHIVER_MODE', 'recipe', True) 78 ar_recipe = d.getVarFlag('ARCHIVER_MODE', 'recipe')
79 79
80 if ar_src == "original": 80 if ar_src == "original":
81 d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_ar_original' % pn) 81 d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_ar_original' % pn)
@@ -104,7 +104,7 @@ python () {
104 d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_ar_recipe' % pn) 104 d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_ar_recipe' % pn)
105 105
106 # Output the srpm package 106 # Output the srpm package
107 ar_srpm = d.getVarFlag('ARCHIVER_MODE', 'srpm', True) 107 ar_srpm = d.getVarFlag('ARCHIVER_MODE', 'srpm')
108 if ar_srpm == "1": 108 if ar_srpm == "1":
109 if d.getVar('PACKAGES') != '' and d.getVar('IMAGE_PKGTYPE') == 'rpm': 109 if d.getVar('PACKAGES') != '' and d.getVar('IMAGE_PKGTYPE') == 'rpm':
110 d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_package_write_rpm' % pn) 110 d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_package_write_rpm' % pn)
@@ -127,7 +127,7 @@ python do_ar_original() {
127 127
128 import shutil, tempfile 128 import shutil, tempfile
129 129
130 if d.getVarFlag('ARCHIVER_MODE', 'src', True) != "original": 130 if d.getVarFlag('ARCHIVER_MODE', 'src') != "original":
131 return 131 return
132 132
133 ar_outdir = d.getVar('ARCHIVER_OUTDIR') 133 ar_outdir = d.getVar('ARCHIVER_OUTDIR')
@@ -191,7 +191,7 @@ python do_ar_original() {
191 191
192python do_ar_patched() { 192python do_ar_patched() {
193 193
194 if d.getVarFlag('ARCHIVER_MODE', 'src', True) != 'patched': 194 if d.getVarFlag('ARCHIVER_MODE', 'src') != 'patched':
195 return 195 return
196 196
197 # Get the ARCHIVER_OUTDIR before we reset the WORKDIR 197 # Get the ARCHIVER_OUTDIR before we reset the WORKDIR
@@ -206,7 +206,7 @@ python do_ar_configured() {
206 import shutil 206 import shutil
207 207
208 ar_outdir = d.getVar('ARCHIVER_OUTDIR') 208 ar_outdir = d.getVar('ARCHIVER_OUTDIR')
209 if d.getVarFlag('ARCHIVER_MODE', 'src', True) == 'configured': 209 if d.getVarFlag('ARCHIVER_MODE', 'src') == 'configured':
210 bb.note('Archiving the configured source...') 210 bb.note('Archiving the configured source...')
211 pn = d.getVar('PN') 211 pn = d.getVar('PN')
212 # "gcc-source-${PV}" recipes don't have "do_configure" 212 # "gcc-source-${PV}" recipes don't have "do_configure"
@@ -226,12 +226,12 @@ python do_ar_configured() {
226 bb.build.exec_func('do_kernel_configme', d) 226 bb.build.exec_func('do_kernel_configme', d)
227 if bb.data.inherits_class('cmake', d): 227 if bb.data.inherits_class('cmake', d):
228 bb.build.exec_func('do_generate_toolchain_file', d) 228 bb.build.exec_func('do_generate_toolchain_file', d)
229 prefuncs = d.getVarFlag('do_configure', 'prefuncs', True) 229 prefuncs = d.getVarFlag('do_configure', 'prefuncs')
230 for func in (prefuncs or '').split(): 230 for func in (prefuncs or '').split():
231 if func != "sysroot_cleansstate": 231 if func != "sysroot_cleansstate":
232 bb.build.exec_func(func, d) 232 bb.build.exec_func(func, d)
233 bb.build.exec_func('do_configure', d) 233 bb.build.exec_func('do_configure', d)
234 postfuncs = d.getVarFlag('do_configure', 'postfuncs', True) 234 postfuncs = d.getVarFlag('do_configure', 'postfuncs')
235 for func in (postfuncs or '').split(): 235 for func in (postfuncs or '').split():
236 if func != "do_qa_configure": 236 if func != "do_qa_configure":
237 bb.build.exec_func(func, d) 237 bb.build.exec_func(func, d)
@@ -279,7 +279,7 @@ def create_diff_gz(d, src_orig, src, ar_outdir):
279 # exclude. 279 # exclude.
280 src_patched = src + '.patched' 280 src_patched = src + '.patched'
281 oe.path.copyhardlinktree(src, src_patched) 281 oe.path.copyhardlinktree(src, src_patched)
282 for i in d.getVarFlag('ARCHIVER_MODE', 'diff-exclude', True).split(): 282 for i in d.getVarFlag('ARCHIVER_MODE', 'diff-exclude').split():
283 bb.utils.remove(os.path.join(src_orig, i), recurse=True) 283 bb.utils.remove(os.path.join(src_orig, i), recurse=True)
284 bb.utils.remove(os.path.join(src_patched, i), recurse=True) 284 bb.utils.remove(os.path.join(src_patched, i), recurse=True)
285 285
@@ -293,9 +293,9 @@ def create_diff_gz(d, src_orig, src, ar_outdir):
293 293
294# Run do_unpack and do_patch 294# Run do_unpack and do_patch
295python do_unpack_and_patch() { 295python do_unpack_and_patch() {
296 if d.getVarFlag('ARCHIVER_MODE', 'src', True) not in \ 296 if d.getVarFlag('ARCHIVER_MODE', 'src') not in \
297 [ 'patched', 'configured'] and \ 297 [ 'patched', 'configured'] and \
298 d.getVarFlag('ARCHIVER_MODE', 'diff', True) != '1': 298 d.getVarFlag('ARCHIVER_MODE', 'diff') != '1':
299 return 299 return
300 ar_outdir = d.getVar('ARCHIVER_OUTDIR') 300 ar_outdir = d.getVar('ARCHIVER_OUTDIR')
301 ar_workdir = d.getVar('ARCHIVER_WORKDIR') 301 ar_workdir = d.getVar('ARCHIVER_WORKDIR')
@@ -314,7 +314,7 @@ python do_unpack_and_patch() {
314 bb.build.exec_func('do_unpack', d) 314 bb.build.exec_func('do_unpack', d)
315 315
316 # Save the original source for creating the patches 316 # Save the original source for creating the patches
317 if d.getVarFlag('ARCHIVER_MODE', 'diff', True) == '1': 317 if d.getVarFlag('ARCHIVER_MODE', 'diff') == '1':
318 src = d.getVar('S').rstrip('/') 318 src = d.getVar('S').rstrip('/')
319 src_orig = '%s.orig' % src 319 src_orig = '%s.orig' % src
320 oe.path.copytree(src, src_orig) 320 oe.path.copytree(src, src_orig)
@@ -324,7 +324,7 @@ python do_unpack_and_patch() {
324 bb.build.exec_func('do_patch', d) 324 bb.build.exec_func('do_patch', d)
325 325
326 # Create the patches 326 # Create the patches
327 if d.getVarFlag('ARCHIVER_MODE', 'diff', True) == '1': 327 if d.getVarFlag('ARCHIVER_MODE', 'diff') == '1':
328 bb.note('Creating diff gz...') 328 bb.note('Creating diff gz...')
329 create_diff_gz(d, src_orig, src, ar_outdir) 329 create_diff_gz(d, src_orig, src, ar_outdir)
330 bb.utils.remove(src_orig, recurse=True) 330 bb.utils.remove(src_orig, recurse=True)