Skip to contentSkip to conversation

staging: Ensure we handle glibc-locale do_stash_locale correctly

PATCH New Richard Purdie 1 participant 3 messages Sep 7, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 staging: Ensure we handle glibc-locale do_stash_locale correctly

Occasionally we see warnings like:

WARNING: core-image-sato-1.0-r0 do_populate_sdk: Manifest /home/pokybuild/yocto-worker/nightly-qa-extras/build/build/tmp/sstate-control/manifest-allarch-nativesdk-linux-libc-headers.populate_sysroot not found in i686_linux allarch (variant '')?

which occur when do_populate_sdk is run in an otherwise empty TMPDIR.

It occurs because do_stash_locale is not recognised as a setscene task and is removed from the taskgraph meaning the dependency chains fed through setscene_depvalid don't match what was actually setscene'd.

That task is recipe specific and not in the global SSTATETASKS so we hardcode the value for now to stop the build warnings. This is going to need to be revisited for a more generic solution.

---
 meta/classes/staging.bbclass | 2 ++
 1 file changed, 2 insertions(+)
meta/classes/staging.bbclass +2 -0
index 27b012ecbdd..a1e4cf70900 100644
@@ -294,6 +294,8 @@ python extend_recipe_sysroot() {
     start = set([start])
 
     sstatetasks = d.getVar("SSTATETASKS").split()
+    # Add recipe specific tasks referenced by setscene_depvalid()
+    sstatetasks.append("do_stash_locale")
 
     def print_dep_tree(deptree):
         data = ""
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/3 staging: Fix broken debug code

The code currently only prints a single depchain due to overwriting data instead of appending. Fix this.

---
 meta/classes/staging.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/staging.bbclass +1 -1
index a1e4cf70900..84e13bab592 100644
@@ -301,7 +301,7 @@ python extend_recipe_sysroot() {
         data = ""
         for dep in deptree:
             deps = "    " + "\n    ".join(deptree[dep][3]) + "\n"
-            data = "%s:\n  %s\n  %s\n%s  %s\n  %s\n" % (deptree[dep][0], deptree[dep][1], deptree[dep][2], deps, deptree[dep][4], deptree[dep][5])
+            data = data + "%s:\n  %s\n  %s\n%s  %s\n  %s\n" % (deptree[dep][0], deptree[dep][1], deptree[dep][2], deps, deptree[dep][4], deptree[dep][5])
         return data
 
     #bb.note("Full dep tree is:\n%s" % print_dep_tree(taskdepdata))
Signature · 1 line
2.17.1
#2 lore raw

PATCH 3/3 busybox/packagegroups: Break out the busybox-syslog dependency

In reply to Richard Purdie

The busybox-syslog rrecomends is proving tricky as it gets pulled in early and there are conflicts between its use of update-alternatives and busybox needing to provide those things.

We already have recipes using BAD_RRECOMMENDS to remove this dependency, it probably makes sense to spell it out explicitly and allow it to be overridden more easily.

This patch does this, dropping the now unneeded BAD_RRECOMMENDS. It preserves the dependency as a recommendation for now, further cleanup may allow simplication of that.

This unbreaks certain build failures on the autobuilder, more as a workaround but is a change we probably want to make anyway.

---
 meta/conf/distro/include/default-providers.inc                  | 1 +
 meta/recipes-core/busybox/busybox.inc                           | 2 +-
 meta/recipes-core/images/core-image-minimal-initramfs.bb        | 2 --
 meta/recipes-core/images/core-image-tiny-initramfs.bb           | 2 --
 meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb      | 1 +
 .../initrdscripts/initramfs-live-install-efi_1.0.bb             | 1 +
 meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb   | 1 +
 .../initrdscripts/initramfs-module-install-efi_1.0.bb           | 1 +
 meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb | 1 +
 meta/recipes-core/packagegroups/packagegroup-core-boot.bb       | 1 +
 10 files changed, 8 insertions(+), 5 deletions(-)
meta/conf/distro/include/default-providers.inc +1 -0
index 779b03d50cf..019ceeb290a 100644
@@ -25,6 +25,7 @@ VIRTUAL-RUNTIME_alsa-state ?= "alsa-state"
 VIRTUAL-RUNTIME_getopt ?= "util-linux-getopt"
 VIRTUAL-RUNTIME_base-utils ?= "busybox"
 VIRTUAL-RUNTIME_base-utils-hwclock ?= "busybox-hwclock"
+VIRTUAL-RUNTIME_base-utils-syslog ?= "busybox-syslog"
 
 #
 # Default recipe providers
meta/recipes-core/busybox/busybox.inc +1 -1
index 2ad29a7e72e..e1fba4243a1 100644
@@ -47,7 +47,7 @@ RCONFLICTS_${PN}-syslog = "rsyslog sysklogd syslog-ng"
 
 CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf"
 
-RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc"
+RRECOMMENDS_${PN} = "${PN}-udhcpc"
 
 RDEPENDS_${PN} = "${@["", "busybox-inittab"][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox')]}"
 
meta/recipes-core/images/core-image-minimal-initramfs.bb +0 -2
index 6de860e43a8..7df8ab1ebd8 100644
@@ -27,7 +27,5 @@ inherit core-image
 IMAGE_ROOTFS_SIZE = "8192"
 IMAGE_ROOTFS_EXTRA_SPACE = "0"
 
-BAD_RECOMMENDATIONS += "busybox-syslog"
-
 # Use the same restriction as initramfs-live-install
 COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
meta/recipes-core/images/core-image-tiny-initramfs.bb +0 -2
index 51d08a0cd1c..d7f97f3a170 100644
@@ -23,8 +23,6 @@ inherit core-image
 IMAGE_ROOTFS_SIZE = "8192"
 IMAGE_ROOTFS_EXTRA_SPACE = "0"
 
-BAD_RECOMMENDATIONS += "busybox-syslog"
-
 # Use the same restriction as initramfs-live-install
 COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
 
meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb +1 -0
index 6337b998acc..660343eafa2 100644
@@ -2,6 +2,7 @@ SUMMARY = "Modular initramfs system"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_base-utils}"
+RRECOMMENDS_${PN} = "${VIRTUAL-RUNTIME_base-utils-syslog}"
 
 PR = "r4"
 
meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb +1 -0
index f588a1077bf..cc842ae8b71 100644
@@ -6,6 +6,7 @@ SRC_URI = "file://init-install-efi.sh"
 PR = "r1"
 
 RDEPENDS_${PN} = "parted e2fsprogs-mke2fs dosfstools util-linux-blkid ${VIRTUAL-RUNTIME_base-utils}"
+RRECOMMENDS_${PN} = "${VIRTUAL-RUNTIME_base-utils-syslog}"
 
 S = "${WORKDIR}"
 
meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb +1 -0
index 9222d57c1ae..48fc0c4a769 100644
@@ -8,6 +8,7 @@ PR = "r9"
 S = "${WORKDIR}"
 
 RDEPENDS_${PN} = "grub parted e2fsprogs-mke2fs util-linux-blkid ${VIRTUAL-RUNTIME_base-utils}"
+RRECOMMENDS_${PN} = "${VIRTUAL-RUNTIME_base-utils-syslog}"
 
 do_install() {
         install -m 0755 ${WORKDIR}/init-install.sh ${D}/install.sh
meta/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bb +1 -0
index 78a61cde25f..523138cff36 100644
@@ -2,6 +2,7 @@ SUMMARY = "initramfs-framework module for EFI installation option"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 RDEPENDS_${PN} = "initramfs-framework-base parted e2fsprogs-mke2fs dosfstools util-linux-blkid ${VIRTUAL-RUNTIME_base-utils}"
+RRECOMMENDS_${PN} = "${VIRTUAL-RUNTIME_base-utils-syslog}"
 
 PR = "r4"
 
meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb +1 -0
index 04e90cd302c..56898e824f3 100644
@@ -2,6 +2,7 @@ SUMMARY = "initramfs-framework module for installation option"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 RDEPENDS_${PN} = "initramfs-framework-base grub parted e2fsprogs-mke2fs util-linux-blkid ${VIRTUAL-RUNTIME_base-utils}"
+RRECOMMENDS_${PN} = "${VIRTUAL-RUNTIME_base-utils-syslog}"
 
 # The same restriction as grub
 COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)'
meta/recipes-core/packagegroups/packagegroup-core-boot.bb +1 -0
index 76cd7fc4ebf..8dc445dc8f6 100644
@@ -46,4 +46,5 @@ RDEPENDS_${PN} = "\
     ${MACHINE_ESSENTIAL_EXTRA_RDEPENDS}"
 
 RRECOMMENDS_${PN} = "\
+    ${VIRTUAL-RUNTIME_base-utils-syslog} \
     ${MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS}"
Signature · 1 line
2.17.1