summaryrefslogtreecommitdiff
path: root/poky/meta/classes
diff options
context:
space:
mode:
authorAndrew Geissler <geissonator@yahoo.com>2021-03-31 22:34:31 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2021-04-06 16:22:18 +0300
commit95ac1b8d7409c14ee15ddcb7e5dd3d28b24caa7f (patch)
treee686d31ba8c6e704d27aa7699f4a1a5673283b98 /poky/meta/classes
parent32b11995a9447d927862951d29db38455f9e0205 (diff)
downloadopenbmc-95ac1b8d7409c14ee15ddcb7e5dd3d28b24caa7f.tar.xz
poky: subtree update:c8075ed8f1..7d0988966c
Adrian (1): weston-init: Set $HOME variable for SysVinit manager Alejandro Hernandez Samaniego (6): bitbake: bitbake: Add Azure Storage fetcher implementation bitbake: docs: Add Az fetcher documentation bitbake: docs: Add AZ_SAS definition to glossary ref-manual: Add Az fetcher documentation sanity.bbclass: Add az fetcher to accepted URI protocols for mirrors sanity devtool: Fix do_kernel_configme task Alexander Kanavin (23): core-image.bbclass: add a weston IMAGE_FEATURE, similar to x11-base rootfs-postcommands: correctly set systemd target for weston images oeqa/weston: correctly run wayland-info when systemd is in use dnf: upgrade 4.5.2 -> 4.6.0 libdnf: update 0.55.2 -> 0.58.0 libdnf: replace a musl fix with a better one librepo: update 1.12.1 -> 1.13.0 libical: update 3.0.8 -> 3.0.9 libical: drop the ad hoc native generator build bmap-tools: upgrade 3.5 -> 3.6 procps: update 3.3.16 -> 3.3.17 libxcrypt: fix sporadic failures in nativesdk-libxcrypt-compat bind: upgrade 9.16.11 -> 9.16.12 spirv-headers: update to latest revision spirv-tools: upgrade 2020.6 -> 2020.7 mesa: update 20.3.4 -> 21.0.0 attr: update 2.4.48 -> 2.5.1 asciidoc: update 9.0.4 -> 9.1.0 libhandy: update 1.0.3 -> 1.2.0 strace: update 5.10 -> 5.11 automake: update 1.16.2 - > 1.16.3 xxhash: import from meta-oe apt: update 1.8.2.2 -> 2.2.2 Alistair Francis (4): openssl: Enable building for RISC-V 32-bit linux-yocto: Add qemuriscv32 as a compatible machine machine: Initial commit of qemuriscv32 u-boot: Add support for building for qemuriscv32 Andrei Gherzan (3): gcr: Add support for building without x11 epiphany: Add package configuration for building in developer mode glibc: Backport patch to fix _SC_LEVEL1_ICACHE_LINESIZE Anton D. Kachalov (1): run-postinsts: do not remove postinsts directory. Awais Belal (2): libsdl2: disable shared memory for native builds rootfs.py: uninstall the run-postinsts package if not needed Bartosz Golaszewski (1): python3: make pydoc rdepend on python3-io Bruce Ashfield (27): linux-yocto/5.10: fix x86 32bit boot warnings linux-yocto/5.10: fix qemumips testimage failures linux-yocto/5.10: update to v5.10.17 and -rt31 linux-yocto/5.4: update to v5.4.99 linux-yocto/5.10: update to v5.10.19 linux-yocto/5.4: update to v5.4.101 perf: fix reproducibility issues linux-yocto/5.4: update to v5.4.103 kern-tools: symbol-why fix and README update linux-yocto/5.10: update to v5.10.21 linux-yocto/qemuarmv5: fix configuration warning yocto-bsp: update reference platforms to latest 5.10 perf: reproducibility fixes for pmu-events.c reproducibile: remove perf from exclusions linux-yocto/5.10: fix SERIAL_OF_PLATFORM warning linux-yocto/5.4: update to v5.4.105 linux-yocto/5.10: update to v5.10.23 linux-yocto/5.10: cfg: features/numa: Remove NODES_SPAN_OTHER_NODES option lttng-modules: update devupstream to 2.12.5+ lttng-modules: backport patches to fix build against 5.12+ kernel kernel-devsrc: fix on-target scripts/prepare for v5.12+ linux-yocto/5.10: cfg: fix ppc64 configuration warnings linux-yocto-dev: bump to v5.12-rc linux-yocto/5.10: update qemuriscv32 v5.10.23 linux-yocto/5.10: update to v5.10.25 linux-yocto/5.4: update to v5.4.107 linux-yocto-rt/5.10: update to -rt34 Changqing Li (1): go-helloworld: disable module-aware mode Charlie Davies (9): bitbake-bblayers/create: Fix incorrect priority help message bitbake-bblayers/create: Add optional layerid argument bitbake: bitbake: providers: remove unneeded logging call bitbake: bitbake: providers: consistent single line formatting between functions bitbake: bitbake: providers: introduce logic for REQUIRED_VERSION variable bitbake: bitbake: providers: check for REQUIRED_VERSION in _filterProviders bitbake: bitbake: lib: add Required Version to Bitbake --show-versions command bitbake: bitbake: cooker: Add REQUIRED_VERSION checks multilib_global: handle REQUIRED_VERSION Chen Qi (3): python3-jinja2: set CVE_PRODUCT bitbake: event.py: fix regression about INVALIDCONF populate_sdk_ext: record METADATA_REVISION Christopher Larson (2): buildhistory: add missing vardepsexcludes image,populate_sdk_base: move 'func' flag setting for sdk command vars Diego Santa Cruz (2): rpm: split build and extra functionality into separate packages sstate-diff-machines.sh: support rpm, deb and tar package types in analysis Dorinda (8): meta/recipes-rt: Add HOMEPAGE / DESCRIPTION meta-skeleton: Add HOMEPAGE / DESCRIPTION meta/recipes-extended: Add HOMEPAGE / DESCRIPTION meta/recipes-support: Add HOMEPAGE / DESCRIPTION meta/recipes-kernel: Add HOMEPAGE / DESCRIPTION meta/recipes-multimedia: Add HOMEPAGE / DESCRIPTION meta/recipes-graphics: Add HOMEPAGE / DESCRIPTION dev-manual/common-task.rst: Added documentation for debuginfod support Dorinda Bassey (4): meta/recipes-devtools: Add HOMEPAGE / DESCRIPTION distrodata.py: Test to track recipes without HOMEPAGE or DESCRIPTION meta-selftest: Add HOMEPAGE / DESCRIPTION devshell.bbclass: Exceptions displayed within devpyshell Douglas Royds (2): cmake: Fully-qualified path to ar externalsrc: Detect code changes in submodules Jon Mason (5): runqemu: use "raw" instead of "bin" for ovmf runqemu: add QB_GRAPHICS runqemu: correct forcing of ttyS0 runqemu: modify novga to conform to documentation tune-cortexa32: Add hard FPU Jose Quaresma (4): spirv-tools: python3 is need not only for the tests spirv-tools: cleanup an old patch that is not used anymore gstreamer1.0: upgrade 1.18.3 -> 1.18.4 gstreamer1.0-plugins-good: fix rtpjitterbuffer regression Kai Kang (2): toolchain-scripts.bbclass: customize prompt string for SDKs local.conf.sample.extended: sample value for SDK_PS1 Kevin Hao (1): meta-yocto-bsp: beaglebone: Set a fixed size for boot partition in WIC image Khairul Rohaizzat Jamaluddin (1): glibc: Fix CVE-2021-27645 Khem Raj (33): python3-cython: Check for files before editing webkitgtk: Use linker options to reduce memory overhead during linking webkitgtk: Enhance check for atomics to include 1 byte CAS qemuppc64: Add a QEMU machine definition for ppc64 linux-yocto: Enable powerpc64le QEMU formfactor: Add machine config for qemuppc64 inittab: Add getty launch on hvc0 for qemuppc64 parselogs: Allow expected kernel messages for qemuppc64 spirv-tools: Replace strncpy with memcpy python3-setuptools: Upgrade 54.1.0 -> 54.1.1 perf: Remove libunwind for rv32 Enable qemu usermode on ppc64 cmake.bbclass: Create cmake arch mapping for ppc64le libucontext: Recognize ppc64le architecture libunwind: Do not assume libdir for ppc64 gcc: Package new module mapper tool glib-2.0: Drop volatile qualifier go: Update to 1.16.2 go-dep: Remove libunwind: Link with libucontext on musl libedit: upgrade 20191231-3.1 -> 20210216-3.1 webkitgtk: Reduce stack and heap sizes for jsc on musl webkitgtk: Add packageconfig to chose between size and speed webkitgtk: enable strlen and stpcpy on musl/linux too gcc-sanitizers: Package up hwasan files apt: Support old resolver as fallback apt: Do not disable NLS valgrind: Fix ptests on ppc64 LE documentation-audit.sh: Fix typo in specifying LICENSE_FLAGS_WHITELIST image-uefi: Set efi_file for rv32/rv64 grub2: Disable for RISCV32 grub-efi: Re-introduce lost cast to long grub2: Enable on riscv32 Lee Chee Yang (2): cve-update-db-native: consider version suffix when update CVE db cve-check: CVE_VERSION_SUFFIX to work with patched release Li Wang (1): linux-dummy: add empty dependent packages Luca Boccassi (2): util-linux: split uuid in separate recipe to allow bootstrapping util-linux: backport patch to skip build of unused objects Manuel Leonhardt (1): bitbake: tinfoil: Honor quiet when parsing recipes Mark Hatle (2): populate_sdk_ext: Avoid copying and producing .pyc files populate_sdk_ext: Add support for PR service Martin Jansa (7): glib-2.0: call os.path.normpath on THISDIR glib-2.0: show an error about --cross-file only when such file exists busybox: refresh the defconfig from 1.33.0 busybox-inittab: rename for PV to match with busybox's PV iso-codes: fix protocol in SRC_URI packagegroup-core-weston.bb: add pam to REQUIRED_DISTRO_FEATURES python3: fix PACKAGECONFIG handling Michael Opdenacker (4): bitbake: doc: Update links to documentation Do not assume working from $HOME Update documentation URL documentation/README minor improvements Michael Trensch (1): linux-firmware: Fix packaging Mikko Rapeli (1): openssl: update to 1.1.1k to fix CVE-2021-3450 and CVE-2021-3449 Ming Liu (2): kernel-fitimage.bbclass: support both KERNEL_DEVICETREE/EXTERNAL_KERNEL_DEVICETREE initramfs-framework:rootfs: fix some conditional check Mingli Yu (1): libtool: make sure autoheader run before autoconf Minjae Kim (3): qemu: fix CVE-2021-20203 git: fix CVE-2021-21300 git: upgrade 2.30.1 -> 2.31.1 Naveen Saini (1): grub: upgrade 2.04 -> 2.06~rc1 Oleksandr Kravchuk (1): python3-setuptools: update to 54.1.0 Paul Gortmaker (1): bitbake: gitignore: ignore runqueue-tests/bitbake-cookerdaemon.log Peter Kjellerstedt (4): meson: Correctly set uid/gid of installed files uninative-tarball: Add a dependency on nativesdk-glibc-dbg metadata_scm.bbclass: Use immediate expansion for the METADATA_* variables license.bbclass: Improve parsing time when INCOMPATIBLE_LICENSES is big Petr Vorel (1): scripts/verify-bashisms: Update checkbashisms.pl URL Purushottam Choudhary (1): shadow: whitelist CVE-2013-4235 Randy MacLeod (2): ffmpeg: upgrade 4.3.1 -> 4.3.2 zstd: upgrade 1.4.8 -> 1.4.9 Richard Purdie (33): ltp: Fix another determinism issue build-appliance-image: Drop kernel module handling ltp: Further extend reproducibility patch bitbake: runqueue: Fix task execution corruption issue bitbake: runqueue: Add setscene task overlap sanity check bitbake: __init__.py: Fix bitbake debug log handling ltp: Fix determinism issue ltp: Fix libswapon issue properly bitbake: event: Fix multiconfig event handler change performance regressions bitbake: event: Fix another 'if d' test to test for None explictly bitbake: tests/color: Fix event register to pass the datastore bitbake: bblayers/query: Update to handle REQUIRED_VERSION scripts/contrib/list-packageconfig-flags: Upate for tinfoil API changes layer.conf: Update for hardknott release series layer.conf: Update for hardknott release series build-appliance-image: Update to master head revision layer.conf: Add gatesgarth back for now to allow for transition build-appliance-image: Update to master head revision meson: Work around determinism issue lttng-tools: upgrade 2.12.2 -> 2.12.3 lttng-modules: upgrade 2.12.4 -> 2.12.5 sqlite3: upgrade 3.34.1 -> 3.35.0 sudo: upgrade 1.9.5p2 -> 1.9.6 selftest/reproducible: Drop ovmf exclusion selftest/wic: Fix dependency issue in rawcopy test layer.conf: Drop gatesgarth from the layer series names bitbake: build: Add find_stale_stamps function bitbake: runqueue/event: Add an event for notifying of stale setscene tasks sstate: Remove stale objects before the main build sstate: Add documentation for eventhandlers and tweak naming site/elfutils/libunistring: Drop patching for iconv and set in site file build-appliance-image: Update to master head revision util-linux-libuuid: Simplify recipe and rename from util-linux-uuid Robert P. J. Day (8): bitbake-whatchanged: change ending quote to proper period bitbake: doc: move BBFILES_DYNAMIC for alphabetical order ref-manual: remove erroneous '\*' from variables list bitbake: doc: mention that addtask handles multiple dependencies bitbake: doc: fix glossary link for BB_INVALIDCONF variable bitbake: doc: fix syntax error in layer.conf example bitbake.conf: correct description of HOSTTOOLS_DIR packagegroups: delete useless "PROVIDES" lines Robert Yang (1): image.bbclass: deltask do_packagedata Ross Burton (13): libinput: less parallism to increase chances the test suite works ptest-packagelists: remove libinput-ptest insane: don't check for a warning string that is never output gcc: add an option for --enable-poison-system-directories to be fatal gcc-cross: make use of the system include directories fatal oeqa/selftest: add test to verify that poisoned sysroots are detected ovmf: make output binaries reproducible base: respect downloadfilename when sniffing the SRC_URI for dependencies lib/oe/utils: add directory size function classes/image: use oe.utils.directory_size() instead of du bitbake.conf: ensure BUILD_* tools match target tools meson: fix native/host confusion in gobject-introspection meson: use native-file instead of environment variables Sakib Sajal (2): buildstats.bbclass: improve timeout handling scripts: add oe-time-dd-test.sh Scott Murray (1): u-boot: Fix CVE-2021-27097, CVE-2021-27138 Stefan Ghinea (1): wpa-supplicant: fix CVE-2021-27803 Stefan Schmidt (1): systemd-conf: do not ask for DHCP if configured on kernel command line Tomasz Dziendzielski (2): bitbake: runqueue: Print pseudo.log if fakeroot task failed bitbake: codeparser: Fix TypeError in bitbake debug mode Ulrich ?lmann (1): gstreamer1.0: add support for coretracers Ulrich Ölmann (3): common-tasks.rst: fix 'wic cp' command common-tasks.rst: fix typo local.conf.sample: fix typo Vivien Didelot (6): systemd-container: sort RRECOMMENDS alphabetically systemd-container: recommend tar systemd-container: recommends StartExecPre modules poky: fix typos poky: don't use space with += beaglebone-yocto: allow other virtual/bootloader Wang Mingyu (20): shaderc: upgrade 2020.4 -> 2020.5 stress-ng: upgrade 0.12.03 -> 0.12.04 taglib: upgrade 1.11.1 -> 1.12 vala: upgrade 0.50.3 -> 0.50.4 python3-pygments: upgrade 2.8.0 -> 2.8.1 python3-zipp: upgrade 3.4.0 -> 3.4.1 sysklogd: upgrade 2.2.1 -> 2.2.2 help2man: upgrade 1.48.1 -> 1.48.2 iso-codes: upgrade 4.5.0 -> 4.6.0 jquery: upgrade 3.5.1 -> 3.6.0 ovmf: upgrade 202011 -> 202102 msmtp: upgrade 1.8.14 -> 1.8.15 gptfdisk: upgrade 1.0.6 -> 1.0.7 vulkan-headers: upgrade 1.2.162.0 -> 1.2.170.0 vulkan-loader: upgrade 1.2.162.0 -> 1.2.170.0 vulkan-tools: upgrade 1.2.162.1 -> 1.2.170.0 gcc: Update patch to only patch files once openssh: upgrade 8.4p1 -> 8.5p1 openssh: Improve LICENSE to show BSD license variants. gnutls: upgrade 3.7.0 -> 3.7.1 Yanfei Xu (1): glibc: fix pthread_cond_destroy hangs with process-shared mutex Yann Dirson (1): ffmpeg: disable GPL features by default Yi Fan Yu (1): valgrind: Fix nlcontrolc.vgtest jan (1): cve-update-db-native: Allow to overrule the URL in a bbappend. wangmy@fujitsu.com (1): systemd: upgrade 247.3 -> 247.4 zhengruoqin (3): sudo: upgrade 1.9.6 -> 1.9.6p1 liburi-perl: upgrade 1.74 -> 5.08 stress-ng: upgrade 0.12.04 -> 0.12.05 Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I04195d4c610ca1674dd736eceeb6442d974cb711
Diffstat (limited to 'poky/meta/classes')
-rw-r--r--poky/meta/classes/base.bbclass14
-rw-r--r--poky/meta/classes/buildhistory.bbclass3
-rw-r--r--poky/meta/classes/buildstats.bbclass42
-rw-r--r--poky/meta/classes/cmake.bbclass5
-rw-r--r--poky/meta/classes/core-image.bbclass2
-rw-r--r--poky/meta/classes/devshell.bbclass1
-rw-r--r--poky/meta/classes/externalsrc.bbclass16
-rw-r--r--poky/meta/classes/godep.bbclass8
-rw-r--r--poky/meta/classes/image.bbclass10
-rw-r--r--poky/meta/classes/insane.bbclass22
-rw-r--r--poky/meta/classes/kernel-fitimage.bbclass10
-rw-r--r--poky/meta/classes/license.bbclass9
-rw-r--r--poky/meta/classes/linux-dummy.bbclass26
-rw-r--r--poky/meta/classes/meson.bbclass54
-rw-r--r--poky/meta/classes/metadata_scm.bbclass10
-rw-r--r--poky/meta/classes/multilib_global.bbclass67
-rw-r--r--poky/meta/classes/populate_sdk_base.bbclass7
-rw-r--r--poky/meta/classes/populate_sdk_ext.bbclass32
-rw-r--r--poky/meta/classes/qemuboot.bbclass6
-rw-r--r--poky/meta/classes/rootfs-postcommands.bbclass2
-rw-r--r--poky/meta/classes/sanity.bbclass2
-rw-r--r--poky/meta/classes/sstate.bbclass72
-rw-r--r--poky/meta/classes/toolchain-scripts.bbclass3
23 files changed, 286 insertions, 137 deletions
diff --git a/poky/meta/classes/base.bbclass b/poky/meta/classes/base.bbclass
index b4160402f..42fb84c4d 100644
--- a/poky/meta/classes/base.bbclass
+++ b/poky/meta/classes/base.bbclass
@@ -593,6 +593,8 @@ python () {
srcuri = d.getVar('SRC_URI')
for uri_string in srcuri.split():
uri = bb.fetch.URI(uri_string)
+ # Also check downloadfilename as the URL path might not be useful for sniffing
+ path = uri.params.get("downloadfilename", uri.path)
# HTTP/FTP use the wget fetcher
if uri.scheme in ("http", "https", "ftp"):
@@ -626,27 +628,27 @@ python () {
d.appendVarFlag('do_fetch', 'depends', ' nodejs-native:do_populate_sysroot')
# *.lz4 should DEPEND on lz4-native for unpacking
- if uri.path.endswith('.lz4'):
+ if path.endswith('.lz4'):
d.appendVarFlag('do_unpack', 'depends', ' lz4-native:do_populate_sysroot')
# *.lz should DEPEND on lzip-native for unpacking
- elif uri.path.endswith('.lz'):
+ elif path.endswith('.lz'):
d.appendVarFlag('do_unpack', 'depends', ' lzip-native:do_populate_sysroot')
# *.xz should DEPEND on xz-native for unpacking
- elif uri.path.endswith('.xz') or uri.path.endswith('.txz'):
+ elif path.endswith('.xz') or path.endswith('.txz'):
d.appendVarFlag('do_unpack', 'depends', ' xz-native:do_populate_sysroot')
# .zip should DEPEND on unzip-native for unpacking
- elif uri.path.endswith('.zip') or uri.path.endswith('.jar'):
+ elif path.endswith('.zip') or path.endswith('.jar'):
d.appendVarFlag('do_unpack', 'depends', ' unzip-native:do_populate_sysroot')
# Some rpm files may be compressed internally using xz (for example, rpms from Fedora)
- elif uri.path.endswith('.rpm'):
+ elif path.endswith('.rpm'):
d.appendVarFlag('do_unpack', 'depends', ' xz-native:do_populate_sysroot')
# *.deb should DEPEND on xz-native for unpacking
- elif uri.path.endswith('.deb'):
+ elif path.endswith('.deb'):
d.appendVarFlag('do_unpack', 'depends', ' xz-native:do_populate_sysroot')
if needsrcrev:
diff --git a/poky/meta/classes/buildhistory.bbclass b/poky/meta/classes/buildhistory.bbclass
index 117a44eaf..49af61c9c 100644
--- a/poky/meta/classes/buildhistory.bbclass
+++ b/poky/meta/classes/buildhistory.bbclass
@@ -678,13 +678,16 @@ IMAGE_POSTPROCESS_COMMAND[vardepsexclude] += "buildhistory_get_imageinfo"
POPULATE_SDK_POST_TARGET_COMMAND_append = " buildhistory_list_installed_sdk_target;"
POPULATE_SDK_POST_TARGET_COMMAND_append = " buildhistory_get_sdk_installed_target;"
POPULATE_SDK_POST_TARGET_COMMAND[vardepvalueexclude] .= "| buildhistory_list_installed_sdk_target;| buildhistory_get_sdk_installed_target;"
+POPULATE_SDK_POST_TARGET_COMMAND[vardepsexclude] += "buildhistory_list_installed_sdk_target buildhistory_get_sdk_installed_target"
POPULATE_SDK_POST_HOST_COMMAND_append = " buildhistory_list_installed_sdk_host;"
POPULATE_SDK_POST_HOST_COMMAND_append = " buildhistory_get_sdk_installed_host;"
POPULATE_SDK_POST_HOST_COMMAND[vardepvalueexclude] .= "| buildhistory_list_installed_sdk_host;| buildhistory_get_sdk_installed_host;"
+POPULATE_SDK_POST_HOST_COMMAND[vardepsexclude] += "buildhistory_list_installed_sdk_host buildhistory_get_sdk_installed_host"
SDK_POSTPROCESS_COMMAND_append = " buildhistory_get_sdkinfo ; buildhistory_get_extra_sdkinfo; "
SDK_POSTPROCESS_COMMAND[vardepvalueexclude] .= "| buildhistory_get_sdkinfo ; buildhistory_get_extra_sdkinfo; "
+SDK_POSTPROCESS_COMMAND[vardepsexclude] += "buildhistory_get_sdkinfo buildhistory_get_extra_sdkinfo"
python buildhistory_write_sigs() {
if not "task" in (d.getVar('BUILDHISTORY_FEATURES') or "").split():
diff --git a/poky/meta/classes/buildstats.bbclass b/poky/meta/classes/buildstats.bbclass
index a8ee6e69a..8e03039ae 100644
--- a/poky/meta/classes/buildstats.bbclass
+++ b/poky/meta/classes/buildstats.bbclass
@@ -106,26 +106,54 @@ def write_task_data(status, logfile, e, d):
def write_host_data(logfile, e, d):
import subprocess, os, datetime
+ # minimum time allowed for each command to run, in seconds
+ time_threshold = 0.5
+ # the total number of commands
+ num_cmds = 0
+ # interval at which data will be logged
+ interval = int(d.getVar("BB_HEARTBEAT_EVENT", False))
+ # the commands to be run at each interval
cmds = d.getVar('BB_LOG_HOST_STAT_CMDS')
+ # if no commands are passed, issue a warning and return
if cmds is None:
d.setVar("BB_LOG_HOST_STAT_ON_INTERVAL", "0")
d.setVar("BB_LOG_HOST_STAT_ON_FAILURE", "0")
- bb.warn("buildstats: Collecting host data failed. Set BB_LOG_HOST_STAT_CMDS=\"command1 ; command2 ; ... \" in conf\/local.conf\n")
+ bb.warn("buildstats: Collecting host data failed. Set BB_LOG_HOST_STAT_CMDS=\"command1 ; command2 ; ... \" in conf/local.conf\n")
return
+ # find the total commands
+ c_san = []
+ for cmd in cmds.split(";"):
+ if len(cmd) == 0:
+ continue
+ num_cmds += 1
+ c_san.append(cmd)
+ if num_cmds <= 0:
+ d.setVar("BB_LOG_HOST_STAT_ON_INTERVAL", "0")
+ d.setVar("BB_LOG_HOST_STAT_ON_FAILURE", "0")
+ return
+
+ # return if the interval is not enough to run all commands within the specified BB_HEARTBEAT_EVENT interval
+ limit = interval / num_cmds
+ if limit <= time_threshold:
+ d.setVar("BB_LOG_HOST_STAT_ON_INTERVAL", "0")
+ d.setVar("BB_LOG_HOST_STAT_ON_FAILURE", "0")
+ bb.warn("buildstats: Collecting host data failed. BB_HEARTBEAT_EVENT interval not enough to run the specified commands. HINT: Increase value of BB_HEARTBEAT_EVENT in conf/local.conf\n")
+ return
+
+ # set the environment variables
path = d.getVar("PATH")
opath = d.getVar("BB_ORIGENV", False).getVar("PATH")
ospath = os.environ['PATH']
os.environ['PATH'] = path + ":" + opath + ":" + ospath
with open(logfile, "a") as f:
f.write("Event Time: %f\nDate: %s\n" % (e.time, datetime.datetime.now()))
- for cmd in cmds.split(";"):
- if len(cmd) == 0:
- continue
+ for c in c_san:
try:
- output = subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT, timeout=1).decode('utf-8')
+ output = subprocess.check_output(c.split(), stderr=subprocess.STDOUT, timeout=limit).decode('utf-8')
except (subprocess.CalledProcessError, subprocess.TimeoutExpired, FileNotFoundError) as err:
- output = "Error running command: %s\n%s\n" % (cmd, err)
- f.write("%s\n%s\n" % (cmd, output))
+ output = "Error running command: %s\n%s\n" % (c, err)
+ f.write("%s\n%s\n" % (c, output))
+ # reset the environment
os.environ['PATH'] = ospath
python run_buildstats () {
diff --git a/poky/meta/classes/cmake.bbclass b/poky/meta/classes/cmake.bbclass
index 4af22268b..8876ce5aa 100644
--- a/poky/meta/classes/cmake.bbclass
+++ b/poky/meta/classes/cmake.bbclass
@@ -81,6 +81,8 @@ def map_host_os_to_system_name(host_os):
def map_host_arch_to_uname_arch(host_arch):
if host_arch == "powerpc":
return "ppc"
+ if host_arch == "powerpc64le":
+ return "ppc64le"
if host_arch == "powerpc64":
return "ppc64"
return host_arch
@@ -100,7 +102,8 @@ set( CMAKE_CXX_COMPILER ${OECMAKE_CXX_COMPILER} )
set( CMAKE_C_COMPILER_LAUNCHER ${OECMAKE_C_COMPILER_LAUNCHER} )
set( CMAKE_CXX_COMPILER_LAUNCHER ${OECMAKE_CXX_COMPILER_LAUNCHER} )
set( CMAKE_ASM_COMPILER ${OECMAKE_C_COMPILER} )
-set( CMAKE_AR ${OECMAKE_AR} CACHE FILEPATH "Archiver" )
+find_program( CMAKE_AR ${OECMAKE_AR} DOC "Archiver" REQUIRED )
+
set( CMAKE_C_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "CFLAGS" )
set( CMAKE_CXX_FLAGS "${OECMAKE_CXX_FLAGS}" CACHE STRING "CXXFLAGS" )
set( CMAKE_ASM_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "ASM FLAGS" )
diff --git a/poky/meta/classes/core-image.bbclass b/poky/meta/classes/core-image.bbclass
index 88ca27214..d81f68bd2 100644
--- a/poky/meta/classes/core-image.bbclass
+++ b/poky/meta/classes/core-image.bbclass
@@ -9,6 +9,7 @@
#
# Available IMAGE_FEATURES:
#
+# - weston - Weston Wayland compositor
# - x11 - X server
# - x11-base - X server with minimal environment
# - x11-sato - OpenedHand Sato environment
@@ -37,6 +38,7 @@
# - stateless-rootfs - systemctl-native not run, image populated by systemd at runtime
# - splash - bootup splash screen
#
+FEATURE_PACKAGES_weston = "packagegroup-core-weston"
FEATURE_PACKAGES_x11 = "packagegroup-core-x11"
FEATURE_PACKAGES_x11-base = "packagegroup-core-x11-base"
FEATURE_PACKAGES_x11-sato = "packagegroup-core-x11-sato"
diff --git a/poky/meta/classes/devshell.bbclass b/poky/meta/classes/devshell.bbclass
index fdf7dc100..76dd0b42e 100644
--- a/poky/meta/classes/devshell.bbclass
+++ b/poky/meta/classes/devshell.bbclass
@@ -128,6 +128,7 @@ def devpyshell(d):
more = i.runsource(source, "<pyshell>")
if not more:
buf = []
+ sys.stderr.flush()
prompt(more)
except KeyboardInterrupt:
i.write("\nKeyboardInterrupt\n")
diff --git a/poky/meta/classes/externalsrc.bbclass b/poky/meta/classes/externalsrc.bbclass
index c7b2bf2f4..54cc7edba 100644
--- a/poky/meta/classes/externalsrc.bbclass
+++ b/poky/meta/classes/externalsrc.bbclass
@@ -217,14 +217,16 @@ def srctree_hash_files(d, srcdir=None):
env['GIT_INDEX_FILE'] = tmp_index.name
subprocess.check_output(['git', 'add', '-A', '.'], cwd=s_dir, env=env)
git_sha1 = subprocess.check_output(['git', 'write-tree'], cwd=s_dir, env=env).decode("utf-8")
- submodule_helper = subprocess.check_output(['git', 'submodule--helper', 'list'], cwd=s_dir, env=env).decode("utf-8")
+ submodule_helper = subprocess.check_output(['git', 'submodule', 'status'], cwd=s_dir, env=env).decode("utf-8")
for line in submodule_helper.splitlines():
- module_dir = os.path.join(s_dir, line.rsplit(maxsplit=1)[1])
- proc = subprocess.Popen(['git', 'add', '-A', '.'], cwd=module_dir, env=env, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
- proc.communicate()
- proc = subprocess.Popen(['git', 'write-tree'], cwd=module_dir, env=env, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
- stdout, _ = proc.communicate()
- git_sha1 += stdout.decode("utf-8")
+ module_relpath = line.split()[1]
+ if not module_relpath.split('/')[0] == '..':
+ module_dir = os.path.join(s_dir, module_relpath)
+ proc = subprocess.Popen(['git', 'add', '-A', '.'], cwd=module_dir, env=env, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
+ proc.communicate()
+ proc = subprocess.Popen(['git', 'write-tree'], cwd=module_dir, env=env, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
+ stdout, _ = proc.communicate()
+ git_sha1 += stdout.decode("utf-8")
sha1 = hashlib.sha1(git_sha1.encode("utf-8")).hexdigest()
with open(oe_hash_file, 'w') as fobj:
fobj.write(sha1)
diff --git a/poky/meta/classes/godep.bbclass b/poky/meta/classes/godep.bbclass
deleted file mode 100644
index c82401c31..000000000
--- a/poky/meta/classes/godep.bbclass
+++ /dev/null
@@ -1,8 +0,0 @@
-DEPENDS_append = " go-dep-native"
-
-do_compile_prepend() {
- rm -f ${WORKDIR}/build/src/${GO_IMPORT}/Gopkg.toml
- rm -f ${WORKDIR}/build/src/${GO_IMPORT}/Gopkg.lock
- ( cd ${WORKDIR}/build/src/${GO_IMPORT} && dep init && dep ensure )
-}
-
diff --git a/poky/meta/classes/image.bbclass b/poky/meta/classes/image.bbclass
index 41fc32917..013455f49 100644
--- a/poky/meta/classes/image.bbclass
+++ b/poky/meta/classes/image.bbclass
@@ -112,7 +112,7 @@ def rootfs_command_variables(d):
'IMAGE_PREPROCESS_COMMAND','RPM_PREPROCESS_COMMANDS','RPM_POSTPROCESS_COMMANDS','DEB_PREPROCESS_COMMANDS','DEB_POSTPROCESS_COMMANDS']
python () {
- variables = rootfs_command_variables(d) + sdk_command_variables(d)
+ variables = rootfs_command_variables(d)
for var in variables:
if d.getVar(var, False):
d.setVarFlag(var, 'func', '1')
@@ -507,7 +507,7 @@ python () {
# Compute the rootfs size
#
def get_rootfs_size(d):
- import subprocess
+ import subprocess, oe.utils
rootfs_alignment = int(d.getVar('IMAGE_ROOTFS_ALIGNMENT'))
overhead_factor = float(d.getVar('IMAGE_OVERHEAD_FACTOR'))
@@ -518,9 +518,7 @@ def get_rootfs_size(d):
initramfs_fstypes = d.getVar('INITRAMFS_FSTYPES') or ''
initramfs_maxsize = d.getVar('INITRAMFS_MAXSIZE')
- output = subprocess.check_output(['du', '-ks',
- d.getVar('IMAGE_ROOTFS')])
- size_kb = int(output.split()[0])
+ size_kb = oe.utils.directory_size(d.getVar("IMAGE_ROOTFS")) / 1024
base_size = size_kb * overhead_factor
bb.debug(1, '%f = %d * %f' % (base_size, size_kb, overhead_factor))
@@ -612,7 +610,7 @@ deltask do_populate_lic
deltask do_populate_sysroot
do_package[noexec] = "1"
deltask do_package_qa
-do_packagedata[noexec] = "1"
+deltask do_packagedata
deltask do_package_write_ipk
deltask do_package_write_deb
deltask do_package_write_rpm
diff --git a/poky/meta/classes/insane.bbclass b/poky/meta/classes/insane.bbclass
index 53230fc66..fa05fc055 100644
--- a/poky/meta/classes/insane.bbclass
+++ b/poky/meta/classes/insane.bbclass
@@ -1014,26 +1014,6 @@ python do_package_qa () {
logdir = d.getVar('T')
pn = d.getVar('PN')
- # Check the compile log for host contamination
- compilelog = os.path.join(logdir,"log.do_compile")
-
- if os.path.exists(compilelog):
- statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % compilelog
- if subprocess.call(statement, shell=True) == 0:
- msg = "%s: The compile log indicates that host include and/or library paths were used.\n \
- Please check the log '%s' for more information." % (pn, compilelog)
- package_qa_handle_error("compile-host-path", msg, d)
-
- # Check the install log for host contamination
- installlog = os.path.join(logdir,"log.do_install")
-
- if os.path.exists(installlog):
- statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % installlog
- if subprocess.call(statement, shell=True) == 0:
- msg = "%s: The install log indicates that host include and/or library paths were used.\n \
- Please check the log '%s' for more information." % (pn, installlog)
- package_qa_handle_error("install-host-path", msg, d)
-
# Scan the packages...
pkgdest = d.getVar('PKGDEST')
packages = set((d.getVar('PACKAGES') or '').split())
@@ -1212,7 +1192,7 @@ python do_qa_configure() {
if bb.data.inherits_class('autotools', d) and not skip_configure_unsafe:
bb.note("Checking autotools environment for common misconfiguration")
for root, dirs, files in os.walk(workdir):
- statement = "grep -q -F -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s" % \
+ statement = "grep -q -F -e 'is unsafe for cross-compilation' %s" % \
os.path.join(root,"config.log")
if "config.log" in files:
if subprocess.call(statement, shell=True) == 0:
diff --git a/poky/meta/classes/kernel-fitimage.bbclass b/poky/meta/classes/kernel-fitimage.bbclass
index f5082c93d..b9d827002 100644
--- a/poky/meta/classes/kernel-fitimage.bbclass
+++ b/poky/meta/classes/kernel-fitimage.bbclass
@@ -535,13 +535,19 @@ fitimage_assemble() {
# Step 2: Prepare a DTB image section
#
- if [ -z "${EXTERNAL_KERNEL_DEVICETREE}" ] && [ -n "${KERNEL_DEVICETREE}" ]; then
+ if [ -n "${KERNEL_DEVICETREE}" ]; then
dtbcount=1
for DTB in ${KERNEL_DEVICETREE}; do
if echo ${DTB} | grep -q '/dts/'; then
bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."
DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
fi
+
+ # Skip ${DTB} if it's also provided in ${EXTERNAL_KERNEL_DEVICETREE}
+ if [ -n "${EXTERNAL_KERNEL_DEVICETREE}" ] && [ -s ${EXTERNAL_KERNEL_DEVICETREE}/${DTB} ]; then
+ continue
+ fi
+
DTB_PATH="arch/${ARCH}/boot/dts/${DTB}"
if [ ! -e "${DTB_PATH}" ]; then
DTB_PATH="arch/${ARCH}/boot/${DTB}"
@@ -769,4 +775,4 @@ python () {
bb.build.deltask('do_assemble_fitimage', d)
bb.build.deltask('generate_rsa_keys', d)
bb.build.addtask('generate_rsa_keys', 'do_assemble_fitimage_initramfs', 'do_bundle_initramfs', d)
-} \ No newline at end of file
+}
diff --git a/poky/meta/classes/license.bbclass b/poky/meta/classes/license.bbclass
index bcea0b3cb..f7978e266 100644
--- a/poky/meta/classes/license.bbclass
+++ b/poky/meta/classes/license.bbclass
@@ -282,16 +282,15 @@ def expand_wildcard_licenses(d, wildcard_licenses):
"""
import fnmatch
- # Assume if we're passed "GPLv3" or "*GPLv3" it means -or-later as well
- for lic in wildcard_licenses[:]:
- if not lic.endswith(("-or-later", "-only", "*")):
- wildcard_licenses.append(lic + "+")
-
licenses = wildcard_licenses[:]
spdxmapkeys = d.getVarFlags('SPDXLICENSEMAP').keys()
for wld_lic in wildcard_licenses:
spdxflags = fnmatch.filter(spdxmapkeys, wld_lic)
licenses += [d.getVarFlag('SPDXLICENSEMAP', flag) for flag in spdxflags]
+ # Assume if we're passed "GPLv3" or "*GPLv3" it means -or-later as well
+ if not wld_lic.endswith(("-or-later", "-only", "*", "+")):
+ spdxflags = fnmatch.filter(spdxmapkeys, wld_lic + "+")
+ licenses += [d.getVarFlag('SPDXLICENSEMAP', flag) for flag in spdxflags]
spdx_lics = d.getVar('AVAILABLE_LICENSES').split()
for wld_lic in wildcard_licenses:
diff --git a/poky/meta/classes/linux-dummy.bbclass b/poky/meta/classes/linux-dummy.bbclass
new file mode 100644
index 000000000..cd8791557
--- /dev/null
+++ b/poky/meta/classes/linux-dummy.bbclass
@@ -0,0 +1,26 @@
+
+python __anonymous () {
+ if d.getVar('PREFERRED_PROVIDER_virtual/kernel') == 'linux-dummy':
+ # copy part codes from kernel.bbclass
+ kname = d.getVar('KERNEL_PACKAGE_NAME') or "kernel"
+
+ # set an empty package of kernel-devicetree
+ d.appendVar('PACKAGES', ' %s-devicetree' % kname)
+ d.setVar('ALLOW_EMPTY_%s-devicetree' % kname, '1')
+
+ # Merge KERNEL_IMAGETYPE and KERNEL_ALT_IMAGETYPE into KERNEL_IMAGETYPES
+ type = d.getVar('KERNEL_IMAGETYPE') or ""
+ alttype = d.getVar('KERNEL_ALT_IMAGETYPE') or ""
+ types = d.getVar('KERNEL_IMAGETYPES') or ""
+ if type not in types.split():
+ types = (type + ' ' + types).strip()
+ if alttype not in types.split():
+ types = (alttype + ' ' + types).strip()
+
+ # set empty packages of kernel-image-*
+ for type in types.split():
+ typelower = type.lower()
+ d.appendVar('PACKAGES', ' %s-image-%s' % (kname, typelower))
+ d.setVar('ALLOW_EMPTY_%s-image-%s' % (kname, typelower), '1')
+}
+
diff --git a/poky/meta/classes/meson.bbclass b/poky/meta/classes/meson.bbclass
index a7644e70c..bf9b02e06 100644
--- a/poky/meta/classes/meson.bbclass
+++ b/poky/meta/classes/meson.bbclass
@@ -26,7 +26,8 @@ MESONOPTS = " --prefix ${prefix} \
--sysconfdir ${sysconfdir} \
--localstatedir ${localstatedir} \
--sharedstatedir ${sharedstatedir} \
- --wrap-mode nodownload"
+ --wrap-mode nodownload \
+ --native-file ${WORKDIR}/meson.native"
EXTRA_OEMESON_append = " ${PACKAGECONFIG_CONFARGS}"
@@ -102,12 +103,14 @@ cups-config = 'cups-config'
g-ir-scanner = '${STAGING_BINDIR}/g-ir-scanner-wrapper'
g-ir-compiler = '${STAGING_BINDIR}/g-ir-compiler-wrapper'
-[properties]
-needs_exe_wrapper = true
+[built-in options]
c_args = ${@meson_array('CFLAGS', d)}
c_link_args = ${@meson_array('LDFLAGS', d)}
cpp_args = ${@meson_array('CXXFLAGS', d)}
cpp_link_args = ${@meson_array('LDFLAGS', d)}
+
+[properties]
+needs_exe_wrapper = true
gtkdoc_exe_wrapper = '${B}/gtkdoc-qemuwrapper'
[host_machine]
@@ -122,8 +125,26 @@ cpu_family = '${@meson_cpu_family('TARGET_ARCH', d)}'
cpu = '${TARGET_ARCH}'
endian = '${@meson_endian('TARGET', d)}'
EOF
+
+ cat >${WORKDIR}/meson.native <<EOF
+[binaries]
+c = ${@meson_array('BUILD_CC', d)}
+cpp = ${@meson_array('BUILD_CXX', d)}
+ar = ${@meson_array('BUILD_AR', d)}
+nm = ${@meson_array('BUILD_NM', d)}
+strip = ${@meson_array('BUILD_STRIP', d)}
+readelf = ${@meson_array('BUILD_READELF', d)}
+pkgconfig = 'pkg-config-native'
+
+[built-in options]
+c_args = ${@meson_array('BUILD_CFLAGS', d)}
+c_link_args = ${@meson_array('BUILD_LDFLAGS', d)}
+cpp_args = ${@meson_array('BUILD_CXXFLAGS', d)}
+cpp_link_args = ${@meson_array('BUILD_LDFLAGS', d)}
+EOF
}
+# Tell externalsrc that changes to this file require a reconfigure
CONFIGURE_FILES = "meson.build"
meson_do_configure() {
@@ -140,33 +161,6 @@ meson_do_configure() {
fi
}
-override_native_tools() {
- # Set these so that meson uses the native tools for its build sanity tests,
- # which require executables to be runnable. The cross file will still
- # override these for the target build.
- export CC="${BUILD_CC}"
- export CXX="${BUILD_CXX}"
- export LD="${BUILD_LD}"
- export AR="${BUILD_AR}"
- export STRIP="${BUILD_STRIP}"
- # These contain *target* flags but will be used as *native* flags. The
- # correct native flags will be passed via -Dc_args and so on, unset them so
- # they don't interfere with tools invoked by Meson (such as g-ir-scanner)
- unset CPPFLAGS CFLAGS CXXFLAGS LDFLAGS
-}
-
-meson_do_configure_prepend_class-target() {
- override_native_tools
-}
-
-meson_do_configure_prepend_class-nativesdk() {
- override_native_tools
-}
-
-meson_do_configure_prepend_class-native() {
- export PKG_CONFIG="pkg-config-native"
-}
-
python meson_do_qa_configure() {
import re
warn_re = re.compile(r"^WARNING: Cross property (.+) is using default value (.+)$", re.MULTILINE)
diff --git a/poky/meta/classes/metadata_scm.bbclass b/poky/meta/classes/metadata_scm.bbclass
index 2608a7ef7..47cb969b8 100644
--- a/poky/meta/classes/metadata_scm.bbclass
+++ b/poky/meta/classes/metadata_scm.bbclass
@@ -1,8 +1,3 @@
-METADATA_BRANCH ?= "${@base_detect_branch(d)}"
-METADATA_BRANCH[vardepvalue] = "${METADATA_BRANCH}"
-METADATA_REVISION ?= "${@base_detect_revision(d)}"
-METADATA_REVISION[vardepvalue] = "${METADATA_REVISION}"
-
def base_detect_revision(d):
path = base_get_scmbasepath(d)
return base_get_metadata_git_revision(path, d)
@@ -42,3 +37,8 @@ def base_get_metadata_git_revision(path, d):
except bb.process.ExecutionError:
rev = '<unknown>'
return rev.strip()
+
+METADATA_BRANCH := "${@base_detect_branch(d)}"
+METADATA_BRANCH[vardepvalue] = "${METADATA_BRANCH}"
+METADATA_REVISION := "${@base_detect_revision(d)}"
+METADATA_REVISION[vardepvalue] = "${METADATA_REVISION}"
diff --git a/poky/meta/classes/multilib_global.bbclass b/poky/meta/classes/multilib_global.bbclass
index 98f65c8aa..96257de5c 100644
--- a/poky/meta/classes/multilib_global.bbclass
+++ b/poky/meta/classes/multilib_global.bbclass
@@ -1,6 +1,7 @@
def preferred_ml_updates(d):
- # If any PREFERRED_PROVIDER or PREFERRED_VERSION are set,
- # we need to mirror these variables in the multilib case;
+ # If any of PREFERRED_PROVIDER, PREFERRED_RPROVIDER, REQUIRED_VERSION
+ # or PREFERRED_VERSION are set, we need to mirror these variables in
+ # the multilib case;
multilibs = d.getVar('MULTILIBS') or ""
if not multilibs:
return
@@ -11,43 +12,51 @@ def preferred_ml_updates(d):
if len(eext) > 1 and eext[0] == 'multilib':
prefixes.append(eext[1])
- versions = []
+ required_versions = []
+ preferred_versions = []
providers = []
rproviders = []
for v in d.keys():
+ if v.startswith("REQUIRED_VERSION_"):
+ required_versions.append(v)
if v.startswith("PREFERRED_VERSION_"):
- versions.append(v)
+ preferred_versions.append(v)
if v.startswith("PREFERRED_PROVIDER_"):
providers.append(v)
if v.startswith("PREFERRED_RPROVIDER_"):
rproviders.append(v)
- for v in versions:
- val = d.getVar(v, False)
- pkg = v.replace("PREFERRED_VERSION_", "")
- if pkg.endswith("-native") or "-crosssdk-" in pkg or pkg.startswith(("nativesdk-", "virtual/nativesdk-")):
- continue
- if '-cross-' in pkg and '${' in pkg:
+ def sort_versions(versions, keyword):
+ version_str = "_".join([keyword, "VERSION", ""])
+ for v in versions:
+ val = d.getVar(v, False)
+ pkg = v.replace(version_str, "")
+ if pkg.endswith("-native") or "-crosssdk-" in pkg or pkg.startswith(("nativesdk-", "virtual/nativesdk-")):
+ continue
+ if '-cross-' in pkg and '${' in pkg:
+ for p in prefixes:
+ localdata = bb.data.createCopy(d)
+ override = ":virtclass-multilib-" + p
+ localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override)
+ if "-canadian-" in pkg:
+ newname = localdata.expand(v)
+ else:
+ newname = localdata.expand(v).replace(version_str, version_str + p + '-')
+ if newname != v:
+ newval = localdata.expand(val)
+ d.setVar(newname, newval)
+ # Avoid future variable key expansion
+ vexp = d.expand(v)
+ if v != vexp and d.getVar(v, False):
+ d.renameVar(v, vexp)
+ continue
for p in prefixes:
- localdata = bb.data.createCopy(d)
- override = ":virtclass-multilib-" + p
- localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override)
- if "-canadian-" in pkg:
- newname = localdata.expand(v)
- else:
- newname = localdata.expand(v).replace("PREFERRED_VERSION_", "PREFERRED_VERSION_" + p + '-')
- if newname != v:
- newval = localdata.expand(val)
- d.setVar(newname, newval)
- # Avoid future variable key expansion
- vexp = d.expand(v)
- if v != vexp and d.getVar(v, False):
- d.renameVar(v, vexp)
- continue
- for p in prefixes:
- newname = "PREFERRED_VERSION_" + p + "-" + pkg
- if not d.getVar(newname, False):
- d.setVar(newname, val)
+ newname = version_str + p + "-" + pkg
+ if not d.getVar(newname, False):
+ d.setVar(newname, val)
+
+ sort_versions(required_versions, "REQUIRED")
+ sort_versions(preferred_versions, "PREFERRED")
for prov in providers:
val = d.getVar(prov, False)
diff --git a/poky/meta/classes/populate_sdk_base.bbclass b/poky/meta/classes/populate_sdk_base.bbclass
index c8a7084d3..33ba3fc3c 100644
--- a/poky/meta/classes/populate_sdk_base.bbclass
+++ b/poky/meta/classes/populate_sdk_base.bbclass
@@ -329,6 +329,13 @@ def sdk_variables(d):
do_populate_sdk[vardeps] += "${@sdk_variables(d)}"
+python () {
+ variables = sdk_command_variables(d)
+ for var in variables:
+ if d.getVar(var, False):
+ d.setVarFlag(var, 'func', '1')
+}
+
do_populate_sdk[file-checksums] += "${TOOLCHAIN_SHAR_REL_TMPL}:True \
${TOOLCHAIN_SHAR_EXT_TMPL}:True"
diff --git a/poky/meta/classes/populate_sdk_ext.bbclass b/poky/meta/classes/populate_sdk_ext.bbclass
index e6bf27cf3..84232ed9f 100644
--- a/poky/meta/classes/populate_sdk_ext.bbclass
+++ b/poky/meta/classes/populate_sdk_ext.bbclass
@@ -251,7 +251,9 @@ python copy_buildsystem () {
# Create a layer for new recipes / appends
bbpath = d.getVar('BBPATH')
- bb.process.run(['devtool', '--bbpath', bbpath, '--basepath', baseoutpath, 'create-workspace', '--create-only', os.path.join(baseoutpath, 'workspace')])
+ env = os.environ.copy()
+ env['PYTHONDONTWRITEBYTECODE'] = '1'
+ bb.process.run(['devtool', '--bbpath', bbpath, '--basepath', baseoutpath, 'create-workspace', '--create-only', os.path.join(baseoutpath, 'workspace')], env=env)
# Create bblayers.conf
bb.utils.mkdirhier(baseoutpath + '/conf')
@@ -364,12 +366,19 @@ python copy_buildsystem () {
# Hide the config information from bitbake output (since it's fixed within the SDK)
f.write('BUILDCFG_HEADER = ""\n\n')
+ # Write METADATA_REVISION
+ f.write('METADATA_REVISION = "%s"\n\n' % d.getVar('METADATA_REVISION'))
+
f.write('# Provide a flag to indicate we are in the EXT_SDK Context\n')
f.write('WITHIN_EXT_SDK = "1"\n\n')
# Map gcc-dependent uninative sstate cache for installer usage
f.write('SSTATE_MIRRORS += " file://universal/(.*) file://universal-4.9/\\1 file://universal-4.9/(.*) file://universal-4.8/\\1"\n\n')
+ if d.getVar("PRSERV_HOST"):
+ # Override this, we now include PR data, so it should only point ot the local database
+ f.write('PRSERV_HOST = "localhost:0"\n\n')
+
# Allow additional config through sdk-extra.conf
fn = bb.cookerdata.findConfigFile('sdk-extra.conf', d)
if fn:
@@ -393,6 +402,27 @@ python copy_buildsystem () {
bb.utils.mkdirhier(os.path.join(baseoutpath, 'cache'))
shutil.copyfile(builddir + '/cache/bb_unihashes.dat', baseoutpath + '/cache/bb_unihashes.dat')
+ # If PR Service is in use, we need to export this as well
+ bb.note('Do we have a pr database?')
+ if d.getVar("PRSERV_HOST"):
+ bb.note('Writing PR database...')
+ # Based on the code in classes/prexport.bbclass
+ import oe.prservice
+ #dump meta info of tables
+ localdata = d.createCopy()
+ localdata.setVar('PRSERV_DUMPOPT_COL', "1")
+ localdata.setVar('PRSERV_DUMPDIR', os.path.join(baseoutpath, 'conf'))
+ localdata.setVar('PRSERV_DUMPFILE', '${PRSERV_DUMPDIR}/prserv.inc')
+
+ bb.note('PR Database write to %s' % (localdata.getVar('PRSERV_DUMPFILE')))
+
+ retval = oe.prservice.prserv_dump_db(localdata)
+ if not retval:
+ bb.error("prexport_handler: export failed!")
+ return
+ (metainfo, datainfo) = retval
+ oe.prservice.prserv_export_tofile(localdata, metainfo, datainfo, True)
+
# Use templateconf.cfg file from builddir if exists
if os.path.exists(builddir + '/conf/templateconf.cfg') and use_custom_templateconf == '1':
shutil.copyfile(builddir + '/conf/templateconf.cfg', baseoutpath + '/conf/templateconf.cfg')
diff --git a/poky/meta/classes/qemuboot.bbclass b/poky/meta/classes/qemuboot.bbclass
index 4b7532b30..1f8012edc 100644
--- a/poky/meta/classes/qemuboot.bbclass
+++ b/poky/meta/classes/qemuboot.bbclass
@@ -72,6 +72,9 @@
# Can be used to automatically determine the image from the other variables
# but define things link 'bootindex' when booting from EFI or 'readonly' when using squashfs
# without the need to specify a dedicated qemu configuration
+#
+# QB_GRAPHICS: QEMU video card type (e.g. "-vga std")
+#
# Usage:
# IMAGE_CLASSES += "qemuboot"
# See "runqemu help" for more info
@@ -86,6 +89,7 @@ QB_NETWORK_DEVICE ?= "-device virtio-net-pci,netdev=net0,mac=@MAC@"
QB_CMDLINE_IP_SLIRP ?= "ip=dhcp"
QB_CMDLINE_IP_TAP ?= "ip=192.168.7.@CLIENT@::192.168.7.@GATEWAY@:255.255.255.0"
QB_ROOTFS_EXTRA_OPT ?= ""
+QB_GRAPHICS ?= ""
# This should be kept align with ROOT_VM
QB_DRIVE_TYPE ?= "/dev/sd"
@@ -99,7 +103,7 @@ def qemuboot_vars(d):
build_vars = ['MACHINE', 'TUNE_ARCH', 'DEPLOY_DIR_IMAGE',
'KERNEL_IMAGETYPE', 'IMAGE_NAME', 'IMAGE_LINK_NAME',
'STAGING_DIR_NATIVE', 'STAGING_BINDIR_NATIVE',
- 'STAGING_DIR_HOST']
+ 'STAGING_DIR_HOST', 'SERIAL_CONSOLES']
return build_vars + [k for k in d.keys() if k.startswith('QB_')]
do_write_qemuboot_conf[vardeps] += "${@' '.join(qemuboot_vars(d))}"
diff --git a/poky/meta/classes/rootfs-postcommands.bbclass b/poky/meta/classes/rootfs-postcommands.bbclass
index 1f27a3d07..e66ed5938 100644
--- a/poky/meta/classes/rootfs-postcommands.bbclass
+++ b/poky/meta/classes/rootfs-postcommands.bbclass
@@ -34,7 +34,7 @@ ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest ; "
# Set default postinst log file
POSTINST_LOGFILE ?= "${localstatedir}/log/postinstall.log"
# Set default target for systemd images
-SYSTEMD_DEFAULT_TARGET ?= '${@bb.utils.contains("IMAGE_FEATURES", "x11-base", "graphical.target", "multi-user.target", d)}'
+SYSTEMD_DEFAULT_TARGET ?= '${@bb.utils.contains_any("IMAGE_FEATURES", [ "x11-base", "weston" ], "graphical.target", "multi-user.target", d)}'
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("DISTRO_FEATURES", "systemd", "set_systemd_default_target; systemd_create_users;", "", d)}'
ROOTFS_POSTPROCESS_COMMAND += 'empty_var_volatile;'
diff --git a/poky/meta/classes/sanity.bbclass b/poky/meta/classes/sanity.bbclass
index 485173ab4..894f0e310 100644
--- a/poky/meta/classes/sanity.bbclass
+++ b/poky/meta/classes/sanity.bbclass
@@ -895,7 +895,7 @@ def check_sanity_everybuild(status, d):
mirror_vars = ['MIRRORS', 'PREMIRRORS', 'SSTATE_MIRRORS']
protocols = ['http', 'ftp', 'file', 'https', \
'git', 'gitsm', 'hg', 'osc', 'p4', 'svn', \
- 'bzr', 'cvs', 'npm', 'sftp', 'ssh', 's3' ]
+ 'bzr', 'cvs', 'npm', 'sftp', 'ssh', 's3', 'az' ]
for mirror_var in mirror_vars:
mirrors = (d.getVar(mirror_var) or '').replace('\\n', ' ').split()
diff --git a/poky/meta/classes/sstate.bbclass b/poky/meta/classes/sstate.bbclass
index f57916816..8e8efd18d 100644
--- a/poky/meta/classes/sstate.bbclass
+++ b/poky/meta/classes/sstate.bbclass
@@ -1146,14 +1146,18 @@ python sstate_eventhandler() {
SSTATE_PRUNE_OBSOLETEWORKDIR ?= "1"
-# Event handler which removes manifests and stamps file for
-# recipes which are no longer reachable in a build where they
-# once were.
+#
+# Event handler which removes manifests and stamps file for recipes which are no
+# longer 'reachable' in a build where they once were. 'Reachable' refers to
+# whether a recipe is parsed so recipes in a layer which was removed would no
+# longer be reachable. Switching between systemd and sysvinit where recipes
+# became skipped would be another example.
+#
# Also optionally removes the workdir of those tasks/recipes
#
-addhandler sstate_eventhandler2
-sstate_eventhandler2[eventmask] = "bb.event.ReachableStamps"
-python sstate_eventhandler2() {
+addhandler sstate_eventhandler_reachablestamps
+sstate_eventhandler_reachablestamps[eventmask] = "bb.event.ReachableStamps"
+python sstate_eventhandler_reachablestamps() {
import glob
d = e.data
stamps = e.stamps.values()
@@ -1223,3 +1227,59 @@ python sstate_eventhandler2() {
if preservestamps:
os.remove(preservestampfile)
}
+
+
+#
+# Bitbake can generate an event showing which setscene tasks are 'stale',
+# i.e. which ones will be rerun. These are ones where a stamp file is present but
+# it is stable (e.g. taskhash doesn't match). With that list we can go through
+# the manifests for matching tasks and "uninstall" those manifests now. We do
+# this now rather than mid build since the distribution of files between sstate
+# objects may have changed, new tasks may run first and if those new tasks overlap
+# with the stale tasks, we'd see overlapping files messages and failures. Thankfully
+# removing these files is fast.
+#
+addhandler sstate_eventhandler_stalesstate
+sstate_eventhandler_stalesstate[eventmask] = "bb.event.StaleSetSceneTasks"
+python sstate_eventhandler_stalesstate() {
+ d = e.data
+ tasks = e.tasks
+
+ bb.utils.mkdirhier(d.expand("${SSTATE_MANIFESTS}"))
+
+ for a in list(set(d.getVar("SSTATE_ARCHS").split())):
+ toremove = []
+ i = d.expand("${SSTATE_MANIFESTS}/index-" + a)
+ if not os.path.exists(i):
+ continue
+ with open(i, "r") as f:
+ lines = f.readlines()
+ for l in lines:
+ try:
+ (stamp, manifest, workdir) = l.split()
+ for tid in tasks:
+ for s in tasks[tid]:
+ if s.startswith(stamp):
+ taskname = bb.runqueue.taskname_from_tid(tid)[3:]
+ manname = manifest + "." + taskname
+ if os.path.exists(manname):
+ bb.debug(2, "Sstate for %s is stale, removing related manifest %s" % (tid, manname))
+ toremove.append((manname, tid, tasks[tid]))
+ break
+ except ValueError:
+ bb.fatal("Invalid line '%s' in sstate manifest '%s'" % (l, i))
+
+ if toremove:
+ msg = "Removing %d stale sstate objects for arch %s" % (len(toremove), a)
+ bb.event.fire(bb.event.ProcessStarted(msg, len(toremove)), d)
+
+ removed = 0
+ for (manname, tid, stamps) in toremove:
+ sstate_clean_manifest(manname, d)
+ for stamp in stamps:
+ bb.utils.remove(stamp)
+ removed = removed + 1
+ bb.event.fire(bb.event.ProcessProgress(msg, removed), d)
+
+ bb.event.fire(bb.event.ProcessFinished(msg), d)
+}
diff --git a/poky/meta/classes/toolchain-scripts.bbclass b/poky/meta/classes/toolchain-scripts.bbclass
index db1d3215e..67a812cb0 100644
--- a/poky/meta/classes/toolchain-scripts.bbclass
+++ b/poky/meta/classes/toolchain-scripts.bbclass
@@ -8,6 +8,8 @@ TARGET_CC_ARCH_append_libc-musl = " -mmusl"
# default debug prefix map isn't valid in the SDK
DEBUG_PREFIX_MAP = ""
+EXPORT_SDK_PS1 = "${@ 'export PS1=\'%s\'' % d.getVar('SDK_PS1') if d.getVar('SDK_PS1') else ''}"
+
# This function creates an environment-setup-script for use in a deployable SDK
toolchain_create_sdk_env_script () {
# Create environment setup script. Remember that $SDKTARGETSYSROOT should
@@ -39,6 +41,7 @@ toolchain_create_sdk_env_script () {
echo ' return 1' >> $script
echo 'fi' >> $script
+ echo "${EXPORT_SDK_PS1}" >> $script
echo 'export SDKTARGETSYSROOT='"$sysroot" >> $script
EXTRAPATH=""
for i in ${CANADIANEXTRAOS}; do