From: Paul Eggleton Date: Thu, 31 Mar 2016 08:53:32 +0000 (+1300) Subject: oe-publish-sdk: prevent specifying a directory for the SDK argument X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~26317 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce71f5c2fb8a7b473988da30bbb9bec95e8a6f5e;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git oe-publish-sdk: prevent specifying a directory for the SDK argument The SDK argument is expected to be an installer .sh file; if a directory is specified we can get an ugly failure later on; best to check up front. Fixes [YOCTO #9065]. Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- diff --git a/scripts/oe-publish-sdk b/scripts/oe-publish-sdk index 2b6e9bc21c3..992de199554 100755 --- a/scripts/oe-publish-sdk +++ b/scripts/oe-publish-sdk @@ -50,7 +50,10 @@ def publish(args): # Ensure the SDK exists if not os.path.exists(target_sdk): - logger.error("%s doesn't exist" % target_sdk) + logger.error("Specified SDK %s doesn't exist" % target_sdk) + return -1 + if os.path.isdir(target_sdk): + logger.error("%s is a directory - expected path to SDK installer file" % target_sdk) return -1 if ':' in destination: