modify for profiling tool installation
authorjaewon81.lim <jaewon81.lim@samsung.com>
Thu, 16 Jun 2011 09:27:49 +0000 (18:27 +0900)
committerjaewon81.lim <jaewon81.lim@samsung.com>
Thu, 16 Jun 2011 09:27:49 +0000 (18:27 +0900)
(mount root file system for installation,
delete routine of removing profiling tool)

org.eclipse.linuxtools.oprofile.launch.exe/src/com/samsung/linuxplatform/oprofile/launch/SLPOprofileLaunchDelegate.java
org.eclipse.linuxtools.valgrind.launch.exe/src/org/eclipse/linuxtools/valgrind/launch/SLPValgrindLaunchDelegate.java

index 2521278..b336ba4 100644 (file)
@@ -294,13 +294,13 @@ public class SLPOprofileLaunchDelegate extends SLPLaunchDelegate {
                        String result = session.run(command, null);
                        if(!result.contains("0"))
                                throw new Exception(Messages.getString("ProfileLaunch.FAIL_TO_INSTALL"), new Exception("command is " + command));
+                       monitor.worked(1);
 
-                       // remove old application
-                       command = PKG_TOOL_CMD + PKG_TOOL_REMOVE_OPTION + PACKAGE_NAME + CMD_RESULT_CHECK ;
+                       // remount file system
+                       command = "mount -o remount,rw /" + CMD_RESULT_CHECK;
                        result = session.run(command, null);
                        if(!result.contains("0"))
-                               throw new Exception(Messages.getString("ProfileLaunch.FAIL_TO_INSTALL"), new Exception("command is " + command));
-                       monitor.worked(1);
+                               throw new Exception(Messages.getString("ProfileLaunch.FAIL_TO_INSTALL"),        new Exception("command is " + command)); 
 
                        // install new application
                        command = PKG_TOOL_CMD + PKG_TOOL_INSTALL_OPTION + PACKAGE_FILENAME_ARM + CMD_RESULT_CHECK;
@@ -308,6 +308,10 @@ public class SLPOprofileLaunchDelegate extends SLPLaunchDelegate {
                        if(!result.contains("0"))
                                throw new Exception(Messages.getString("ProfileLaunch.FAIL_TO_INSTALL"), new Exception("command is " + command));
                        monitor.worked(1);
+                       
+                       // remount file system
+                       command = "mount -o remount,ro /" + CMD_RESULT_CHECK;
+                       result = session.run(command, null);
                } catch (Exception e) {
                        throw e;
                } finally {
index 2869a35..f956bb3 100644 (file)
@@ -327,14 +327,14 @@ public class SLPValgrindLaunchDelegate extends SLPLaunchDelegate {
                        if(!result.contains("0"))
                                newCoreException(Messages.getString("ProfileLaunch.FAIL_TO_INSTALL"), 
                                                new Exception("command is " + command));
-
-                       // remove old application
-                       command = PKG_TOOL_CMD + PKG_TOOL_REMOVE_OPTION + PACKAGE_NAME + CMD_RESULT_CHECK ;
+                       monitor.worked(1);
+                       
+                       // remount file system
+                       command = "mount -o remount,rw /" + CMD_RESULT_CHECK;
                        result = session.run(command, null);
                        if(!result.contains("0"))
                                newCoreException(Messages.getString("ProfileLaunch.FAIL_TO_INSTALL"), 
                                                new Exception("command is " + command)); 
-                       monitor.worked(1);
 
                        // install new application
                        command = PKG_TOOL_CMD + PKG_TOOL_INSTALL_OPTION + PACKAGE_FILENAME_ARM + CMD_RESULT_CHECK;
@@ -343,6 +343,10 @@ public class SLPValgrindLaunchDelegate extends SLPLaunchDelegate {
                                newCoreException(Messages.getString("ProfileLaunch.FAIL_TO_INSTALL"), 
                                                new Exception("command is " + command)); 
                        monitor.worked(1);
+
+                       // remount file system
+                       command = "mount -o remount,ro /" + CMD_RESULT_CHECK;
+                       result = session.run(command, null);
                } catch (CoreException e) {
                        throw e;
                } catch (Exception e) {