Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: "Robert Berger" <oecore.mailinglist@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: richard.leitner@skidata.com,
	Robert Berger <robert.berger@ReliableEmbeddedSystems.com>
Subject: [meta-java][PATCH v2] do_unpack_extract_submodules: WORKDIR and ARCHIVER_WORKDIR support
Date: Fri,  8 May 2020 12:50:56 +0300	[thread overview]
Message-ID: <20200508095056.15810-1-robert.berger@ReliableEmbeddedSystems.com> (raw)

Signed-off-by: Robert Berger <robert.berger@ReliableEmbeddedSystems.com>
---
 recipes-core/openjdk/openjdk-8-common.inc | 26 +++++++++++++++++------
 1 file changed, 19 insertions(+), 7 deletions(-)

diff --git a/recipes-core/openjdk/openjdk-8-common.inc b/recipes-core/openjdk/openjdk-8-common.inc
index 5ea83ed..2166147 100644
--- a/recipes-core/openjdk/openjdk-8-common.inc
+++ b/recipes-core/openjdk/openjdk-8-common.inc
@@ -32,14 +32,26 @@ do_configure_prepend () {
 
 do_unpack_extract_submodules () {
     cd "${S}"
+
+    # default WORKDIR - __NOT__ called from archiver.bbclass:do_unpack_and_patch
+    # WORKDIR is __NOT_ modified:
+    SUBMOD_WORKDIR="${WORKDIR}"
+
+    # "special" WORKDIR - called from archiver.bbclass:do_unpack_and_patch
+    # archiver.bbclass set's WORKDIR to ARCHIVER_WORKDIR:
+    if [ "$WORKDIR" == "$ARCHIVER_WORKDIR" ]; then
+       SUBMOD_WORKDIR="${ARCHIVER_WORKDIR}/.."
+    fi
+
     # tar --transform
-    tar xjf ${WORKDIR}/${CORBA_FILE_LOCAL} --transform "s,-${CORBA_CHANGESET},,g"
-    tar xjf ${WORKDIR}/${HOTSPOT_FILE_LOCAL} --transform "s,-${HOTSPOT_CHANGESET},,g"
-    tar xjf ${WORKDIR}/${JAXP_FILE_LOCAL} --transform "s,-${JAXP_CHANGESET},,g"
-    tar xjf ${WORKDIR}/${JAXWS_FILE_LOCAL} --transform "s,-${JAXWS_CHANGESET},,g"
-    tar xjf ${WORKDIR}/${JDK_FILE_LOCAL} --transform "s,-${JDK_CHANGESET},,g"
-    tar xjf ${WORKDIR}/${LANGTOOLS_FILE_LOCAL} --transform "s,-${LANGTOOLS_CHANGESET},,g"
-    tar xjf ${WORKDIR}/${NASHORN_FILE_LOCAL} --transform "s,-${NASHORN_CHANGESET},,g"
+    tar xjf ${SUBMOD_WORKDIR}/${CORBA_FILE_LOCAL} --transform "s,-${CORBA_CHANGESET},,g"
+    tar xjf ${SUBMOD_WORKDIR}/${HOTSPOT_FILE_LOCAL} --transform "s,-${HOTSPOT_CHANGESET},,g"
+    tar xjf ${SUBMOD_WORKDIR}/${JAXP_FILE_LOCAL} --transform "s,-${JAXP_CHANGESET},,g"
+    tar xjf ${SUBMOD_WORKDIR}/${JAXWS_FILE_LOCAL} --transform "s,-${JAXWS_CHANGESET},,g"
+    tar xjf ${SUBMOD_WORKDIR}/${JDK_FILE_LOCAL} --transform "s,-${JDK_CHANGESET},,g"
+    tar xjf ${SUBMOD_WORKDIR}/${LANGTOOLS_FILE_LOCAL} --transform "s,-${LANGTOOLS_CHANGESET},,g"
+    tar xjf ${SUBMOD_WORKDIR}/${NASHORN_FILE_LOCAL} --transform "s,-${NASHORN_CHANGESET},,g"
 }
 
 do_unpack_delete_X11_wrappers() {
-- 
2.17.1


             reply	other threads:[~2020-05-08  9:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-08  9:50 Robert Berger [this message]
2020-05-08 10:19 ` [oe] [meta-java][PATCH v2] do_unpack_extract_submodules: WORKDIR and ARCHIVER_WORKDIR support Robert Berger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200508095056.15810-1-robert.berger@ReliableEmbeddedSystems.com \
    --to=oecore.mailinglist@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    --cc=richard.leitner@skidata.com \
    --cc=robert.berger@ReliableEmbeddedSystems.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox