public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 08/10] toolchain-shar-extract.sh: add option to list contents
Date: Thu, 11 Aug 2016 16:45:05 +1200	[thread overview]
Message-ID: <dd68fce60392cd398c33a000c96e5b6dc518285b.1470890478.git.paul.eggleton@linux.intel.com> (raw)
In-Reply-To: <cover.1470890478.git.paul.eggleton@linux.intel.com>
In-Reply-To: <cover.1470890478.git.paul.eggleton@linux.intel.com>

Add a -l command-line option for SDK installers to get a list of files
that will be extracted by the SDK - internally this just runs "tar tv"
on the embedded tarball. This can be used to look at which files the SDK
provides without actually installing it. The initial user of this is the
extensible SDK build process which needs to know what binaries are going
to be installed by the buildtools installer without installing it.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/files/toolchain-shar-extract.sh | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/meta/files/toolchain-shar-extract.sh b/meta/files/toolchain-shar-extract.sh
index 9279310..4345104 100644
--- a/meta/files/toolchain-shar-extract.sh
+++ b/meta/files/toolchain-shar-extract.sh
@@ -47,7 +47,8 @@ relocate=1
 savescripts=0
 verbose=0
 publish=0
-while getopts ":yd:npDRS" OPT; do
+listcontents=0
+while getopts ":yd:npDRSl" OPT; do
 	case $OPT in
 	y)
 		answer="Y"
@@ -72,6 +73,9 @@ while getopts ":yd:npDRS" OPT; do
 	S)
 		savescripts=1
 		;;
+	l)
+		listcontents=1
+		;;
 	*)
 		echo "Usage: $(basename $0) [-y] [-d <dir>]"
 		echo "  -y         Automatic yes to all prompts"
@@ -83,11 +87,18 @@ while getopts ":yd:npDRS" OPT; do
 		echo "  -S         Save relocation scripts"
 		echo "  -R         Do not relocate executables"
 		echo "  -D         use set -x to see what is going on"
+		echo "  -l         list files that will be extracted"
 		exit 1
 		;;
 	esac
 done
 
+payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1))
+if [ "$listcontents" = "1" ] ; then
+    tail -n +$payload_offset $0| tar tvJ || exit 1
+    exit
+fi
+
 titlestr="@SDK_TITLE@ installer version @SDK_VERSION@"
 printf "%s\n" "$titlestr"
 printf "%${#titlestr}s\n" | tr " " "="
@@ -187,8 +198,6 @@ if [ ! -x $target_sdk_dir -o ! -w $target_sdk_dir -o ! -r $target_sdk_dir ]; the
 	$SUDO_EXEC mkdir -p $target_sdk_dir >/dev/null 2>&1
 fi
 
-payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1))
-
 printf "Extracting SDK..."
 tail -n +$payload_offset $0| $SUDO_EXEC tar xJ -C $target_sdk_dir --checkpoint=.2500 $EXTRA_TAR_OPTIONS || exit 1
 echo "done"
-- 
2.5.5



  parent reply	other threads:[~2016-08-11  4:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-11  4:44 [PATCH 00/10] Extensible SDK fixes Paul Eggleton
2016-08-11  4:44 ` [PATCH 01/10] gen-lockedsig-cache: ensure symlinks are dereferenced Paul Eggleton
2016-08-11  4:44 ` [PATCH 02/10] classes/populate_sdk_ext: ensure eSDK can build without uninative enabled Paul Eggleton
2016-08-11  4:45 ` [PATCH 03/10] classes/populate_sdk_ext: handle lack of uninative when filtering sstate Paul Eggleton
2016-08-11  4:45 ` [PATCH 04/10] classes/populate_sdk_ext: sstate filtering fixes Paul Eggleton
2016-08-11  4:45 ` [PATCH 05/10] lib/oe/copy_buildsystem: fix merging sstate directories for eSDK Paul Eggleton
2016-08-11  4:45 ` [PATCH 06/10] classes/populate_sdk_ext: properly handle buildtools install failure Paul Eggleton
2016-08-11  4:45 ` [PATCH 07/10] classes/populate_sdk_ext: properly determine buildtools filename Paul Eggleton
2016-08-11  4:45 ` Paul Eggleton [this message]
2016-08-11  4:45 ` [PATCH 09/10] classes/populate_sdk_ext: add some pre-install checks Paul Eggleton
2016-08-11 22:47   ` Paul Eggleton
2016-08-11  4:45 ` [PATCH 10/10] classes/populate_sdk_ext: drop duplicated error message Paul Eggleton

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=dd68fce60392cd398c33a000c96e5b6dc518285b.1470890478.git.paul.eggleton@linux.intel.com \
    --to=paul.eggleton@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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