]> code.ossystems Code Review - openembedded-core.git/commitdiff
oe-publish-sdk: prevent specifying a directory for the SDK argument
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Thu, 31 Mar 2016 08:53:32 +0000 (21:53 +1300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 31 Mar 2016 12:18:12 +0000 (13:18 +0100)
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 <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/oe-publish-sdk

index 2b6e9bc21c31d356f525164331dea05ff164470a..992de1995547cebdedfe525c843a771dd529d4a6 100755 (executable)
@@ -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: