[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-core
Subject:    [OE-core] [PATCH 2/5] oe-publish-sdk: prevent specifying a directory for the SDK argument
From:       paul.eggleton () linux ! intel ! com (Paul Eggleton)
Date:       2016-03-31 8:53:32
Message-ID: c8342d13b35dae72579b3ba3f14b081266596a0e.1459414389.git.paul.eggleton () linux ! intel ! com
[Download RAW message or body]

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 at linux.intel.com>
---
 scripts/oe-publish-sdk | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/scripts/oe-publish-sdk b/scripts/oe-publish-sdk
index 1729a0d..cd912df 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:
-- 
2.5.5


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic