RDS: Resolved getting checksum issue. 23/20323/1
authordonghyuk.yang <donghyuk.yang@samsung.com>
Fri, 2 May 2014 04:14:23 +0000 (13:14 +0900)
committerdonghyuk.yang <donghyuk.yang@samsung.com>
Fri, 2 May 2014 04:14:23 +0000 (13:14 +0900)
If filename contains whitespace, IDE can not get checksum for it. Fixed
the problem.

Change-Id: Ibad3c4756270840c38f7a59aa0e6a34c87da2051
Signed-off-by: donghyuk.yang <donghyuk.yang@samsung.com>
org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkg/commander/rpm/RpmCommanderRootstrap.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/rds/RpmRapidDeployer.java

index 7ff4cbf..f8fab1b 100644 (file)
@@ -167,7 +167,7 @@ public class RpmCommanderRootstrap extends RpmCommanderCommon {
         IPath pathOnRootstrap = new Path(dstPath);
         IPath toFilePath = rootPath.append(pathOnRootstrap);
         String passwd = SudoPasswdManager.getSudoPassword();
-        String command = String.format("echo %s | sudo -S cp %s %s", passwd, srcPath,
+        String command = String.format("echo %s | sudo -S cp \"%s\" \"%s\"", passwd, srcPath,
                 toFilePath.toString());
         ICommandStatus status = RootstrapCommandLauncher.execute(command, null, rec, null);
         if (!status.isOk()) {
index 784c57c..e11dca4 100644 (file)
@@ -55,9 +55,9 @@ public class RpmRapidDeployer {
         StringBuffer sbCheckFiles = new StringBuffer();
         for (String file : sourceChecksums.keySet()) {
             // key = <package filename>_<checksum>/<filepath>
-            sbCheckFiles.append("\"");
+            sbCheckFiles.append("\'");
             sbCheckFiles.append(new Path(file).removeFirstSegments(1).toOSString());
-            sbCheckFiles.append("\" ");
+            sbCheckFiles.append("\' ");
         }
         String needCheckFiles = sbCheckFiles.toString().trim();
         Map<String, String> targetChecksums = getTargetChecksumMap(needCheckFiles);
@@ -261,9 +261,6 @@ public class RpmRapidDeployer {
                 } else {
                     remainList.add(key);
                 }
-                // if targetChecksums contains source key, remove the key from targetChecksums.
-                // it is for removing unused files on device later.
-                targetChecksums.remove(target_key);
             } else {
                 // if targetChecksums does not contains source key, it should be copied.
                 if (!key.equals("-")) {
@@ -271,10 +268,6 @@ public class RpmRapidDeployer {
                 }
             }
         }
-        // if targetChecksums has keys, it should be removed.
-        for (String key : targetChecksums.keySet()) {
-            removeList.add(key);
-        }
         return sbCopyFiles.toString().trim();
     }