Simplify how to stage directories in the sysroot
PATCH 2/16 u-boot-fw-utils: Use SYSROOT_DIRS to add dirs to stage in sysroot
In reply to Peter Kjellerstedt--- meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb +1 -4
@@ -40,10 +40,7 @@ do_install_class-cross () { install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv } -SYSROOT_PREPROCESS_FUNCS_class-cross = "uboot_fw_utils_cross" -uboot_fw_utils_cross() { - sysroot_stage_dir ${D}${bindir_cross} ${SYSROOT_DESTDIR}${bindir_cross} -} +SYSROOT_DIRS_append_class-cross = " ${bindir_cross}" PACKAGE_ARCH = "${MACHINE_ARCH}" BBCLASSEXTEND = "cross"
Signature · 1 line
2.1.0
PATCH 4/16 qemuwrapper-cross: Use SYSROOT_DIRS to add dirs to stage in sysroot
In reply to Peter Kjellerstedt--- meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb +1 -5
@@ -41,10 +41,6 @@ EOF chmod +x ${D}${bindir_crossscripts}/qemuwrapper } -SYSROOT_PREPROCESS_FUNCS += "qemuwrapper_sysroot_preprocess" - -qemuwrapper_sysroot_preprocess () { - sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts} -} +SYSROOT_DIRS += "${bindir_crossscripts}" INHIBIT_DEFAULT_DEPS = "1"
Signature · 1 line
2.1.0
PATCH 5/16 tcl: Use SYSROOT_DIRS to add dirs to stage in sysroot
In reply to Peter Kjellerstedt--- meta/recipes-devtools/tcltk/tcl_8.6.4.bb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
meta/recipes-devtools/tcltk/tcl_8.6.4.bb +1 -4
@@ -68,10 +68,7 @@ do_install() { done } -SYSROOT_PREPROCESS_FUNCS += "tcl_sysroot_preprocess" -tcl_sysroot_preprocess () { - sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts} -} +SYSROOT_DIRS += "${bindir_crossscripts}" PACKAGES =+ "tcl-lib" FILES_tcl-lib = "${libdir}/libtcl8.6.so.*"
Signature · 1 line
2.1.0
PATCH 6/16 shadow-sysroot: Use SYSROOT_DIRS to add dirs to stage in sysroot
In reply to Peter Kjellerstedt--- meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb +2 -4
@@ -21,12 +21,10 @@ S = "${WORKDIR}" do_install() { install -d ${D}${sysconfdir} - install -p -m 755 ${S}/login.defs_shadow-sysroot ${D}${sysconfdir}/login.defs + install -p -m 644 ${S}/login.defs_shadow-sysroot ${D}${sysconfdir}/login.defs } -sysroot_stage_all() { - sysroot_stage_dir ${D} ${SYSROOT_DESTDIR} -} +SYSROOT_DIRS += "${sysconfdir}" # don't create any packages # otherwise: dbus-dev depends on shadow-sysroot-dev which depends on shadow-sysroot
Signature · 1 line
2.1.0
PATCH 9/16 signing-keys: Use SYSROOT_DIRS to add dirs to stage in sysroot
In reply to Peter Kjellerstedt--- meta/recipes-core/meta/signing-keys.bb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
meta/recipes-core/meta/signing-keys.bb +2 -4
@@ -12,6 +12,8 @@ inherit allarch deploy EXCLUDE_FROM_WORLD = "1" INHIBIT_DEFAULT_DEPS = "1" +SYSROOT_DIRS += "${sysconfdir}/pki" + PACKAGES =+ "${PN}-ipk ${PN}-rpm ${PN}-packagefeed" FILES_${PN}-rpm = "${sysconfdir}/pki/rpm-gpg"
@@ -54,10 +56,6 @@ do_install () { fi } -sysroot_stage_all_append () { - sysroot_stage_dir ${D}${sysconfdir}/pki ${SYSROOT_DESTDIR}${sysconfdir}/pki -} - do_deploy () { if [ -f "${B}/rpm-key" ]; then install -D -m 0644 "${B}/rpm-key" "${DEPLOYDIR}/RPM-GPG-KEY-${DISTRO_VERSION}"
Signature · 1 line
2.1.0
PATCH 11/16 gobject-introspection: Use SYSROOT_DIRS to add dirs to stage in sysroot
In reply to Peter Kjellerstedt--- .../gobject-introspection/gobject-introspection_1.46.0.bb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
meta/recipes-gnome/gobject-introspection/gobject-introspection_1.46.0.bb +4 -5
@@ -151,13 +151,12 @@ FILES_${PN}-staticdev += "${libdir}/gobject-introspection/giscanner/*.a" # we need target versions of introspection tools in sysroot so that they can be run via qemu # when building introspection files in other packages -SYSROOT_PREPROCESS_FUNCS_append_class-target += "gi_binaries_sysroot_preprocess" +SYSROOT_DIRS_append_class-target = " ${bindir}" +SYSROOT_PREPROCESS_FUNCS_append_class-target = " gi_binaries_sysroot_preprocess" gi_binaries_sysroot_preprocess() { - sysroot_stage_dir ${D}${bindir} ${SYSROOT_DESTDIR}${bindir} - - # Also, tweak the binary names in introspection pkgconfig file, so that it picks up our - # wrappers which do the cross-compile and qemu magic. + # Tweak the binary names in the introspection pkgconfig file, so that it + # picks up our wrappers which do the cross-compile and qemu magic. sed -i \ -e "s|g_ir_scanner=.*|g_ir_scanner=${bindir}/g-ir-scanner-wrapper|" \ -e "s|g_ir_compiler=.*|g_ir_compiler=${bindir}/g-ir-compiler-wrapper|" \
Signature · 1 line
2.1.0
PATCH 13/16 gettext: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from the sysroot
In reply to Peter Kjellerstedt--- meta/recipes-core/gettext/gettext_0.16.1.bb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
meta/recipes-core/gettext/gettext_0.16.1.bb +1 -6
@@ -102,11 +102,6 @@ do_install_append() { # available, and we don't want to use older macros from the target gettext in # a non-gplv3 build, so kill them and let dependent recipes rely on # gettext-native. - -SYSROOT_PREPROCESS_FUNCS += "remove_sysroot_m4_macros" - -remove_sysroot_m4_macros () { - rm -r "${SYSROOT_DESTDIR}${datadir}/aclocal" -} +SYSROOT_DIRS_BLACKLIST += "${datadir}/aclocal" BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.1.0
PATCH 14/16 gcc-target.inc: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from sysroot
In reply to Peter Kjellerstedt--- meta/recipes-devtools/gcc/gcc-target.inc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
meta/recipes-devtools/gcc/gcc-target.inc +1 -3
@@ -205,6 +205,4 @@ do_install_append () { # and builds track file dependencies (e.g. perl and its makedepends code). # For determinism we don't install this ever and rely on the copy from gcc-cross. # [YOCTO #7287] -sysroot_stage_dirs_append () { - rm -rf $to${libdir}/gcc -} +SYSROOT_DIRS_BLACKLIST += "${libdir}/gcc"
Signature · 1 line
2.1.0
PATCH 15/16 libtool: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from the sysroot
In reply to Peter Kjellerstedt--- meta/recipes-devtools/libtool/libtool_2.4.6.bb | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)
meta/recipes-devtools/libtool/libtool_2.4.6.bb +5 -8
@@ -5,7 +5,11 @@ RDEPENDS_${PN} += "bash" # # We want the results of libtool-cross preserved - don't stage anything ourselves. # -SYSROOT_PREPROCESS_FUNCS += "libtool_sysroot_preprocess" +SYSROOT_DIRS_BLACKLIST += " \ + ${bindir} \ + ${datadir}/aclocal \ + ${datadir}/libtool/build-aux \ +" do_install_append () { sed -e 's@--sysroot=${STAGING_DIR_HOST}@@g' \
@@ -18,10 +22,3 @@ do_install_append () { -e 's@^\(postdep_objects="\).*@\1"@' \ -i ${D}${bindir}/libtool } - -libtool_sysroot_preprocess () { - rm -rf ${SYSROOT_DESTDIR}${bindir}/* - rm -rf ${SYSROOT_DESTDIR}${datadir}/aclocal/* - rm -rf ${SYSROOT_DESTDIR}${datadir}/libtool/build-aux/* -} -
Signature · 1 line
2.1.0
PATCH 16/16 font-util: Remove ${datadir}/fonts from SYSROOT_DIRS_BLACKLIST
In reply to Peter Kjellerstedt--- meta/recipes-graphics/xorg-font/font-util_1.3.1.bb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
meta/recipes-graphics/xorg-font/font-util_1.3.1.bb +1 -4
@@ -19,7 +19,4 @@ BBCLASSEXTEND = "native" SRC_URI[md5sum] = "23756dab809f9ec5011bb27fb2c3c7d6" SRC_URI[sha256sum] = "aa7ebdb0715106dd255082f2310dbaa2cd7e225957c2a77d719720c7cc92b921" -SYSROOT_PREPROCESS_FUNCS += "fontutil_sysroot_preprocess" -fontutil_sysroot_preprocess () { - sysroot_stage_dir ${D}${datadir}/fonts/ ${SYSROOT_DESTDIR}${datadir}/fonts/ -} +SYSROOT_DIRS_BLACKLIST_remove = "${datadir}/fonts"
Signature · 1 line
2.1.0
PATCH 3/16 libtool-cross: Use SYSROOT_DIRS to add dirs to stage in sysroot
In reply to Peter Kjellerstedt--- meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb +1 -6
@@ -35,11 +35,6 @@ do_install () { install -c -m 0644 ${S}/m4/*.m4 ${D}${target_datadir}/aclocal/ } -SYSROOT_PREPROCESS_FUNCS += "libtoolcross_sysroot_preprocess" - -libtoolcross_sysroot_preprocess () { - sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts} - sysroot_stage_dir ${D}${target_datadir} ${SYSROOT_DESTDIR}${target_datadir} -} +SYSROOT_DIRS += "${bindir_crossscripts} ${target_datadir}" SSTATE_SCAN_FILES += "libtoolize *-libtool"
Signature · 1 line
2.1.0
PATCH 7/16 depmodwrapper-cross: Use SYSROOT_DIRS to add dirs to stage in sysroot
In reply to Peter Kjellerstedt--- meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb +1 -5
@@ -41,10 +41,6 @@ EOF chmod +x ${D}${bindir_crossscripts}/depmodwrapper } -SYSROOT_PREPROCESS_FUNCS += "depmodwrapper_sysroot_preprocess" - -depmodwrapper_sysroot_preprocess () { - sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts} -} +SYSROOT_DIRS += "${bindir_crossscripts}" inherit nopackages
Signature · 1 line
2.1.0
PATCH 8/16 base-files: Use SYSROOT_DIRS to add dirs to stage in sysroot
In reply to Peter Kjellerstedt--- meta/recipes-core/base-files/base-files_3.0.14.bb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
meta/recipes-core/base-files/base-files_3.0.14.bb +1 -4
@@ -165,9 +165,7 @@ do_install_append_linuxstdbase() { done } -sysroot_stage_all_append () { - sysroot_stage_dir ${D}${sysconfdir}/skel ${SYSROOT_DESTDIR}${sysconfdir}/skel -} +SYSROOT_DIRS += "${sysconfdir}/skel" PACKAGES = "${PN}-doc ${PN} ${PN}-dev ${PN}-dbg" FILES_${PN} = "/"
@@ -177,4 +175,3 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" CONFFILES_${PN} = "${sysconfdir}/fstab ${@['', '${sysconfdir}/hostname'][(d.getVar('hostname', True) != '')]} ${sysconfdir}/shells" CONFFILES_${PN} += "${sysconfdir}/motd ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile" -
Signature · 1 line
2.1.0
PATCH 10/16 vala.inc: Use SYSROOT_DIRS to add dirs to stage in sysroot
In reply to Peter Kjellerstedt--- meta/recipes-devtools/vala/vala.inc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
meta/recipes-devtools/vala/vala.inc +6 -7
@@ -36,15 +36,14 @@ do_install_append_class-target() { install ${B}/vapigen-wrapper ${D}${bindir}/ } +# Put vapigen wrapper into target sysroot so that it can be used when building +# vapi files. +SYSROOT_DIRS_append_class-target = " ${bindir}" -SYSROOT_PREPROCESS_FUNCS_append_class-target += "vapigen_sysroot_preprocess" - +SYSROOT_PREPROCESS_FUNCS_append_class-target = " vapigen_sysroot_preprocess" vapigen_sysroot_preprocess() { - # Put vapigen wrapper into target sysroot so that it can be used when building vapi files. - sysroot_stage_dir ${D}${bindir} ${SYSROOT_DESTDIR}${bindir} - - # Also, tweak the vapigen name in vapigen pkgconfig file, so that it picks up our - # wrapper. + # Tweak the vapigen name in the vapigen pkgconfig file, so that it picks + # up our wrapper. sed -i \ -e "s|vapigen=.*|vapigen=${bindir}/vapigen-wrapper|" \ ${SYSROOT_DESTDIR}${datadir}/pkgconfig/vapigen-${SHRT_VER}.pc
Signature · 1 line
2.1.0
cover Simplify how to stage directories in the sysroot
The first commit in this set makes it possible to specify the directories that will be staged in the sysroot via variables rather than hardcoding it in sysroot_stage_dirs(). This should make it a lot easier to add/remove directories to stage.
The rest of the commits just change recipes to take advantage of the new variables.
Because of the following if statement in sysroot_stage_dirs():
if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; thenI have split the list of directories into SYSROOT_DIRS and SYSROOT_DIRS_NATIVE, where the latter is included if that if statement is true. I am not sure when that statement is true (my understanding is that it should be true for native builds, but I am not sure if it is also true for other builds like cross, nativesdk, etc). If it is only true for native builds then that if statement could be removed, and the SYSROOT_DIRS_NATIVE variable could be replaced by SYSROOT_DIRS_append_class-native...
//Peter
The following changes since commit 28433319ad8299aa23b1fcfdddbe100b29e86517:
bitbake: toaster: tests browser Add test for creating a project (2016-05-11 11:32:58 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib pkj/sysroot_dirs
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=pkj/sysroot_dirs
Peter Kjellerstedt (16):
staging.bbclass: Make it easier to define which dirs to stage
u-boot-fw-utils: Use SYSROOT_DIRS to add dirs to stage in sysroot
libtool-cross: Use SYSROOT_DIRS to add dirs to stage in sysroot
qemuwrapper-cross: Use SYSROOT_DIRS to add dirs to stage in sysroot
tcl: Use SYSROOT_DIRS to add dirs to stage in sysroot
shadow-sysroot: Use SYSROOT_DIRS to add dirs to stage in sysroot
depmodwrapper-cross: Use SYSROOT_DIRS to add dirs to stage in sysroot
base-files: Use SYSROOT_DIRS to add dirs to stage in sysroot
signing-keys: Use SYSROOT_DIRS to add dirs to stage in sysroot vala.inc: Use SYSROOT_DIRS to add dirs to stage in sysroot
gobject-introspection: Use SYSROOT_DIRS to add dirs to stage in
sysroot
grub2.inc: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from the sysroot
gettext: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from the sysroot gcc-target.inc: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from
sysroot
libtool: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from the sysroot
font-util: Remove ${datadir}/fonts from SYSROOT_DIRS_BLACKLIST
meta/classes/staging.bbclass | 69 ++++++++++++---------- meta/recipes-bsp/grub/grub2.inc | 5 +- meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb | 5 +- meta/recipes-core/base-files/base-files_3.0.14.bb | 5 +- meta/recipes-core/gettext/gettext_0.16.1.bb | 7 +-- meta/recipes-core/meta/signing-keys.bb | 6 +- meta/recipes-devtools/gcc/gcc-target.inc | 4 +- .../libtool/libtool-cross_2.4.6.bb | 7 +-- meta/recipes-devtools/libtool/libtool_2.4.6.bb | 13 ++-- .../recipes-devtools/qemu/qemuwrapper-cross_1.0.bb | 6 +- meta/recipes-devtools/tcltk/tcl_8.6.4.bb | 5 +- meta/recipes-devtools/vala/vala.inc | 13 ++-- .../shadow/shadow-sysroot_4.2.1.bb | 6 +- .../gobject-introspection_1.46.0.bb | 9 ++- meta/recipes-graphics/xorg-font/font-util_1.3.1.bb | 5 +- .../recipes-kernel/kmod/depmodwrapper-cross_1.0.bb | 6 +- 16 files changed, 67 insertions(+), 104 deletions(-)
Signature · 1 line
2.1.0
PATCH 1/16 staging.bbclass: Make it easier to define which dirs to stage
The directories that should be staged in the sysroot are now specified in the SYSROOT_DIRS variable. Extra directories that should be staged for native are specified in SYSROOT_DIRS_NATIVE. Finally, directories that should not be staged are specified in SYSROOT_DIRS_BLACKLIST.
This also removes the sysroot_stage_libdir() function as it is no longer used (it was just a wrapper for sysroot_stage_dir()).
--- meta/classes/staging.bbclass | 69 ++++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 31 deletions(-)
meta/classes/staging.bbclass +38 -31
@@ -1,3 +1,30 @@ +SYSROOT_DIRS = " \ + ${includedir} \ + ${libdir} \ + ${base_libdir} \ + ${nonarch_base_libdir} \ + ${datadir} \ +" + +SYSROOT_DIRS_NATIVE = " \ + ${bindir} \ + ${sbindir} \ + ${base_bindir} \ + ${base_sbindir} \ + ${libexecdir} \ + ${sysconfdir} \ + ${localstatedir} \ +" + +SYSROOT_DIRS_BLACKLIST = " \ + ${mandir} \ + ${docdir} \ + ${infodir} \ + ${datadir}/locale \ + ${datadir}/applications \ + ${datadir}/fonts \ + ${datadir}/pixmaps \ +" sysroot_stage_dir() { src="$1"
@@ -14,43 +41,23 @@ sysroot_stage_dir() { ) } -sysroot_stage_libdir() { - src="$1" - dest="$2" - - sysroot_stage_dir $src $dest -} - sysroot_stage_dirs() { from="$1" to="$2" - sysroot_stage_dir $from${includedir} $to${includedir} + dirs="${SYSROOT_DIRS}" if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; then - sysroot_stage_dir $from${bindir} $to${bindir} - sysroot_stage_dir $from${sbindir} $to${sbindir} - sysroot_stage_dir $from${base_bindir} $to${base_bindir} - sysroot_stage_dir $from${base_sbindir} $to${base_sbindir} - sysroot_stage_dir $from${libexecdir} $to${libexecdir} - sysroot_stage_dir $from${sysconfdir} $to${sysconfdir} - sysroot_stage_dir $from${localstatedir} $to${localstatedir} + dirs="$dirs ${SYSROOT_DIRS_NATIVE}" fi - if [ -d $from${libdir} ] - then - sysroot_stage_libdir $from${libdir} $to${libdir} - fi - if [ -d $from${base_libdir} ] - then - sysroot_stage_libdir $from${base_libdir} $to${base_libdir} - fi - if [ -d $from${nonarch_base_libdir} ] - then - sysroot_stage_libdir $from${nonarch_base_libdir} $to${nonarch_base_libdir} - fi - sysroot_stage_dir $from${datadir} $to${datadir} - # We don't care about docs/info/manpages/locales - rm -rf $to${mandir}/ $to${docdir}/ $to${infodir}/ ${to}${datadir}/locale/ - rm -rf $to${datadir}/applications/ $to${datadir}/fonts/ $to${datadir}/pixmaps/ + + for dir in $dirs; do + sysroot_stage_dir "$from$dir" "$to$dir" + done + + # Remove directories we do not care about + for dir in ${SYSROOT_DIRS_BLACKLIST}; do + rm -rf "$to$dir" + done } sysroot_stage_all() {
Signature · 1 line
2.1.0
PATCH 12/16 grub2.inc: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from the sysroot
In reply to Peter Kjellerstedt--- meta/recipes-bsp/grub/grub2.inc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
meta/recipes-bsp/grub/grub2.inc +1 -4
@@ -63,7 +63,4 @@ do_configure_prepend() { # grub and grub-efi's sysroot/${datadir}/grub/grub-mkconfig_lib are # conflicted, remove it since no one uses it. -SYSROOT_PREPROCESS_FUNCS_class-target += "remove_sysroot_mkconfig_lib" -remove_sysroot_mkconfig_lib() { - rm -r "${SYSROOT_DESTDIR}${datadir}/grub/grub-mkconfig_lib" -} +SYSROOT_DIRS_BLACKLIST += "${datadir}/grub/grub-mkconfig_lib"
Signature · 1 line
2.1.0
Quoted 12 lines · Peter Kjellerstedt
The first commit in this set makes it possible to specify the directories that will be staged in the sysroot via variables rather than hardcoding it in
sysroot_stage_dirs(). This should make it a lot easier to add/remove directories to stage.The rest of the commits just change recipes to take advantage of the new variables.
Because of the following if statement in
sysroot_stage_dirs():if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; then
Quoted 9 lines
I have split the list of directories into
SYSROOT_DIRSandSYSROOT_DIRS_NATIVE, where the latter is included if that if statement
is true. I am not sure when that statement is true (my understanding is that it should be true for native builds, but I am not sure if it is also true for other builds like cross, nativesdk, etc). If it is only true for native builds then that if statement could be removed, and theSYSROOT_DIRS_NATIVEvariable could be replaced by SYSROOT_DIRS_append_class-native...
It matches binaries that can run on the build system so it needs to match native and cross. Something like:
SYSROOT_DIRS_append_class-native = "${SYSROOT_DIRS_NATIVE}" SYSROOT_DIRS_append_class-cross = "${SYSROOT_DIRS_NATIVE}"
I hadn't realised how much duplication there was in that class. Cleanup I'd never gotten around to doing. I guess most people don't even remember how we ended up with that code or the horrors of do_stage functions :)
Cheers,
Richard
Quoted 29 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Richard Purdie
Sent: den 11 maj 2016 23:35
To: Peter Kjellerstedt; [email protected]
Subject: Re: [OE-core] [PATCH 00/16] Simplify how to stage directories in the sysrootQuoted 12 lines · Peter Kjellerstedt
The first commit in this set makes it possible to specify the directories that will be staged in the sysroot via variables rather than hardcoding it in
sysroot_stage_dirs(). This should make it a lot easier to add/remove directories to stage.The rest of the commits just change recipes to take advantage of the new variables.
Because of the following if statement in
sysroot_stage_dirs():if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; thenQuoted 8 lines
I have split the list of directories into
SYSROOT_DIRSandSYSROOT_DIRS_NATIVE, where the latter is included if that if statement is true. I am not sure when that statement is true (my understanding is that it should be true for native builds, but I am not sure if it is also true for other builds like cross, nativesdk, etc). If it is only true for native builds then that if statement could be removed, and theSYSROOT_DIRS_NATIVEvariable could be replaced by SYSROOT_DIRS_append_class-native...
Quoted 5 lines
It matches binaries that can run on the build system so it needs to match native and cross. Something like:
SYSROOT_DIRS_append_class-native = "${SYSROOT_DIRS_NATIVE}" SYSROOT_DIRS_append_class-cross = "${SYSROOT_DIRS_NATIVE}"
Apparently it is true for crossssdk as well (I ran recipes from each of the five classes through bitbake -e to verify). I will send an updated patch that uses the _append solution instead.
Quoted 4 lines
I hadn't realised how much duplication there was in that class. Cleanup I'd never gotten around to doing. I guess most people don't even remember how we ended up with that code or the horrors of
do_stagefunctions :)
I looked at some of the horrors in the git log while investigating how it works. I am glad you got rid of them. ;)
Quoted 3 lines
Cheers,
Richard
//Peter