summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/populate_sdk_ext.bbclass6
-rw-r--r--meta/files/toolchain-shar-extract.sh11
-rwxr-xr-xscripts/oe-publish-sdk8
3 files changed, 18 insertions, 7 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index 5e2ebd7969..2bbd181208 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -365,6 +365,12 @@ sdk_ext_preinst() {
365 exit 1 365 exit 1
366 fi 366 fi
367 SDK_EXTENSIBLE="1" 367 SDK_EXTENSIBLE="1"
368 if [ "$publish" = "1" ] ; then
369 EXTRA_TAR_OPTIONS="$EXTRA_TAR_OPTIONS --exclude=ext-sdk-prepare.py"
370 if [ "${SDK_EXT_TYPE}" = "minimal" ] ; then
371 EXTRA_TAR_OPTIONS="$EXTRA_TAR_OPTIONS --exclude=sstate-cache"
372 fi
373 fi
368} 374}
369SDK_PRE_INSTALL_COMMAND_task-populate-sdk-ext = "${sdk_ext_preinst}" 375SDK_PRE_INSTALL_COMMAND_task-populate-sdk-ext = "${sdk_ext_preinst}"
370 376
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..."
diff --git a/scripts/oe-publish-sdk b/scripts/oe-publish-sdk
index 992de19955..e6cb7af861 100755
--- a/scripts/oe-publish-sdk
+++ b/scripts/oe-publish-sdk
@@ -94,19 +94,17 @@ def publish(args):
94 94
95 # Unpack the SDK 95 # Unpack the SDK
96 logger.info("Unpacking SDK") 96 logger.info("Unpacking SDK")
97 cleanupfiles = [dest_sdk, os.path.join(destdir, 'ext-sdk-prepare.py')]
98 if not is_remote: 97 if not is_remote:
99 cmd = "sh %s -n -y -d %s" % (dest_sdk, destination) 98 cmd = "sh %s -p -y -d %s" % (dest_sdk, destination)
100 ret = subprocess.call(cmd, shell=True) 99 ret = subprocess.call(cmd, shell=True)
101 if ret == 0: 100 if ret == 0:
102 logger.info('Successfully unpacked %s to %s' % (dest_sdk, destination)) 101 logger.info('Successfully unpacked %s to %s' % (dest_sdk, destination))
103 for cleanupfile in cleanupfiles: 102 os.remove(dest_sdk)
104 os.remove(cleanupfile)
105 else: 103 else:
106 logger.error('Failed to unpack %s to %s' % (dest_sdk, destination)) 104 logger.error('Failed to unpack %s to %s' % (dest_sdk, destination))
107 return ret 105 return ret
108 else: 106 else:
109 cmd = "ssh %s 'sh %s -n -y -d %s && rm -f %s'" % (host, dest_sdk, destdir, ' '.join(cleanupfiles)) 107 cmd = "ssh %s 'sh %s -p -y -d %s && rm -f %s'" % (host, dest_sdk, destdir, dest_sdk)
110 ret = subprocess.call(cmd, shell=True) 108 ret = subprocess.call(cmd, shell=True)
111 if ret == 0: 109 if ret == 0:
112 logger.info('Successfully unpacked %s to %s' % (dest_sdk, destdir)) 110 logger.info('Successfully unpacked %s to %s' % (dest_sdk, destdir))