diff --git a/meta-ohos-core/classes/ohos-sanity.bbclass b/meta-ohos-core/classes/oniro-sanity.bbclass similarity index 72% rename from meta-ohos-core/classes/ohos-sanity.bbclass rename to meta-ohos-core/classes/oniro-sanity.bbclass index e0e77938c227ec3d6af1ab0334fd34415791db2a..64a6f3837bb3e816e5f347922a45d93710d2c5b2 100644 --- a/meta-ohos-core/classes/ohos-sanity.bbclass +++ b/meta-ohos-core/classes/oniro-sanity.bbclass @@ -3,16 +3,16 @@ # SPDX-License-Identifier: Apache-2.0 # Deprecated collections can be either completely removed or replaced by -# another layer. The format of OHOS_DEPRECATED_COLLECTIONS is a list of +# another layer. The format of ONIRO_DEPRECATED_COLLECTIONS is a list of # <DEPRECATED_COLLECTION>:<REPLACEMENT_COLLECTION>. When # <REPLACEMENT_COLLECTION> is not provided, the layer was removed without a # replacement. -OHOS_DEPRECATED_COLLECTIONS = " \ +ONIRO_DEPRECATED_COLLECTIONS = " \ meta-ohos-demo:meta-ohos-blueprints \ " -# Same format as for OHOS_DEPRECATED_COLLECTIONS but for DISTRO configurations. -OHOS_DEPRECATED_DISTROS = " \ +# Same format as for ONIRO_DEPRECATED_COLLECTIONS but for DISTRO configurations. +ONIRO_DEPRECATED_DISTROS = " \ allscenarios-linux-demo-dashboard:allscenarios-linux-blueprint-dashboard \ " @@ -20,8 +20,8 @@ def unpack_deprecation(elem) -> 'Tuple[str, str]': elem_split = elem.split(sep=':', maxsplit=1) return (elem_split[0], elem_split[1] if len(elem_split) == 2 else '') -def ohos_is_valid_config() -> bool: - """Handles AllScenariOS build configuration sanity checks.""" +def oniro_is_valid_config() -> bool: + """Handles Oniro Project build configuration sanity checks.""" # By default assume no fatal errors success = True @@ -29,7 +29,7 @@ def ohos_is_valid_config() -> bool: # # Layers deprecation # - for deprecation in d.getVar('OHOS_DEPRECATED_COLLECTIONS').split(): + for deprecation in d.getVar('ONIRO_DEPRECATED_COLLECTIONS').split(): (deprecated, new) = unpack_deprecation(deprecation) if deprecated in d.getVar('BBFILE_COLLECTIONS').split(): if new: @@ -51,7 +51,7 @@ def ohos_is_valid_config() -> bool: # # DISTRO deprecation # - for deprecation in d.getVar('OHOS_DEPRECATED_DISTROS').split(): + for deprecation in d.getVar('ONIRO_DEPRECATED_DISTROS').split(): (deprecated, new) = unpack_deprecation(deprecation) if deprecated == d.getVar('DISTRO'): if new: @@ -64,13 +64,13 @@ def ohos_is_valid_config() -> bool: return success -python ohos_sanity_handler() { - if d.getVar('OHOS_SANITY_SKIP', True) == "1": - bb.warn('AllScenariOS-specific sanity checks were skipped.') +python oniro_sanity_handler() { + if d.getVar('ONIRO_SANITY_SKIP', True) == "1": + bb.warn('Oniro-specific sanity checks were skipped.') return - if not ohos_is_valid_config(): - bb.fatal("AllScenariOS sanity checks included fatal errors. See above.") + if not oniro_is_valid_config(): + bb.fatal("Oniro Project sanity checks included fatal errors. See above.") } -addhandler ohos_sanity_handler -ohos_sanity_handler[eventmask] = "bb.event.BuildStarted" +addhandler oniro_sanity_handler +oniro_sanity_handler[eventmask] = "bb.event.BuildStarted" diff --git a/meta-ohos-core/conf/distro/include/allscenarios.inc b/meta-ohos-core/conf/distro/include/allscenarios.inc index 8e3a422baa06cae1f5997dbf677750b3f2ed7430..2ee631af6625d6a4135bbb82157dd5e66bace63a 100644 --- a/meta-ohos-core/conf/distro/include/allscenarios.inc +++ b/meta-ohos-core/conf/distro/include/allscenarios.inc @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: Apache-2.0 -INHERIT += "ohos-sanity" +INHERIT += "oniro-sanity" # With our layer setup we would add any bbappend found from our # layers.conf. This means blueprint-specific appends would leak