summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/recipeutils.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-07-28 14:27:33 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-02 15:44:10 +0100
commit65133015b1cf545a0c86177ce471a0b2b9340d5c (patch)
tree2d24b99d759e7b7e611217dcc686ae0fe85a671e /meta/lib/oe/recipeutils.py
parentbb6ddc3691ab04162ec5fd69a2d5e7876713fd15 (diff)
downloadpoky-65133015b1cf545a0c86177ce471a0b2b9340d5c.tar.gz
meta: Manual override fixes
The automated conversion of OE-Core to use the new override sytax isn't perfect. This patches some mis-converted lines and some lines which were missed by the automation. (From OE-Core rev: 4e9a06b64b43131b731fb59a0305f78a98e27fbd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/recipeutils.py')
-rw-r--r--meta/lib/oe/recipeutils.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index a66bb92823..a0c6974f04 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -47,7 +47,7 @@ def simplify_history(history, d):
47 continue 47 continue
48 has_set = True 48 has_set = True
49 elif event['op'] in ('append', 'prepend', 'postdot', 'predot'): 49 elif event['op'] in ('append', 'prepend', 'postdot', 'predot'):
50 # Reminder: "append" and "prepend" mean += and =+ respectively, NOT _append / _prepend 50 # Reminder: "append" and "prepend" mean += and =+ respectively, NOT :append / :prepend
51 if has_set: 51 if has_set:
52 continue 52 continue
53 ret_history.insert(0, event) 53 ret_history.insert(0, event)
@@ -342,7 +342,7 @@ def patch_recipe(d, fn, varvalues, patch=False, relpath='', redirect_output=None
342 def override_applicable(hevent): 342 def override_applicable(hevent):
343 op = hevent['op'] 343 op = hevent['op']
344 if '[' in op: 344 if '[' in op:
345 opoverrides = op.split('[')[1].split(']')[0].split('_') 345 opoverrides = op.split('[')[1].split(']')[0].split(':')
346 for opoverride in opoverrides: 346 for opoverride in opoverrides:
347 if not opoverride in overrides: 347 if not opoverride in overrides:
348 return False 348 return False
@@ -368,13 +368,13 @@ def patch_recipe(d, fn, varvalues, patch=False, relpath='', redirect_output=None
368 recipe_set = True 368 recipe_set = True
369 if not recipe_set: 369 if not recipe_set:
370 for event in history: 370 for event in history:
371 if event['op'].startswith('_remove'): 371 if event['op'].startswith(':remove'):
372 continue 372 continue
373 if not override_applicable(event): 373 if not override_applicable(event):
374 continue 374 continue
375 newvalue = value.replace(event['detail'], '') 375 newvalue = value.replace(event['detail'], '')
376 if newvalue == value and os.path.abspath(event['file']) == fn and event['op'].startswith('_'): 376 if newvalue == value and os.path.abspath(event['file']) == fn and event['op'].startswith(':'):
377 op = event['op'].replace('[', '_').replace(']', '') 377 op = event['op'].replace('[', ':').replace(']', '')
378 extravals[var + op] = None 378 extravals[var + op] = None
379 value = newvalue 379 value = newvalue
380 vals[var] = ('+=', value) 380 vals[var] = ('+=', value)
@@ -758,7 +758,7 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
758 appendoverride = '' 758 appendoverride = ''
759 if machine: 759 if machine:
760 bbappendlines.append(('PACKAGE_ARCH', '=', '${MACHINE_ARCH}')) 760 bbappendlines.append(('PACKAGE_ARCH', '=', '${MACHINE_ARCH}'))
761 appendoverride = '_%s' % machine 761 appendoverride = ':%s' % machine
762 copyfiles = {} 762 copyfiles = {}
763 if srcfiles: 763 if srcfiles:
764 instfunclines = [] 764 instfunclines = []
@@ -853,11 +853,11 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
853 newvalue = splitval 853 newvalue = splitval
854 if len(newvalue) == 1: 854 if len(newvalue) == 1:
855 # Ensure it's written out as one line 855 # Ensure it's written out as one line
856 if '_append' in varname: 856 if ':append' in varname:
857 newvalue = ' ' + newvalue[0] 857 newvalue = ' ' + newvalue[0]
858 else: 858 else:
859 newvalue = newvalue[0] 859 newvalue = newvalue[0]
860 if not newvalue and (op in ['+=', '.='] or '_append' in varname): 860 if not newvalue and (op in ['+=', '.='] or ':append' in varname):
861 # There's no point appending nothing 861 # There's no point appending nothing
862 newvalue = None 862 newvalue = None
863 if varname.endswith('()'): 863 if varname.endswith('()'):