Fixed hybrid web app update
authorSoyoung Kim <sy037.kim@samsung.com>
Thu, 13 Jun 2013 05:02:12 +0000 (14:02 +0900)
committerSoyoung Kim <sy037.kim@samsung.com>
Thu, 13 Jun 2013 05:06:00 +0000 (14:06 +0900)
[Issue#] N/A
[Problem] can't update hybrid web app.
[Cause] failed update manifest file.
[Solution] update manifest file.
[SCMRequest] N/A

Change-Id: I6f58c91a7171771b240c571f793f4565cded2a3b

src/jobs/widget_install/task_manifest_file.cpp

index 599358f..8a7e3f3 100755 (executable)
@@ -585,7 +585,6 @@ void TaskManifestFile::stepGenerateManifest()
 void TaskManifestFile::stepParseManifest()
 {
     int code = 0;
-
     char* updateTags[3] = {NULL, };
 
     if (!m_context.mode.removable) {
@@ -595,8 +594,9 @@ void TaskManifestFile::stepParseManifest()
 
     }
 
+    commitManifest();
+
     if (!m_context.isUpdateMode) {
-        commitManifest();
         code = pkgmgr_parser_parse_manifest_for_installation(
                 commit_manifest.c_str(), (updateTags[0] == NULL) ? NULL : updateTags);
 
@@ -605,18 +605,12 @@ void TaskManifestFile::stepParseManifest()
             ThrowMsg(Exceptions::ManifestInvalid, "Parser returncode: " << code);
         }
     } else {
-        if (m_context.widgetConfig.packagingType !=
-                PKG_TYPE_HYBRID_WEB_APP)
-        {
-            commitManifest();
-            code = pkgmgr_parser_parse_manifest_for_upgrade(
-                    commit_manifest.c_str(), (updateTags[0] == NULL) ? NULL : updateTags);
-
-            if (code != 0) {
-                LogError("Manifest parser error: " << code);
-                ThrowMsg(Exceptions::ManifestInvalid, "Parser returncode: " << code);
-            }
+        code = pkgmgr_parser_parse_manifest_for_upgrade(
+                commit_manifest.c_str(), (updateTags[0] == NULL) ? NULL : updateTags);
 
+        if (code != 0) {
+            LogError("Manifest parser error: " << code);
+            ThrowMsg(Exceptions::ManifestInvalid, "Parser returncode: " << code);
         }
     }