From 76e8f19b75af8a3cc278b308b0b1fbefb3a15dcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Wed, 5 Dec 2018 17:04:06 +0100 Subject: [PATCH] instant-remote-debug.bbclass: restucture code for better readabilty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Müller --- classes/instant-remote-debug.bbclass | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/classes/instant-remote-debug.bbclass b/classes/instant-remote-debug.bbclass index 6f7dcd1..12896e5 100644 --- a/classes/instant-remote-debug.bbclass +++ b/classes/instant-remote-debug.bbclass @@ -64,19 +64,8 @@ INSTANT_REMOTE_PATH = "${TMPDIR}/sysroot-instant-remote-${MACHINE}" addtask copysourcestosysroot before do_packagedata after do_package do_copysourcestosysroot() { - # ---------- link source code files ---------- - # remove old + # remove old source code / files in old manifest rm -rf ${INSTANT_REMOTE_PATH}/usr/src/debug/${PN} - # add new - if [ -d ${WORKDIR}/package/usr/src/debug/${PN} ] ; then - mkdir -p ${INSTANT_REMOTE_PATH}/usr/src/debug/${PN} - cd ${WORKDIR}/package/usr/src/debug/${PN} - find . -print0 | cpio --null -pdlu ${INSTANT_REMOTE_PATH}/usr/src/debug/${PN} - fi - - # ---------- names of binaries and debuginfo -> manifest ---------- - mkdir -p ${INSTANT_REMOTE_PATH}/manifests - # remove old if [ -f ${INSTANT_REMOTE_PATH}/manifests/${PN} ] ; then # remove old files from sysroot for file in `cat ${INSTANT_REMOTE_PATH}/manifests/${PN}` ; do @@ -85,6 +74,16 @@ do_copysourcestosysroot() { # remove old manifest rm ${INSTANT_REMOTE_PATH}/manifests/${PN} fi + + # ---------- link source code files ---------- + if [ -d ${WORKDIR}/package/usr/src/debug/${PN} ] ; then + mkdir -p ${INSTANT_REMOTE_PATH}/usr/src/debug/${PN} + cd ${WORKDIR}/package/usr/src/debug/${PN} + find . -print0 | cpio --null -pdlu ${INSTANT_REMOTE_PATH}/usr/src/debug/${PN} + fi + + # ---------- names of binaries and debuginfo -> manifest ---------- + mkdir -p ${INSTANT_REMOTE_PATH}/manifests # get path to library-link once only if [ "${PN}" = "glibc-locale" ] ; then PACK_SPLIT_LIB_LINK_SEARCH_PATH=`find ${WORKDIR}/packages-split -mindepth 1 -maxdepth 1 -type d ! -name '*-dbg' ! -name '*-dev' ! -name '*-staticdev' ! -name '*-doc' ! -name 'glibc*-localedata-*' ! -name 'glibc-charmap-*' ! -name 'locale-base-*'` @@ -97,6 +96,7 @@ do_copysourcestosysroot() { # add new for pkgdbg in `find ${WORKDIR}/packages-split -mindepth 1 -maxdepth 1 -type d -name '*-dbg'` ; do debug_binaries= + # Note: hardcoding is used in package.bbclass either (search for PACKAGE_DEBUG_SPLIT_STYLE) if [ "${PACKAGE_DEBUG_SPLIT_STYLE}" = "debug-file-directory" ] ; then if [ -d $pkgdbg/usr/lib/debug ] ; then debug_binaries=`find $pkgdbg/usr/lib/debug -name '*.debug'` @@ -131,7 +131,7 @@ do_copysourcestosysroot() { done done - # ---------- link binaries and debuginfo from manifest ---------- + # ---------- link to files in package folder from manifest ---------- if [ -f ${INSTANT_REMOTE_PATH}/manifests/${PN} ] ; then cd ${WORKDIR}/package for file in `cat ${INSTANT_REMOTE_PATH}/manifests/${PN}` ; do