exit 1
fi
SDK_EXTENSIBLE="1"
+ if [ "$publish" = "1" ] ; then
+ EXTRA_TAR_OPTIONS="$EXTRA_TAR_OPTIONS --exclude=ext-sdk-prepare.py"
+ if [ "${SDK_EXT_TYPE}" = "minimal" ] ; then
+ EXTRA_TAR_OPTIONS="$EXTRA_TAR_OPTIONS --exclude=sstate-cache"
+ fi
+ fi
}
SDK_PRE_INSTALL_COMMAND_task-populate-sdk-ext = "${sdk_ext_preinst}"
DEFAULT_INSTALL_DIR="@SDKPATH@"
SUDO_EXEC=""
+EXTRA_TAR_OPTIONS=""
target_sdk_dir=""
answer=""
relocate=1
savescripts=0
verbose=0
-while getopts ":yd:nDRS" OPT; do
+publish=0
+while getopts ":yd:npDRS" OPT; do
case $OPT in
y)
answer="Y"
n)
prepare_buildsystem="no"
;;
+ p)
+ prepare_buildsystem="no"
+ publish=1
+ ;;
D)
verbose=1
;;
echo " -d <dir> Install the SDK to <dir>"
echo "======== Extensible SDK only options ============"
echo " -n Do not prepare the build system"
+ echo " -p Publish mode (implies -n)"
echo "======== Advanced DEBUGGING ONLY OPTIONS ========"
echo " -S Save relocation scripts"
echo " -R Do not relocate executables"
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 || exit 1
+tail -n +$payload_offset $0| $SUDO_EXEC tar xJ -C $target_sdk_dir --checkpoint=.2500 $EXTRA_TAR_OPTIONS || exit 1
echo "done"
printf "Setting it up..."
# Unpack the SDK
logger.info("Unpacking SDK")
- cleanupfiles = [dest_sdk, os.path.join(destdir, 'ext-sdk-prepare.py')]
if not is_remote:
- cmd = "sh %s -n -y -d %s" % (dest_sdk, destination)
+ cmd = "sh %s -p -y -d %s" % (dest_sdk, destination)
ret = subprocess.call(cmd, shell=True)
if ret == 0:
logger.info('Successfully unpacked %s to %s' % (dest_sdk, destination))
- for cleanupfile in cleanupfiles:
- os.remove(cleanupfile)
+ os.remove(dest_sdk)
else:
logger.error('Failed to unpack %s to %s' % (dest_sdk, destination))
return ret
else:
- cmd = "ssh %s 'sh %s -n -y -d %s && rm -f %s'" % (host, dest_sdk, destdir, ' '.join(cleanupfiles))
+ cmd = "ssh %s 'sh %s -p -y -d %s && rm -f %s'" % (host, dest_sdk, destdir, dest_sdk)
ret = subprocess.call(cmd, shell=True)
if ret == 0:
logger.info('Successfully unpacked %s to %s' % (dest_sdk, destdir))