[Release] wrt-installer_0.0.97 by sync with master branch
authorTaejeong Lee <taejeong.lee@samsung.com>
Fri, 25 Jan 2013 13:56:15 +0000 (22:56 +0900)
committerTaejeong Lee <taejeong.lee@samsung.com>
Fri, 25 Jan 2013 13:56:15 +0000 (22:56 +0900)
Change-Id: I2c0fabbba3ea5544ff701ec42df101d351361e69

configuration/config.tizen.xsd
debian/changelog
etc/wrt_preinstall_widgets.sh
packaging/wrt-installer.spec
src/wrt-installer/plugin_utils.cpp

index 4bc46ea..8fc4c99 100755 (executable)
 
 <xs:element name="operation">
     <xs:complexType>
-        <xs:attribute name="name" use="required"/>
+        <xs:attribute name="name" type="tizen:appserviceOperationType" use="required"/>
     </xs:complexType>
 </xs:element>
 
     </xs:complexType>
 </xs:element>
 
-<xs:element name="box-label" type="xs:string"/>
+<xs:element name="box-label"> 
+    <xs:complexType mixed="true"> 
+    </xs:complexType> 
+</xs:element>
 
 <xs:element name="box-icon">
     <xs:complexType>
index 9027226..5d7a7de 100644 (file)
@@ -1,3 +1,31 @@
+wrt-installer (0.0.97) unstable; urgency=low
+
+  * Revert "Change pkgname to appid for docomo request."
+
+ -- Tae-Jeong Lee <taejeong.lee@samsung.com>  Fri, 25 Jan 2013 22:38:17 +0900
+
+wrt-installer (0.0.96) unstable; urgency=low
+
+  * Change pkgname to appid for docomo request. PART2
+
+  * Git : framework/web/wrt-installer
+  * Tag : wrt-installer_0.0.96
+
+ -- Soyoung Kim <sy037.kim@samsung.com>  Thu, 24 Jan 2013 21:14:47 +0900
+
+wrt-installer (0.0.95) unstable; urgency=low
+
+  * change schema type of livebox
+  * Patch for semaphore deadlock bug while plugins installation.
+  * Fixed preinstall for plugin
+  * Change pkgname to appid for docomo request. PART1
+  * Fixed app-control element type
+
+  * Git : framework/web/wrt-installer
+  * Tag : wrt-installer_0.0.95
+
+ -- Soyoung Kim <sy037.kim@samsung.com>  Thu, 24 Jan 2013 16:00:35 +0900
+
 wrt-installer (0.0.94) unstable; urgency=low
 
   * Modify app control element.
index 2d7b9d5..1837565 100755 (executable)
@@ -69,13 +69,13 @@ else
 fi
 }
 
+#Plugin installation is temporary code for window SDK
+/usr/bin/wrt-installer -p
+
 if [ ! -d $_working_dir ]; then
        echo "There is no preinstall widget directory - $_working_dir"
     restore_widget
        exit 1
 fi
 
-#Plugin installation is temporary code for window SDK
-/usr/bin/wrt-installer -p
-
 install_widgets
index a113ad7..8b80231 100644 (file)
@@ -1,7 +1,7 @@
-#git:framework/web/wrt-installer wrt-installer 0.0.94
+#git:framework/web/wrt-installer wrt-installer 0.0.97
 Name:       wrt-installer
 Summary:    Installer for tizen Webruntime
-Version:    0.0.94
+Version:    0.0.97
 Release:    1
 Group:      Development/Libraries
 License:    Apache License, Version 2.0
index ae29f5e..2b6bc3c 100644 (file)
  */
 
 #include "plugin_utils.h"
-#include <dpl/semaphore.h>
 #include <dpl/exception.h>
 #include <dpl/log/log.h>
 #include <dpl/wrt-dao-ro/global_config.h>
+#include <sys/file.h>
 
 using namespace WrtDB;
 
 namespace PluginUtils {
-const char PLUGIN_INSTALL_SEMAPHORE[] = "/.wrt_plugin_install_lock";
+const char* PLUGIN_INSTALL_LOCK_FILE = "/tmp/.wrt_plugin_install_lock";
 
-static DPL::Semaphore semaphore(PLUGIN_INSTALL_SEMAPHORE);
+static int s_plugin_install_lock_fd = -1;
 
 bool lockPluginInstallation()
 {
-    Try {
-        semaphore.Lock();
-        return true;
+    int ret = 0;
+
+    LogInfo("Try to lock for plugins installation.");
+
+    s_plugin_install_lock_fd =
+        open(PLUGIN_INSTALL_LOCK_FILE, O_RDONLY|O_CREAT, 0666);
+
+    if (s_plugin_install_lock_fd == -1)
+    {
+        LogError("Lock file open failed!");
+
+        return false;
     }
-    Catch(DPL::Semaphore::Exception::Base){
+
+    ret = flock(s_plugin_install_lock_fd, LOCK_EX); //lock with waiting
+
+    if (ret == -1)
+    {
+        LogError("Lock failed!");
+
+        close(s_plugin_install_lock_fd);
+        s_plugin_install_lock_fd = -1;
+
         return false;
     }
+
+    return true;
 }
 
 bool unlockPluginInstallation()
 {
-    Try {
-        semaphore.Unlock();
+    LogInfo("Unlock for plugins installation.");
+
+    if (s_plugin_install_lock_fd != -1)
+    {
+        int ret = 0;
+
+        ret = flock(s_plugin_install_lock_fd, LOCK_UN); //unlock
+
+        if (ret == -1)
+        {
+            LogError("Unlock failed!");
+        }
+
+        close(s_plugin_install_lock_fd);
+        s_plugin_install_lock_fd = -1;
+
         return true;
     }
-    Catch(DPL::Semaphore::Exception::Base){
-        return false;
+    else
+    {
+        LogError("Lock file was not created!");
     }
+
+    return false;
 }
 
 bool checkPluginInstallationRequired()