Tizen 2.4.0 rev3 SDK Public Release tizen_2.4
authorjk7744.park <jk7744.park@samsung.com>
Wed, 24 Feb 2016 09:53:35 +0000 (18:53 +0900)
committerjk7744.park <jk7744.park@samsung.com>
Wed, 24 Feb 2016 09:53:35 +0000 (18:53 +0900)
packaging/wrt-installer.spec
src/jobs/widget_install/job_widget_install.cpp
src/jobs/widget_uninstall/task_remove_files.cpp

index f31b58c..736c5da 100755 (executable)
@@ -1,7 +1,7 @@
 #git:framework/web/wrt-installer
 Name:       wrt-installer
 Summary:    Installer for tizen Webruntime
-Version:    1.0.23
+Version:    1.0.21
 Release:    1
 Group:      Development/Libraries
 License:    Apache-2.0
index 7188b27..a43303b 100755 (executable)
@@ -62,7 +62,6 @@
 #include <widget_install/task_prelaunching_registration.h>
 #endif
 #include <widget_install_to_external.h>
-#include <boost/optional/optional_io.hpp>
 #include <boost/filesystem.hpp>
 #include <dpl/log/secure_log.h>
 
@@ -363,52 +362,30 @@ void JobWidgetInstall::displayWidgetInfo()
         std::ostringstream out;
         WidgetLocalizedInfo localizedInfo =
         W3CFileLocalization::getLocalizedInfo(dao.getTizenAppId());
-        WidgetSize size = dao.getPreferredSize();
-        DPL::OptionalString startFile =
-        W3CFileLocalization::getStartFile(dao.getTizenAppId());
 
         out << std::endl <<
         "===================================== INSTALLED WIDGET INFO =========" \
         "============================";
-        if (!!(localizedInfo.name))
-            out << std::endl << "Name:                        " << *(localizedInfo.name);
-        else
-            out << std::endl << "Name:                        " << "--";
-        out << std::endl << "AppId:                       " << dao.getTizenAppId();
+        out << std::endl << "Name:                        " << localizedInfo.name;
+    out << std::endl << "AppId:                     " << dao.getTizenAppId();
+        WidgetSize size = dao.getPreferredSize();
         out << std::endl << "Width:                       " << size.width;
         out << std::endl << "Height:                      " << size.height;
-        if (!!(startFile))
-            out << std::endl << "Start File:                  " << *(startFile);
-        else
-            out << std::endl << "Start File:                  " << "--";
-        if (!!(dao.getVersion()))
-            out << std::endl << "Version:                     " << *(dao.getVersion());
-        else
-            out << std::endl << "Version:                     " << "--";
-        if (!!(localizedInfo.license))
-            out << std::endl << "Licence:                     " << *(localizedInfo.license);
-        else
-            out << std::endl << "Licence:                     " << "--";
-        if (!!(localizedInfo.licenseHref))
-            out << std::endl << "Licence Href:                " << *(localizedInfo.licenseHref);
-        else
-            out << std::endl << "Licence Href:                " << "--";
-        if (!!(localizedInfo.description))
-            out << std::endl << "Description:                 " << *(localizedInfo.description);
-        else
-            out << std::endl << "Description:                 " << "--";
-        if (!!(dao.getGUID()))
-            out << std::endl << "Widget Id:                   " << *(dao.getGUID());
-        else
-            out << std::endl << "Widget Id:                   " << "--";
-
-        OptionalWidgetIcon icon = W3CFileLocalization::getIcon(dao.getTizenAppId());
+        out << std::endl << "Start File:                  " <<
+    W3CFileLocalization::getStartFile(dao.getTizenAppId());
+        out << std::endl << "Version:                     " << dao.getVersion();
+        out << std::endl << "Licence:                     " <<
+        localizedInfo.license;
+        out << std::endl << "Licence Href:                " <<
+        localizedInfo.licenseHref;
+        out << std::endl << "Description:                 " <<
+        localizedInfo.description;
+        out << std::endl << "Widget Id:                   " << dao.getGUID();
+
+    OptionalWidgetIcon icon = W3CFileLocalization::getIcon(dao.getTizenAppId());
         DPL::OptionalString iconSrc =
             !!icon ? icon->src : DPL::OptionalString();
-        if (!!(iconSrc))
-            out << std::endl << "Icon:                        " << *(iconSrc);
-        else
-            out << std::endl << "Icon:                        " << "--";
+        out << std::endl << "Icon:                        " << iconSrc;
 
         out << std::endl << "Preferences:";
         {
@@ -417,7 +394,7 @@ void JobWidgetInstall::displayWidgetInfo()
             {
                 out << std::endl << "  Key:                       " <<
                 it->key_name;
-                out << std::endl << "  Readonly:                  " <<
+                out << std::endl << "      Readonly:              " <<
                 it->readonly;
             }
         }
index 7294064..5f43af9 100755 (executable)
@@ -59,9 +59,6 @@ void TaskRemoveFiles::StepRemoveInstallationDirectory()
 {
     _D("StepRemoveInstallationDirectory started");
     Try {
-        // In some case, app2ext fail to uninstall(remove directory) because of mount issue.
-        bool removed = false;
-
         int ret = app2ext_get_app_location(m_context.tzPkgid.c_str());
 
         // app2ext remove /opt/usr/apps[pkdid] directory in post_uninstall() function.
@@ -71,7 +68,6 @@ void TaskRemoveFiles::StepRemoveInstallationDirectory()
                 WidgetInstallToExtSingleton::Instance().initialize(m_context.tzPkgid);
                 WidgetInstallToExtSingleton::Instance().uninstallation();
                 WidgetInstallToExtSingleton::Instance().deinitialize();
-                removed = true;
             }
             Catch(WidgetInstallToExt::Exception::ErrorInstallToExt)
             {
@@ -79,11 +75,9 @@ void TaskRemoveFiles::StepRemoveInstallationDirectory()
                 // i.e.) SD card isn't inserted or unmounted.
                 // This behavior is recommended by platform(app2sd maintainer).
                 _E("Fail to remove external directory");
+                ThrowMsg(Exceptions::RemoveFileFailure, "Cann't remove external directory");
             }
-        }
-
-        // If fail to remove directory in the app2ext retry remove directroy with below code.
-        if (!removed && APP2EXT_NOT_INSTALLED != ret) {
+        } else if (APP2EXT_NOT_INSTALLED != ret) {
             _D("Removing directory");
 
             std::string userAppsPath = WrtDB::GlobalConfig::GetUserInstalledWidgetPath();