Merge remote-tracking branch 'rsa/tizen_2.2' into tizen
[platform/framework/web/wrt-commons.git] / packaging / wrt-commons.spec
index f958838..e8ae047 100644 (file)
@@ -1,6 +1,6 @@
 Name:       wrt-commons
 Summary:    Wrt common library
-Version:    0.2.153
+Version:    0.2.157
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0
@@ -79,29 +79,32 @@ mkdir -p /opt/share/widget/exec
 mkdir -p /opt/share/widget/data/Public
 mkdir -p %{_libdir}/wrt-plugins
 
-if [ -z ${2} ]; then
-    echo "This is new install of wrt-commons"
-    echo "Calling /usr/bin/wrt_commons_create_clean_db.sh"
-    /usr/bin/wrt_commons_create_clean_db.sh
-else
-    # Find out old and new version of databases
-    WRT_OLD_DB_VERSION=`sqlite3 /opt/dbspace/.wrt.db ".tables" | grep "DB_VERSION_"`
-    WRT_NEW_DB_VERSION=`cat /usr/share/wrt-engine/wrt_db.sql | tr '[:blank:]' '\n' | grep DB_VERSION_`
-    echo "OLD wrt database version ${WRT_OLD_DB_VERSION}"
-    echo "NEW wrt database version ${WRT_NEW_DB_VERSION}"
-
-    if [ ${WRT_OLD_DB_VERSION} -a ${WRT_NEW_DB_VERSION} ]
-    then
-        if [ ${WRT_NEW_DB_VERSION} = ${WRT_OLD_DB_VERSION} ]
+#Don't reset DB when install on QEMU (during other packages building witch GBS)
+if [ -z "$EMULATOR_ARCHS" ]; then
+    if [ -z ${2} ]; then
+        echo "This is new install of wrt-commons"
+        echo "Calling /usr/bin/wrt_commons_reset_db.sh"
+        /usr/bin/wrt_commons_reset_db.sh
+    else
+        # Find out old and new version of databases
+        WRT_OLD_DB_VERSION=`sqlite3 /opt/dbspace/.wrt.db ".tables" | grep "DB_VERSION_"`
+        WRT_NEW_DB_VERSION=`cat /usr/share/wrt-engine/wrt_db.sql | tr '[:blank:]' '\n' | grep DB_VERSION_`
+        echo "OLD wrt database version ${WRT_OLD_DB_VERSION}"
+        echo "NEW wrt database version ${WRT_NEW_DB_VERSION}"
+
+        if [ ${WRT_OLD_DB_VERSION} -a ${WRT_NEW_DB_VERSION} ]
         then
-            echo "Equal database detected so db installation ignored"
+            if [ ${WRT_NEW_DB_VERSION} = ${WRT_OLD_DB_VERSION} ]
+            then
+                echo "Equal database detected so db installation ignored"
+            else
+                echo "Calling /usr/bin/wrt_commons_reset_db.sh"
+                /usr/bin/wrt_commons_reset_db.sh
+            fi
         else
             echo "Calling /usr/bin/wrt_commons_reset_db.sh"
             /usr/bin/wrt_commons_reset_db.sh
         fi
-    else
-        echo "Calling /usr/bin/wrt_commons_reset_db.sh"
-        /usr/bin/wrt_commons_reset_db.sh
     fi
 fi