[Release] wrt-installer_0.1.97 submit/tizen_2.2/20130709.134555
authorJihoon Chung <jihoon.chung@samsaung.com>
Tue, 9 Jul 2013 13:45:23 +0000 (22:45 +0900)
committerJihoon Chung <jihoon.chung@samsaung.com>
Tue, 9 Jul 2013 13:45:23 +0000 (22:45 +0900)
Change-Id: Ia456042fbb6c702ee69c70561eba4638081add4c

etc/CMakeLists.txt
etc/default_icon_tizen.png [deleted file]
packaging/wrt-installer.spec
src/jobs/widget_install/job_widget_install.cpp
tests/general/PluginsInstallation.cpp

index 372dcbe..14f19c6 100644 (file)
@@ -1,5 +1,4 @@
 SET(ETC_DIR ${PROJECT_SOURCE_DIR}/etc)
 
 INSTALL(PROGRAMS ${ETC_DIR}/wrt_preinstall_widgets.sh DESTINATION /usr/bin/)
-INSTALL(FILES ${ETC_DIR}/default_icon_tizen.png DESTINATION share/wrt-engine/)
 
diff --git a/etc/default_icon_tizen.png b/etc/default_icon_tizen.png
deleted file mode 100644 (file)
index 1c3ecd6..0000000
Binary files a/etc/default_icon_tizen.png and /dev/null differ
index e69a5e1..6a6c8b4 100644 (file)
@@ -1,7 +1,7 @@
 #git:framework/web/wrt-installer
 Name:       wrt-installer
 Summary:    Installer for tizen Webruntime
-Version:    0.1.95
+Version:    0.1.97
 Release:    1
 Group:      Development/Libraries
 License:    Apache License, Version 2.0
@@ -87,7 +87,16 @@ rm -rf %{buildroot}
 chmod +s /usr/bin/wrt-installer
 
 #symlink for package manager
-ln -sf /usr/bin/wrt-installer /usr/etc/package-manager/backend/wgt
+%define pkg_manager_backend_path "/usr/etc/package-manager/backend"
+ln -sf /usr/bin/wrt-installer %{pkg_manager_backend_path}/wgt
+ln -sf %{pkg_manager_backend_path}/wgt %{pkg_manager_backend_path}/Wgt
+ln -sf %{pkg_manager_backend_path}/wgt %{pkg_manager_backend_path}/wGt
+ln -sf %{pkg_manager_backend_path}/wgt %{pkg_manager_backend_path}/wgT
+ln -sf %{pkg_manager_backend_path}/wgt %{pkg_manager_backend_path}/WGt
+ln -sf %{pkg_manager_backend_path}/wgt %{pkg_manager_backend_path}/wGT
+ln -sf %{pkg_manager_backend_path}/wgt %{pkg_manager_backend_path}/WgT
+ln -sf %{pkg_manager_backend_path}/wgt %{pkg_manager_backend_path}/WGT
+
 
 #for booting recovery
 mkdir -p /opt/share/widget/temp_info
@@ -110,4 +119,3 @@ mkdir -p /opt/share/icons/default/small
     %attr(755,root,root) %{_bindir}/wrt-installer-tests-*
     /opt/share/widget/tests/installer/widgets/*
 %endif
-%{_datadir}/wrt-engine/default_icon_tizen.png
index 4bbfe02..70cca13 100644 (file)
@@ -325,6 +325,16 @@ ConfigureResult JobWidgetInstall::prepareInstallation(
         LogError("Failed to localize config.xml");
         result = ConfigureResult::Failed_InvalidConfig;
     }
+    Catch(Exceptions::WidgetConfigFileInvalid)
+    {
+        LogError("Invalid configuration file");
+        result = ConfigureResult::Failed_InvalidConfig;
+    }
+    Catch(DPL::Exception)
+    {
+        LogError("Unknown exception");
+        result = ConfigureResult::Failed;
+    }
 
     return result;
 }
@@ -903,43 +913,39 @@ WrtDB::PackagingType JobWidgetInstall::checkPackageType(
 void JobWidgetInstall::setApplicationType(
     const WrtDB::ConfigParserData &configInfo)
 {
+    AppType widgetAppType = APP_TYPE_UNKNOWN;
     FOREACH(iterator, configInfo.nameSpaces) {
         LogInfo("namespace = [" << *iterator << "]");
-        AppType currentAppType = APP_TYPE_UNKNOWN;
 
-        if (*iterator == ConfigurationNamespace::W3CWidgetNamespaceName) {
-            continue;
+        if (*iterator == ConfigurationNamespace::TizenWebAppNamespaceName) {
+            if (widgetAppType != APP_TYPE_UNKNOWN &&
+                widgetAppType != APP_TYPE_TIZENWEBAPP)
+            {
+                LogError("To many namespaces declared in configuration fileA.");
+                ThrowMsg(Exceptions::WidgetConfigFileInvalid,
+                         "Config.xml has more than one valid namespace");
+            }
+            widgetAppType = APP_TYPE_TIZENWEBAPP;
         } else if (
             *iterator ==
             ConfigurationNamespace::WacWidgetNamespaceNameForLinkElement ||
             *iterator ==
             ConfigurationNamespace::WacWidgetNamespaceName)
         {
-            currentAppType = APP_TYPE_WAC20;
-        } else if (*iterator ==
-                   ConfigurationNamespace::TizenWebAppNamespaceName)
-        {
-            currentAppType = APP_TYPE_TIZENWEBAPP;
-        }
-
-        if (m_installerContext.widgetConfig.webAppType ==
-            APP_TYPE_UNKNOWN)
-        {
-            m_installerContext.widgetConfig.webAppType = currentAppType;
-        } else if (m_installerContext.widgetConfig.webAppType ==
-                   currentAppType)
-        {
-            continue;
+            if (widgetAppType != APP_TYPE_UNKNOWN &&
+                widgetAppType != APP_TYPE_WAC20)
+            {
+                LogError("To many namespaces declared in configuration fileB.");
+                ThrowMsg(Exceptions::WidgetConfigFileInvalid,
+                         "Config.xml has more than one valid namespace");
+            }
+            widgetAppType = APP_TYPE_WAC20;
         } else {
-            ThrowMsg(Exceptions::WidgetConfigFileInvalid,
-                     "Config.xml has more than one namespace");
+            LogDebug("Namespace ignored.");
         }
     }
 
-    // If there is no define, type set to WAC 2.0
-    if (m_installerContext.widgetConfig.webAppType == APP_TYPE_UNKNOWN) {
-        m_installerContext.widgetConfig.webAppType = APP_TYPE_WAC20;
-    }
+    m_installerContext.widgetConfig.webAppType = widgetAppType;
 
     LogInfo("type = [" <<
             m_installerContext.widgetConfig.webAppType.getApptypeToString() <<
index a1133f6..3a03ad8 100644 (file)
 #include <dpl/test/test_runner.h>
 #include <dpl/log/log.h>
 #include <dpl/wrt-dao-ro/plugin_dao_read_only.h>
+#include <dpl/static_block.h>
 
 ////////////////////////////////////////////////////////////////////////////////
 
 RUNNER_TEST_GROUP_INIT(PluginsInstallation)
 
+STATIC_BLOCK
+{
+    (void)system("wrt_reset_all.sh");
+    (void)system("wrt-installer -p");
+}
+
 #define MAKE_PLUGIN_CHECK_TESTCASE(TESTCASE, LIBNAME)                                                                                               \
     RUNNER_TEST(PluginsInstallation_##TESTCASE)                                                                                                     \
     {                                                                                                                                               \
@@ -36,7 +43,7 @@ RUNNER_TEST_GROUP_INIT(PluginsInstallation)
         WrtDB::PluginDAOReadOnly pdao(#LIBNAME);                                                                                                    \
         RUNNER_ASSERT_MSG(pdao.getInstallationStatus() == WrtDB::PluginDAOReadOnly::INSTALLATION_COMPLETED, "Plugin is not installed correctly");   \
         } Catch(DPL::Exception) {                                                                                                                   \
-            LogError(_rethrown_exception.DumpToString());                                                                                                          \
+            LogError(_rethrown_exception.DumpToString());                                                                                           \
             RUNNER_ASSERT_MSG(false, "DPL::Exception");                                                                                             \
         }                                                                                                                                           \
     }                                                                                                                                               \