From: Slawomir Pajak Date: Tue, 1 Oct 2013 11:29:19 +0000 (+0200) Subject: Remove unnecessary steps for QEMU installation X-Git-Tag: submit/tizen_2.2/20131011.084301^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=329760ab13e886e5aed8f33412873a04d92c53f6;p=platform%2Fframework%2Fweb%2Fwrt-commons.git Remove unnecessary steps for QEMU installation [Issue#] LINUXWRT-971 [Problem] Message "pkill: command not found" when building WRT [Cause] wrt.db is reset and created during wrt installation (on QEMU) [Solution] Remove steps connected to wrt.db from installation when QEMU detected. Detection is based on existence of EMULATOR_ARCHS value [Verification] Build WRT repository and check if warning is not present Change-Id: I00bba27c95c87f2b31668a90a7262ca42c9bf2af --- diff --git a/packaging/wrt-commons.spec b/packaging/wrt-commons.spec index 0d50eb9..7570967 100644 --- a/packaging/wrt-commons.spec +++ b/packaging/wrt-commons.spec @@ -81,29 +81,32 @@ mkdir -p /opt/share/widget/exec mkdir -p /opt/share/widget/data/Public mkdir -p /usr/lib/wrt-plugins -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 - 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