Skip to contentSkip to conversation

Misc improvements 1 from Mentor

PATCH In review Christopher Larson 2 participants 12 messages Nov 12, 2015 – Nov 13, 2015

lore
Share & tools
lore
#0 lore raw

cover Misc improvements 1 from Mentor

From: Christopher Larson <[email protected]>

This is the second of three pull requests / patch series from Mentor's queue of changes destined for oe-core master (not jethro). This series includes a few recipe improvements and adds the ability to supply and use wks files from a different layer than the image.

The following changes since commit e44ed8c18e395b9c055aefee113b90708e8a8a2f:

build-appliance-image: Update to jethro head revision (2015-11-03 14:02:57 +0000)

are available in the git repository at:

git://github.com/kergoth/openembedded-core mentor-misc-improvements-1-after-jethro
https://github.com/kergoth/openembedded-core/tree/mentor-misc-improvements-1-after-jethro

Christopher Larson (7):
image_types: improve wks path specification
sysprof: use packageconfig for the gui
sysprof: add missing gdk-pixbuf/pango deps
systemd: for valgrind, define VALGRIND=1
bluez5: enable sysvinit support
psplash: add systemd support
nativesdk-perl: set PERL5LIB based on wrapper path

 meta/classes/image_types.bbclass                   | 22 ++++---
 meta/recipes-connectivity/bluez5/bluez5.inc        |  8 ++-
 meta/recipes-connectivity/bluez5/bluez5/init       | 68 ++++++++++++++++++++++
 .../psplash/files/psplash-quit.service             | 11 ++++
 .../psplash/files/psplash-start.service            | 11 ++++
 meta/recipes-core/psplash/psplash_git.bb           | 20 +++++--
 meta/recipes-core/systemd/systemd_225.bb           |  3 +
 meta/recipes-devtools/perl/perl_5.22.0.bb          |  4 +-
 .../sysprof/files/gui-argument.patch               | 35 +++++++++++
 meta/recipes-kernel/sysprof/sysprof_git.bb         |  9 ++-
 10 files changed, 174 insertions(+), 17 deletions(-)
 create mode 100644 meta/recipes-connectivity/bluez5/bluez5/init
 create mode 100755 meta/recipes-core/psplash/files/psplash-quit.service
 create mode 100755 meta/recipes-core/psplash/files/psplash-start.service
 create mode 100644 meta/recipes-kernel/sysprof/files/gui-argument.patch
Signature · 1 line
2.2.1
#1 lore raw

PATCH 1/7 image_types: improve wks path specification

From: Christopher Larson <[email protected]>

Hardcoding a full input path with zero flexibility goes against everything the Yocto Project is about. Rework it to let the user specify the wks base filename with WKS_FILE and it'll search the layers for the wks file and use it.

---
 meta/classes/image_types.bbclass | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)
meta/classes/image_types.bbclass +15 -7
index 5036919..431df3a 100644
@@ -170,15 +170,23 @@ IMAGE_CMD_ubi () {
 
 IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs ${MKUBIFS_ARGS}"
 
+WKS_FILE ?= "${FILE_DIRNAME}/${IMAGE_BASENAME}.${MACHINE}.wks"
+WKS_FULL_PATH = "${@bb.utils.which('${WKS_SEARCH_PATH}', '${WKS_FILE}') if not os.path.isabs('${WKS_FILE}') else '${WKS_FILE}'}"
+WKS_FULL_PATH[vardepvalue] = "${WKS_FULL_PATH}"
+WKS_SEARCH_PATH ?= "${@':'.join('%s/scripts/lib/wic/canned-wks' % l for l in '${BBLAYERS}'.split())}"
+
 IMAGE_CMD_wic () {
-	out=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}
-	wks=${FILE_DIRNAME}/${IMAGE_BASENAME}.${MACHINE}.wks
-	[ -e $wks ] || wks=${FILE_DIRNAME}/${IMAGE_BASENAME}.wks
-	[ -e $wks ] || bbfatal "Kiskstart file $wks doesn't exist"
-	BUILDDIR=${TOPDIR} wic create $wks --vars ${STAGING_DIR_TARGET}/imgdata/ -e ${IMAGE_BASENAME} -o $out/
-	mv $out/build/${IMAGE_BASENAME}*.direct $out.rootfs.wic
-	rm -rf $out/
+	out="${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}"
+	wks="${WKS_FULL_PATH}"
+	if [ ! -e "$wks" ]; then
+		bbfatal "Kickstart file $wks doesn't exist"
+	fi
+
+	BUILDDIR="${TOPDIR}" wic create "$wks" --vars "${STAGING_DIR_TARGET}/imgdata/" -e "${IMAGE_BASENAME}" -o "$out/"
+	mv "$out/build/$(basename "${wks%.wks}")"*.direct "$out.rootfs.wic"
+	rm -rf "$out/"
 }
+IMAGE_CMD_wic[file-checksums] += "${WKS_FULLPATH}"
 
 EXTRA_IMAGECMD = ""
 
Signature · 1 line
2.2.1
#2 lore raw

PATCH 2/7 sysprof: use packageconfig for the gui

From: Christopher Larson <[email protected]>

This makes the gtk dependencies optional.

---
 .../sysprof/files/gui-argument.patch               | 35 ++++++++++++++++++++++
 meta/recipes-kernel/sysprof/sysprof_git.bb         |  9 ++++--
 2 files changed, 41 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-kernel/sysprof/files/gui-argument.patch
meta/recipes-kernel/sysprof/files/gui-argument.patch new file +35 -0
new file mode 100644
index 0000000..d4744e3
@@ -0,0 +1,35 @@
+Add the ability to explicitly enable/diable GUI support
+
+Signed-off-by: Christopher Larson <[email protected]>
+Upstream-status: Pending
+
+--- git.orig/configure.ac
++++ git/configure.ac
+@@ -62,12 +62,24 @@ KMICRO=`uname -r | cut -d"." -f 3 | cut
+ # Pkgconfig dependencies
+ 
+ core_dep="glib-2.0 >= 2.6.0"
+-gui_dep="gtk+-2.0 > 2.6.0 gdk-pixbuf-2.0 pangoft2 libglade-2.0"
+ 
+ PKG_CHECK_MODULES(CORE_DEP, $core_dep, [], AC_MSG_ERROR([sysprof dependencies not satisfied]))
+ 
+-build_gui=yes
+-PKG_CHECK_MODULES(GUI_DEP, $gui_dep, [], build_gui=no)
++gui_dep="gtk+-2.0 > 2.6.0 gdk-pixbuf-2.0 pangoft2 libglade-2.0"
++
++AC_ARG_ENABLE([gui],
++  [AS_HELP_STRING([--disable-gui],
++    [Disable GUI functionality (requires gtk+, gdk-pixbuf, pangoft2, libglade) @<:@default=auto@:>@])],
++  [],
++  [enable_gui=auto])
++
++build_gui=no
++AS_IF([test "x$enable_gui" != xno],
++  [PKG_CHECK_MODULES(GUI_DEP, $gui_dep, build_gui=yes,
++    [if test "x$enable_gui" != xauto; then
++       AC_MSG_FAILURE(
++         [--enable-gui was given, but gui dependencies were not satisfied])
++     fi])])
+ 
+ AM_CONDITIONAL([BUILD_GUI], [test "$build_gui" = yes])
+ 
meta/recipes-kernel/sysprof/sysprof_git.bb +6 -3
index 7d87efe..d331a23 100644
@@ -2,13 +2,14 @@ SUMMARY = "System-wide Performance Profiler for Linux"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
 
-DEPENDS = "gtk+ libglade"
+DEPENDS = "glib-2.0"
 
 SRCREV = "cd44ee6644c3641507fb53b8a2a69137f2971219"
 PV = "1.2.0+git${SRCPV}"
 
 SRC_URI = "git://git.gnome.org/sysprof \
            file://define-NT_GNU_BUILD_ID.patch \
+           file://gui-argument.patch \
           "
 
 SRC_URI_append_arm  = " file://rmb-arm.patch"
@@ -19,8 +20,10 @@ SRC_URI_append_mips64n32 = " file://rmb-mips.patch"
 
 S = "${WORKDIR}/git"
 
-inherit autotools pkgconfig distro_features_check
-ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
+inherit autotools pkgconfig
+
+PACKAGECONFIG ?= "${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK2DISTROFEATURES}', 'gui', '', d)}"
+PACKAGECONFIG[gui] = "--enable-gui,--disable-gui,gtk+ libglade"
 
 # We do not yet work for aarch64.
 #
Signature · 1 line
2.2.1
#4 lore raw

PATCH 3/7 sysprof: add missing gdk-pixbuf/pango deps

In reply to Christopher Larson

From: Christopher Larson <[email protected]>

These are explicitly checked with pkg-config in the configure script.

---
 meta/recipes-kernel/sysprof/sysprof_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-kernel/sysprof/sysprof_git.bb +1 -1
index d331a23..84c6aad 100644
@@ -23,7 +23,7 @@ S = "${WORKDIR}/git"
 inherit autotools pkgconfig
 
 PACKAGECONFIG ?= "${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK2DISTROFEATURES}', 'gui', '', d)}"
-PACKAGECONFIG[gui] = "--enable-gui,--disable-gui,gtk+ libglade"
+PACKAGECONFIG[gui] = "--enable-gui,--disable-gui,gtk+ gdk-pixbuf pango libglade"
 
 # We do not yet work for aarch64.
 #
Signature · 1 line
2.2.1
#5 lore raw

PATCH 4/7 systemd: for valgrind, define VALGRIND=1

In reply to Christopher Larson

From: Christopher Larson <[email protected]>

Per the systemd README, this should be defined to run systemd under valgrind, otherwise false positives will be triggered.

---
 meta/recipes-core/systemd/systemd_225.bb | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-core/systemd/systemd_225.bb +3 -0
index 18c2448..08696e7 100644
@@ -127,6 +127,9 @@ EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
 # uclibc does not have NSS
 EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname "
 
+# per the systemd README, define VALGRIND=1 to run under valgrind
+CFLAGS .= "${@base_contains('PACKAGECONFIG', 'valgrind$', ' -DVALGRIND=1', '', d)}"
+
 # disable problematic GCC 5.2 optimizations [YOCTO #8291]
 FULL_OPTIMIZATION_append_arm = " -fno-schedule-insns -fno-schedule-insns2"
 
Signature · 1 line
2.2.1
#6 lore raw

PATCH 5/7 bluez5: enable sysvinit support

In reply to Christopher Larson

From: Christopher Larson <[email protected]>

This is from Shrikant Bobade <[email protected]>.

---
 meta/recipes-connectivity/bluez5/bluez5.inc  |  8 +++-
 meta/recipes-connectivity/bluez5/bluez5/init | 68 ++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-connectivity/bluez5/bluez5/init
meta/recipes-connectivity/bluez5/bluez5.inc +7 -1
index df42c88..13fd600 100644
@@ -18,10 +18,11 @@ PACKAGECONFIG[experimental] = "--enable-experimental,--disable-experimental,"
 
 SRC_URI = "\
     ${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
+    file://init \
 "
 S = "${WORKDIR}/bluez-${PV}"
 
-inherit autotools-brokensep pkgconfig systemd
+inherit autotools-brokensep pkgconfig systemd update-rc.d
 
 EXTRA_OECONF = "\
   --enable-tools \
@@ -42,6 +43,9 @@ NOINST_TOOLS = " \
 "
 
 do_install_append() {
+	install -d ${D}${INIT_D_DIR}
+	install -m 0755 ${WORKDIR}/init ${D}${INIT_D_DIR}/bluetooth
+
 	install -d ${D}${sysconfdir}/bluetooth/
 	if [ -f ${S}/profiles/audio/audio.conf ]; then
 	    install -m 0644 ${S}/profiles/audio/audio.conf ${D}/${sysconfdir}/bluetooth/
@@ -100,5 +104,7 @@ FILES_${PN}-dbg += "\
 RDEPENDS_${PN}-testtools += "python python-dbus python-pygobject"
 
 SYSTEMD_SERVICE_${PN} = "bluetooth.service"
+INITSCRIPT_PACKAGES = "${PN}"
+INITSCRIPT_NAME_${PN} = "bluetooth"
 
 EXCLUDE_FROM_WORLD = "1"
meta/recipes-connectivity/bluez5/bluez5/init new file +68 -0

68 lines not on this page · raw message

Signature · 1 line
2.2.1
#7 lore raw

PATCH 6/7 psplash: add systemd support

In reply to Christopher Larson

From: Christopher Larson <[email protected]>

---
 meta/recipes-core/psplash/files/psplash-quit.service | 11 +++++++++++
 .../recipes-core/psplash/files/psplash-start.service | 11 +++++++++++
 meta/recipes-core/psplash/psplash_git.bb             | 20 +++++++++++++++-----
 3 files changed, 37 insertions(+), 5 deletions(-)
 create mode 100755 meta/recipes-core/psplash/files/psplash-quit.service
 create mode 100755 meta/recipes-core/psplash/files/psplash-start.service
meta/recipes-core/psplash/files/psplash-quit.service new file +11 -0
new file mode 100755
index 0000000..14bd499
@@ -0,0 +1,11 @@
+[Unit]
+Description=Terminate Psplash Boot Screen
+After=psplash-start.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/psplash-write QUIT
+TimeoutSec=20
+
+[Install]
+WantedBy=multi-user.target
meta/recipes-core/psplash/files/psplash-start.service new file +11 -0
new file mode 100755
index 0000000..502b150
@@ -0,0 +1,11 @@
+[Unit]
+Description=Starts Psplash Boot screen
+Wants=systemd-vconsole-setup.service
+After=systemd-vconsole-setup.service systemd-udev-trigger.service systemd-udevd.service
+DefaultDependencies=no
+
+[Service]
+ExecStart=/usr/bin/psplash
+
+[Install]
+WantedBy=sysinit.target
meta/recipes-core/psplash/psplash_git.bb +15 -5
index b3b6479..acf294f 100644
@@ -12,6 +12,8 @@ PR = "r15"
 SRC_URI = "git://git.yoctoproject.org/${BPN} \
            file://0001-psplash-fb-Convert-psplash_fb_plot_pixel-to-a-static.patch \
            file://psplash-init \
+           file://psplash-start.service \
+           file://psplash-quit.service \
            ${SPLASH_IMAGES}"
 
 SPLASH_IMAGES = "file://psplash-poky-img.h;outsuffix=default"
@@ -66,11 +68,13 @@ python __anonymous() {
 
 S = "${WORKDIR}/git"
 
-inherit autotools pkgconfig update-rc.d update-alternatives
+inherit autotools pkgconfig update-rc.d update-alternatives systemd
 
 ALTERNATIVE_PRIORITY = "100"
 ALTERNATIVE_LINK_NAME[psplash] = "${bindir}/psplash"
 
+SYSTEMD_SERVICE_${PN} = "psplash-start.service psplash-quit.service"
+
 python do_compile () {
     import shutil
 
@@ -97,8 +101,15 @@ python do_compile () {
 
 do_install_append() {
 	install -d ${D}/mnt/.psplash/
-	install -d ${D}${sysconfdir}/init.d/
-	install -m 0755 ${WORKDIR}/psplash-init ${D}${sysconfdir}/init.d/psplash.sh
+	if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+		install -d ${D}${sysconfdir}/init.d/
+		install -m 0755 ${WORKDIR}/psplash-init ${D}${sysconfdir}/init.d/psplash.sh
+	fi
+	if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+		install -d ${D}${systemd_unitdir}/system
+		install -m 0644 ${WORKDIR}/psplash-quit.service ${D}${systemd_unitdir}/system
+		install -m 0644 ${WORKDIR}/psplash-start.service ${D}${systemd_unitdir}/system
+	fi
 	install -d ${D}${bindir}
 	for i in ${SPLASH_INSTALL} ; do
 		install -m 0755 $i ${D}${bindir}/$i
@@ -111,9 +122,8 @@ FILES_${PN} += "/mnt/.psplash"
 INITSCRIPT_NAME = "psplash.sh"
 INITSCRIPT_PARAMS = "start 0 S . stop 20 0 1 6 ."
 
-DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
 pkg_postinst_${PN} () {
-	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+	if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
 		if [ -n "$D" ]; then
 			OPTS="--root=$D"
 		fi
Signature · 1 line
2.2.1
#8 lore raw

PATCH 7/7 nativesdk-perl: set PERL5LIB based on wrapper path

In reply to Christopher Larson

From: Christopher Larson <[email protected]>

Rather than relying on OECORE_NATIVE_SYSROOT, we can operate relative to the wrapper binary location.

---
 meta/recipes-devtools/perl/perl_5.22.0.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-devtools/perl/perl_5.22.0.bb +3 -1
index 9df8d04..ea0677a 100644
@@ -244,9 +244,11 @@ do_install() {
         ln -s Config_heavy.pl ${D}${libdir}/perl/${PV}/Config_heavy-target.pl
 }
 
+REL_PERLLIB = "${@os.path.relpath('${libdir}', '${bindir}')}/perl"
+
 do_install_append_class-nativesdk () {
         create_wrapper ${D}${bindir}/perl \
-            PERL5LIB='$PERL5LIB:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/site_perl/${PV}:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/vendor_perl/${PV}:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/${PV}'
+            PERL5LIB='$PERL5LIB:`dirname $realpath`/${REL_PERLLIB}/site_perl/${PV}:`dirname $realpath`/${REL_PERLLIB}/vendor_perl/${PV}:`dirname $realpath`/${REL_PERLLIB}/${PV}'
 }
 
 PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess"
Signature · 1 line
2.2.1
#10 lore raw

Re: [PATCH 1/7] image_types: improve wks path specification

In reply to Christopher Larson
Quoted 48 lines · Christopher Larson

From: Christopher Larson <[email protected]>

Hardcoding a full input path with zero flexibility goes against everything the
Yocto Project is about. Rework it to let the user specify the wks base filename with WKS_FILE and it'll search the layers for the wks file and use it.

---
 meta/classes/image_types.bbclass | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)
meta/classes/image_types.bbclass +0 -0
index 5036919..431df3a 100644
@@ -170,15 +170,23 @@ IMAGE_CMD_ubi () {
 
 IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o

${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs ${MKUBIFS_ARGS}"

meta/classes/image_types.bbclass +2 -0
+WKS_FILE ?= "${FILE_DIRNAME}/${IMAGE_BASENAME}.${MACHINE}.wks"
+WKS_FULL_PATH = "${@bb.utils.which('${WKS_SEARCH_PATH}', '${WKS_FILE}')

if not os.path.isabs('${WKS_FILE}') else '${WKS_FILE}'}"

meta/classes/image_types.bbclass +2 -0
+WKS_FULL_PATH[vardepvalue] = "${WKS_FULL_PATH}"
+WKS_SEARCH_PATH ?= "${@':'.join('%s/scripts/lib/wic/canned-wks' % l for l

in '${BBLAYERS}'.split())}"

meta/classes/image_types.bbclass +1 -5
+
 IMAGE_CMD_wic () {
-       out=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}
-       wks=${FILE_DIRNAME}/${IMAGE_BASENAME}.${MACHINE}.wks
-       [ -e $wks ] || wks=${FILE_DIRNAME}/${IMAGE_BASENAME}.wks
-       [ -e $wks ] || bbfatal "Kiskstart file $wks doesn't exist"
-       BUILDDIR=${TOPDIR} wic create $wks --vars

${STAGING_DIR_TARGET}/imgdata/ -e ${IMAGE_BASENAME} -o $out/

meta/classes/image_types.bbclass +7 -2
-       mv $out/build/${IMAGE_BASENAME}*.direct $out.rootfs.wic
-       rm -rf $out/
+       out="${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}"
+       wks="${WKS_FULL_PATH}"
+       if [ ! -e "$wks" ]; then
+               bbfatal "Kickstart file $wks doesn't exist"
+       fi
+
+       BUILDDIR="${TOPDIR}" wic create "$wks" --vars

"${STAGING_DIR_TARGET}/imgdata/" -e "${IMAGE_BASENAME}" -o "$out/"

meta/classes/image_types.bbclass IMAGE_CMD_ubi () { · line 189

Quoted 4 lines
meta/classes/image_types.bbclass +3 -0
+       mv "$out/build/$(basename "${wks%.wks}")"*.direct "$out.rootfs.wic"
+       rm -rf "$out/"
 }
+IMAGE_CMD_wic[file-checksums] += "${WKS_FULLPATH}"

Gah, I'll have to fix this and re-submit if needed, the varname is typoed, missing _. Also, it might be worth excluding WKS_FULL_PATH from vardeps entirely -- having to rerun the image build if a layer is moved isn't ideal, and we already have it in file-checksums.

Signature · 5 lines
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
#3 lore raw

Re: [PATCH 2/7] sysprof: use packageconfig for the gui

In reply to Christopher Larson
Quoted 20 lines · Christopher Larson

From: Christopher Larson <[email protected]>

This makes the gtk dependencies optional.

---
 .../sysprof/files/gui-argument.patch               | 35
++++++++++++++++++++++
 meta/recipes-kernel/sysprof/sysprof_git.bb         |  9 ++++--
 2 files changed, 41 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-kernel/sysprof/files/gui-argument.patch
meta/recipes-kernel/sysprof/files/gui-argument.patch new file +0 -0
new file mode 100644
index 0000000..d4744e3

meta/recipes-kernel/sysprof/files/gui-argument.patch line 1

Quoted 1 line
meta/recipes-kernel/sysprof/files/gui-argument.patch new file +1 -0
@@ -0,0 +1,35 @@
+Add the ability to explicitly enable/diable GUI support

And there's a typo in this patch description. Hrmph.

Signature · 5 lines
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
#9 lore raw

Re: [PATCH 7/7] nativesdk-perl: set PERL5LIB based on wrapper path

In reply to Christopher Larson
Quoted 26 lines · Christopher Larson

From: Christopher Larson <[email protected]>

Rather than relying on OECORE_NATIVE_SYSROOT, we can operate relative to the
wrapper binary location.

---
 meta/recipes-devtools/perl/perl_5.22.0.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-devtools/perl/perl_5.22.0.bb +0 -0
index 9df8d04..ea0677a 100644
@@ -244,9 +244,11 @@ do_install() {
         ln -s Config_heavy.pl

${D}${libdir}/perl/${PV}/Config_heavy-target.pl
}

meta/recipes-devtools/perl/perl_5.22.0.bb +2 -1
+REL_PERLLIB = "${@os.path.relpath('${libdir}', '${bindir}')}/perl"
+
 do_install_append_class-nativesdk () {
         create_wrapper ${D}${bindir}/perl \
-
Quoted 6 lines

PERL5LIB='$PERL5LIB:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/site_perl/${PV}:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/vendor_perl/${PV}:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/${PV}'
+ PERL5LIB='$PERL5LIB:`dirname
$realpath/${REL_PERLLIB}/site_perl/${PV}:dirname
$realpath/${REL_PERLLIB}/vendor_perl/${PV}:dirname
$realpath`/${REL_PERLLIB}/${PV}'

Hmm, perhaps create_wrapper should be altered to provide the binary dirname as a variable so we can easily reference it, avoiding the need to repeatedly dirname here.

Signature · 5 lines
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
#11 lore raw

Re: [PATCH 1/7] image_types: improve wks path specification

In reply to Christopher Larson

On Thu, Nov 12, 2015 at 4:46 PM, Christopher Larson <[email protected]

Quoted 18 lines

wrote:

Quoted 11 lines · Christopher Larson

From: Christopher Larson <[email protected]>

Hardcoding a full input path with zero flexibility goes against everything the
Yocto Project is about. Rework it to let the user specify the wks base filename with WKS_FILE and it'll search the layers for the wks file and use
it.

I'm reworking this. v2 series forthcoming.

Signature · 5 lines
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics