Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sokol-flex: gather info to diagnose licensing network issues #107

Open
wants to merge 2 commits into
base: kirkstone
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions meta-sokol-flex-common/classes/taskenvlog.bbclass
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# ---------------------------------------------------------------------------------------------------------------------
# SPDX-License-Identifier: MIT

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just for my knowledge, why its with MIT license?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this public layer and meta data comes under MIT license for yocto

# ---------------------------------------------------------------------------------------------------------------------

# Log the values of specified variables when starting tasks as debug messages
TASK_ENV_LOG_VARS ?= ""

python log_task_env() {
import re

# Warning: copied from ConfHandler
flagpattern = re.compile(r'^(?P<var>[a-zA-Z0-9\-_+.${}/~:]+?)(\[(?P<flag>[a-zA-Z0-9\-_+.]+)\])?$', re.X)

for k in d.getVar('TASK_ENV_LOG_VARS').split():
m = flagpattern.match(k)
if not m:
bb.warn('Unexpected value in TASK_ENV_LOG_VARS: %s' % k)
continue

if m.group('flag'):
v = d.getVarFlag(m.group('var'), m.group('flag'), expand=True)
else:
v = d.getVar(k)

bb.debug(1, '%s %s: Environment: %s="%s"' % (e._package, e._task, k, v or ''))
}
log_task_env[eventmask] = "bb.build.TaskStarted"
addhandler log_task_env
5 changes: 5 additions & 0 deletions meta-sokol-flex-distro/conf/distro/sokol-flex.conf
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,11 @@ FEATURE_PACKAGES_multilib-runtime ?= "${@d.getVar('MULTILIB_RUNTIME_FEATURE_PACK
DISTRO_EXTRA_RRECOMMENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'nss-myhostname', d)}"
## }}}1
## Workarounds & Overrides {{{1
# Include information needed to diagnose licensing issues due to network access
BUILDCFG_VARS += "SOURCERY_LICENSE_NETWORK_TASKS"
INHERIT += "taskenvlog"
TASK_ENV_LOG_VARS += "${BB_RUNTASK}[network]"

# Re-export and exclude from checksums
export WSL_INTEROP
BB_BASEHASH_IGNORE_VARS:append = " WSL_INTEROP"
Expand Down