Skip to content
Snippets Groups Projects
Commit fd7d7bf7 authored by Pavel Zhukov's avatar Pavel Zhukov
Browse files

Add layer to keep supportability tools and metadata


Signed-off-by: default avatarPavel Zhukov <pavel.zhukov@huawei.com>
parent ab61e5cf
No related branches found
No related tags found
No related merge requests found
# SPDX-FileCopyrightText: Huawei Inc.
#
# SPDX-License-Identifier: Apache-2.0
# This class provides a mechanism to analize image and provide developers with
# "supportability" status of the project
SUPPORT_LOG_DIR ?= "${LOG_DIR}/supportability/"
SUPPORT_LOG_FILE ?= "${SUPPORT_LOG_DIR}/supportability.txt"
SUPPORT_EXCLUDE_LAYERS ?= ""
addtask supportability_report before do_fetch
python do_supportability_report () {
support = d.getVar("SUPPORT_LEVEL") or "0"
pn = d.getVar("PN" or "%unknown%")
if d.getVar("SUPPORT_SILENT") != "1":
if support.strip() == "Unsupported":
bb.error("The \"{pn}\" package is unsupported by Oniro Project." \
"Please check your image dependencies and consider replacement {pn} with an alternative".format(pn=pn))
}
def support_status():
ret = ""
ret += "{}\n".format(d.getVar("SUPPORT_LEVEL") or "0")
return ret
python do_generate_report () {
deploy_file = d.getVar("SUPPORT_LOG_DIR")
bb.utils.mkdirhier(os.path.dirname(deploy_file))
with open(REPORTFILE, 'a') as reportfile:
bb.warn("Writing file: {}".format(reportfile))
reportfile.write(support_status)
}
do_fetch[prefunc] += "do_generate_report"
# SPDX-FileCopyrightText: Huawei Inc.
#
# SPDX-License-Identifier: Apache-2.0
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"
# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "oniro-supportability"
BBFILE_PATTERN_oniro-supportability = "^${LAYERDIR}/"
BBFILE_PRIORITY_oniro-supportability = "8"
LAYERDEPENDS_oniro-supportability = " \
core \
"
LAYERSERIES_COMPAT_oniro-supportability = "kirkstone"
SUPPORT_META_VERSION="1"
SUPPORT_EOL="0"
SUPPORT_LEVEL="Unsupported"
SUPPORT_REASON="High supportability cost. Not suitable for IoT devices"
\ No newline at end of file
SUPPORT_META_VERSION="1"
SUPPORT_EOL="0"
SUPPORT_LEVEL="Unsupported"
SUPPORT_REASON="High supportability cost. Not suitable for IoT devices"
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment