[Title] Fixed to check packaging type correctly
authordonghee.yang <donghee.yang@samsung.com>
Mon, 26 Mar 2012 15:22:24 +0000 (00:22 +0900)
committerdonghee.yang <donghee.yang@samsung.com>
Mon, 26 Mar 2012 15:22:24 +0000 (00:22 +0900)
org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/BuildPackageObjectAction.java

index 82edd59..8f6364e 100644 (file)
@@ -55,9 +55,15 @@ public class BuildPackageObjectAction implements IWorkbenchWindowActionDelegate,
                // get pkgType
                IManagedBuildInfo info = ManagedBuildManager.getBuildInfo( project ) ;
                IConfiguration defaultConfig = info.getDefaultConfiguration();
-               String targetID = PlatformConfigurationManager.getBuildTargetName( defaultConfig );
-               String toolchainID = SmartBuildInterface.getInstance().getToolchainIDFromTargetID(targetID);
-               if ( toolchainID.contains(".obs") ) { 
+               String toolchainType = "";
+               try {
+                       SmartBuildInterface sbi = SmartBuildInterface.getInstance();
+                       String targetID = PlatformConfigurationManager.getBuildTargetName( defaultConfig );
+                       toolchainType = sbi.getToolchainTypeFromToolchainID( sbi.getToolchainIDFromTargetID(targetID) );
+               } catch (SBIException e1) {
+               }
+               
+               if ( toolchainType.contains("tizen.obs") ) { 
                        pkgType = "RPM";
                } else {
                        pkgType = "DEB";