diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-07-28 14:27:33 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-08-02 15:44:10 +0100 |
commit | 65133015b1cf545a0c86177ce471a0b2b9340d5c (patch) | |
tree | 2d24b99d759e7b7e611217dcc686ae0fe85a671e /meta/lib | |
parent | bb6ddc3691ab04162ec5fd69a2d5e7876713fd15 (diff) | |
download | poky-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')
-rw-r--r-- | meta/lib/oe/classextend.py | 4 | ||||
-rw-r--r-- | meta/lib/oe/recipeutils.py | 16 | ||||
-rw-r--r-- | meta/lib/oe/sstatesig.py | 2 | ||||
-rw-r--r-- | meta/lib/oeqa/selftest/cases/efibootpartition.py | 2 | ||||
-rw-r--r-- | meta/lib/oeqa/selftest/cases/incompatible_lic.py | 6 | ||||
-rw-r--r-- | meta/lib/oeqa/selftest/cases/recipetool.py | 4 | ||||
-rw-r--r-- | meta/lib/oeqa/selftest/cases/wic.py | 4 |
7 files changed, 19 insertions, 19 deletions
diff --git a/meta/lib/oe/classextend.py b/meta/lib/oe/classextend.py index d3d8fbe724..e08d788b75 100644 --- a/meta/lib/oe/classextend.py +++ b/meta/lib/oe/classextend.py | |||
@@ -87,7 +87,7 @@ class ClassExtender(object): | |||
87 | def map_depends_variable(self, varname, suffix = ""): | 87 | def map_depends_variable(self, varname, suffix = ""): |
88 | # We need to preserve EXTENDPKGV so it can be expanded correctly later | 88 | # We need to preserve EXTENDPKGV so it can be expanded correctly later |
89 | if suffix: | 89 | if suffix: |
90 | varname = varname + "_" + suffix | 90 | varname = varname + ":" + suffix |
91 | orig = self.d.getVar("EXTENDPKGV", False) | 91 | orig = self.d.getVar("EXTENDPKGV", False) |
92 | self.d.setVar("EXTENDPKGV", "EXTENDPKGV") | 92 | self.d.setVar("EXTENDPKGV", "EXTENDPKGV") |
93 | deps = self.d.getVar(varname) | 93 | deps = self.d.getVar(varname) |
@@ -142,7 +142,7 @@ class ClassExtender(object): | |||
142 | if pkg_mapping[0].startswith("${") and pkg_mapping[0].endswith("}"): | 142 | if pkg_mapping[0].startswith("${") and pkg_mapping[0].endswith("}"): |
143 | continue | 143 | continue |
144 | for subs in variables: | 144 | for subs in variables: |
145 | self.d.renameVar("%s_%s" % (subs, pkg_mapping[0]), "%s_%s" % (subs, pkg_mapping[1])) | 145 | self.d.renameVar("%s:%s" % (subs, pkg_mapping[0]), "%s:%s" % (subs, pkg_mapping[1])) |
146 | 146 | ||
147 | class NativesdkClassExtender(ClassExtender): | 147 | class NativesdkClassExtender(ClassExtender): |
148 | def map_depends(self, dep): | 148 | def map_depends(self, dep): |
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('()'): |
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py index f460c50c10..78cdf878f1 100644 --- a/meta/lib/oe/sstatesig.py +++ b/meta/lib/oe/sstatesig.py | |||
@@ -246,7 +246,7 @@ class SignatureGeneratorOEBasicHashMixIn(object): | |||
246 | continue | 246 | continue |
247 | f.write(" " + self.lockedpnmap[fn] + ":" + task + ":" + self.get_unihash(tid) + " \\\n") | 247 | f.write(" " + self.lockedpnmap[fn] + ":" + task + ":" + self.get_unihash(tid) + " \\\n") |
248 | f.write(' "\n') | 248 | f.write(' "\n') |
249 | f.write('SIGGEN_LOCKEDSIGS_TYPES_%s = "%s"' % (self.machine, " ".join(l))) | 249 | f.write('SIGGEN_LOCKEDSIGS_TYPES:%s = "%s"' % (self.machine, " ".join(l))) |
250 | 250 | ||
251 | def dump_siglist(self, sigfile, path_prefix_strip=None): | 251 | def dump_siglist(self, sigfile, path_prefix_strip=None): |
252 | def strip_fn(fn): | 252 | def strip_fn(fn): |
diff --git a/meta/lib/oeqa/selftest/cases/efibootpartition.py b/meta/lib/oeqa/selftest/cases/efibootpartition.py index 3203a7b71d..26de3a07c9 100644 --- a/meta/lib/oeqa/selftest/cases/efibootpartition.py +++ b/meta/lib/oeqa/selftest/cases/efibootpartition.py | |||
@@ -26,7 +26,7 @@ class GenericEFITest(OESelftestTestCase): | |||
26 | self.write_config(self, | 26 | self.write_config(self, |
27 | """ | 27 | """ |
28 | EFI_PROVIDER = "%s" | 28 | EFI_PROVIDER = "%s" |
29 | IMAGE_FSTYPES:pn-%s_append = " wic" | 29 | IMAGE_FSTYPES:pn-%s:append = " wic" |
30 | MACHINE = "%s" | 30 | MACHINE = "%s" |
31 | MACHINE_FEATURES:append = " efi" | 31 | MACHINE_FEATURES:append = " efi" |
32 | WKS_FILE = "efi-bootdisk.wks.in" | 32 | WKS_FILE = "efi-bootdisk.wks.in" |
diff --git a/meta/lib/oeqa/selftest/cases/incompatible_lic.py b/meta/lib/oeqa/selftest/cases/incompatible_lic.py index 93be434650..aa8e085754 100644 --- a/meta/lib/oeqa/selftest/cases/incompatible_lic.py +++ b/meta/lib/oeqa/selftest/cases/incompatible_lic.py | |||
@@ -98,7 +98,7 @@ INCOMPATIBLE_LICENSE:pn-core-image-minimal = "GPL-3.0 LGPL-3.0" | |||
98 | raise AssertionError(result.output) | 98 | raise AssertionError(result.output) |
99 | 99 | ||
100 | def test_bash_and_license(self): | 100 | def test_bash_and_license(self): |
101 | self.write_config(self.default_config() + '\nLICENSE_append_pn-bash = " & SomeLicense"') | 101 | self.write_config(self.default_config() + '\nLICENSE:append:pn-bash = " & SomeLicense"') |
102 | error_msg = "ERROR: core-image-minimal-1.0-r0 do_rootfs: Package bash cannot be installed into the image because it has incompatible license(s): GPL-3.0-or-later" | 102 | error_msg = "ERROR: core-image-minimal-1.0-r0 do_rootfs: Package bash cannot be installed into the image because it has incompatible license(s): GPL-3.0-or-later" |
103 | 103 | ||
104 | result = bitbake('core-image-minimal', ignore_status=True) | 104 | result = bitbake('core-image-minimal', ignore_status=True) |
@@ -106,12 +106,12 @@ INCOMPATIBLE_LICENSE:pn-core-image-minimal = "GPL-3.0 LGPL-3.0" | |||
106 | raise AssertionError(result.output) | 106 | raise AssertionError(result.output) |
107 | 107 | ||
108 | def test_bash_or_license(self): | 108 | def test_bash_or_license(self): |
109 | self.write_config(self.default_config() + '\nLICENSE_append_pn-bash = " | SomeLicense"') | 109 | self.write_config(self.default_config() + '\nLICENSE:append:pn-bash = " | SomeLicense"') |
110 | 110 | ||
111 | bitbake('core-image-minimal') | 111 | bitbake('core-image-minimal') |
112 | 112 | ||
113 | def test_bash_whitelist(self): | 113 | def test_bash_whitelist(self): |
114 | self.write_config(self.default_config() + '\nWHITELIST_GPL-3.0_pn-core-image-minimal = "bash"') | 114 | self.write_config(self.default_config() + '\nWHITELIST_GPL-3.0:pn-core-image-minimal = "bash"') |
115 | 115 | ||
116 | bitbake('core-image-minimal') | 116 | bitbake('core-image-minimal') |
117 | 117 | ||
diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py index 3b99417e84..6f531dfa36 100644 --- a/meta/lib/oeqa/selftest/cases/recipetool.py +++ b/meta/lib/oeqa/selftest/cases/recipetool.py | |||
@@ -183,9 +183,9 @@ class RecipetoolTests(RecipetoolBase): | |||
183 | '\n', | 183 | '\n', |
184 | 'PACKAGE_ARCH = "${MACHINE_ARCH}"\n', | 184 | 'PACKAGE_ARCH = "${MACHINE_ARCH}"\n', |
185 | '\n', | 185 | '\n', |
186 | 'SRC_URI:append_mymachine = " file://testfile"\n', | 186 | 'SRC_URI:append:mymachine = " file://testfile"\n', |
187 | '\n', | 187 | '\n', |
188 | 'do_install:append_mymachine() {\n', | 188 | 'do_install:append:mymachine() {\n', |
189 | ' install -d ${D}${datadir}\n', | 189 | ' install -d ${D}${datadir}\n', |
190 | ' install -m 0644 ${WORKDIR}/testfile ${D}${datadir}/something\n', | 190 | ' install -m 0644 ${WORKDIR}/testfile ${D}${datadir}/something\n', |
191 | '}\n'] | 191 | '}\n'] |
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py index 32044e74d0..2efbe514c1 100644 --- a/meta/lib/oeqa/selftest/cases/wic.py +++ b/meta/lib/oeqa/selftest/cases/wic.py | |||
@@ -1035,7 +1035,7 @@ class Wic2(WicTestCase): | |||
1035 | @only_for_arch(['i586', 'i686', 'x86_64']) | 1035 | @only_for_arch(['i586', 'i686', 'x86_64']) |
1036 | def test_biosplusefi_plugin_qemu(self): | 1036 | def test_biosplusefi_plugin_qemu(self): |
1037 | """Test biosplusefi plugin in qemu""" | 1037 | """Test biosplusefi plugin in qemu""" |
1038 | config = 'IMAGE_FSTYPES = "wic"\nWKS_FILE = "test_biosplusefi_plugin.wks"\nMACHINE_FEATURES_append = " efi"\n' | 1038 | config = 'IMAGE_FSTYPES = "wic"\nWKS_FILE = "test_biosplusefi_plugin.wks"\nMACHINE_FEATURES:append = " efi"\n' |
1039 | self.append_config(config) | 1039 | self.append_config(config) |
1040 | self.assertEqual(0, bitbake('core-image-minimal').status) | 1040 | self.assertEqual(0, bitbake('core-image-minimal').status) |
1041 | self.remove_config(config) | 1041 | self.remove_config(config) |
@@ -1072,7 +1072,7 @@ class Wic2(WicTestCase): | |||
1072 | # If an image hasn't been built yet, directory ${STAGING_DATADIR}/syslinux won't exists and _get_bootimg_dir() | 1072 | # If an image hasn't been built yet, directory ${STAGING_DATADIR}/syslinux won't exists and _get_bootimg_dir() |
1073 | # will raise with "Couldn't find correct bootimg_dir" | 1073 | # will raise with "Couldn't find correct bootimg_dir" |
1074 | # The easiest way to work-around this issue is to make sure we already built an image here, hence the bitbake call | 1074 | # The easiest way to work-around this issue is to make sure we already built an image here, hence the bitbake call |
1075 | config = 'IMAGE_FSTYPES = "wic"\nWKS_FILE = "test_biosplusefi_plugin.wks"\nMACHINE_FEATURES_append = " efi"\n' | 1075 | config = 'IMAGE_FSTYPES = "wic"\nWKS_FILE = "test_biosplusefi_plugin.wks"\nMACHINE_FEATURES:append = " efi"\n' |
1076 | self.append_config(config) | 1076 | self.append_config(config) |
1077 | self.assertEqual(0, bitbake('core-image-minimal').status) | 1077 | self.assertEqual(0, bitbake('core-image-minimal').status) |
1078 | self.remove_config(config) | 1078 | self.remove_config(config) |