summaryrefslogtreecommitdiffstats
path: root/meta/files
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-03-31 21:53:33 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-31 23:01:37 +0100
commit2aec71e028a0ea0df64ddcd35402c8753b721226 (patch)
tree0ca7b30b3126949d59b7f8dec2592a0fb7ef31cb /meta/files
parent8ef70163fc88128f2490f11bb1c28fa80b04cfb1 (diff)
downloadpoky-2aec71e028a0ea0df64ddcd35402c8753b721226.tar.gz
oe-publish-sdk: exclude sstate-cache if publishing minimal SDK
If SDK_EXT_TYPE is set to "minimal" then the SDK won't contain many sstate artifacts, and you're required to set up an sstate mirror in this case anyway so there's no point publishing the "stub" sstate-cache directory from within the SDK since it won't be useful for update purposes and may be confused with the real sstate-cache. There is however a possibility that people might publish the real sstate-cache directory under the same output directory provided to oe-publish-sdk, thus deleting it after extracting (as we were doing with other files we wanted to clean up at the end) would be problematic, besides which extracting it and then deleting it is wasteful. Thus, introduce a "-p" command line option to the SDK installer that we can use to tell tar not to extract the items we don't want when publishing. This has the added benefit of mostly keeping references to these in the place they belong i.e. in populate_sdk_ext.bbclass. (From OE-Core rev: 774b85d42db1d81936d4e4af4f6fb2c57cb51d2c) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/files')
-rw-r--r--meta/files/toolchain-shar-extract.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/meta/files/toolchain-shar-extract.sh b/meta/files/toolchain-shar-extract.sh
index 0295bded6e..23a86dd52f 100644
--- a/meta/files/toolchain-shar-extract.sh
+++ b/meta/files/toolchain-shar-extract.sh
@@ -38,12 +38,14 @@ fi
38 38
39DEFAULT_INSTALL_DIR="@SDKPATH@" 39DEFAULT_INSTALL_DIR="@SDKPATH@"
40SUDO_EXEC="" 40SUDO_EXEC=""
41EXTRA_TAR_OPTIONS=""
41target_sdk_dir="" 42target_sdk_dir=""
42answer="" 43answer=""
43relocate=1 44relocate=1
44savescripts=0 45savescripts=0
45verbose=0 46verbose=0
46while getopts ":yd:nDRS" OPT; do 47publish=0
48while getopts ":yd:npDRS" OPT; do
47 case $OPT in 49 case $OPT in
48 y) 50 y)
49 answer="Y" 51 answer="Y"
@@ -54,6 +56,10 @@ while getopts ":yd:nDRS" OPT; do
54 n) 56 n)
55 prepare_buildsystem="no" 57 prepare_buildsystem="no"
56 ;; 58 ;;
59 p)
60 prepare_buildsystem="no"
61 publish=1
62 ;;
57 D) 63 D)
58 verbose=1 64 verbose=1
59 ;; 65 ;;
@@ -70,6 +76,7 @@ while getopts ":yd:nDRS" OPT; do
70 echo " -d <dir> Install the SDK to <dir>" 76 echo " -d <dir> Install the SDK to <dir>"
71 echo "======== Extensible SDK only options ============" 77 echo "======== Extensible SDK only options ============"
72 echo " -n Do not prepare the build system" 78 echo " -n Do not prepare the build system"
79 echo " -p Publish mode (implies -n)"
73 echo "======== Advanced DEBUGGING ONLY OPTIONS ========" 80 echo "======== Advanced DEBUGGING ONLY OPTIONS ========"
74 echo " -S Save relocation scripts" 81 echo " -S Save relocation scripts"
75 echo " -R Do not relocate executables" 82 echo " -R Do not relocate executables"
@@ -181,7 +188,7 @@ fi
181payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1)) 188payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1))
182 189
183printf "Extracting SDK..." 190printf "Extracting SDK..."
184tail -n +$payload_offset $0| $SUDO_EXEC tar xJ -C $target_sdk_dir --checkpoint=.2500 || exit 1 191tail -n +$payload_offset $0| $SUDO_EXEC tar xJ -C $target_sdk_dir --checkpoint=.2500 $EXTRA_TAR_OPTIONS || exit 1
185echo "done" 192echo "done"
186 193
187printf "Setting it up..." 194printf "Setting it up..."