Upgrade script 76/85976/1 accepted/tizen/common/20160830.150016 accepted/tizen/ivi/20160830.061312 accepted/tizen/mobile/20160830.061258 accepted/tizen/wearable/20160830.061305 submit/tizen/20160829.100638
authorSomin Kim <somin926.kim@samsung.com>
Tue, 30 Aug 2016 02:38:01 +0000 (11:38 +0900)
committerSomin Kim <somin926.kim@samsung.com>
Tue, 30 Aug 2016 04:31:22 +0000 (21:31 -0700)
Change-Id: I589c213e1fc689e3b7aa0635abdf4f85e8390637
Signed-off-by: Somin Kim <somin926.kim@samsung.com>
(cherry picked from commit 0a0f41d18eb310787d7a44e33b71b9b0839b7609)

packaging/context-service.spec
scripts/context-service_upgrade.sh [new file with mode: 0644]

index 5042358..b121007 100644 (file)
@@ -23,6 +23,8 @@ ExcludeArch: %{arm} aarch64 %ix86 x86_64
 %define SERVICE_UNIT_DIR %{_unitdir_user}
 %endif
 
+%define upgrade_script_path /usr/share/upgrade/scripts
+
 BuildRequires: cmake
 BuildRequires: pkgconfig(gmodule-2.0)
 BuildRequires: pkgconfig(vconf)
@@ -97,6 +99,8 @@ cp LICENSE %{buildroot}%{_datadir}/license/%{name}
 mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/session.d
 install -m 0644 packaging/org.tizen.context.conf %{buildroot}%{_sysconfdir}/dbus-1/session.d/
 %endif
+mkdir -p %{buildroot}%{upgrade_script_path}
+cp -f scripts/context-service_upgrade.sh %{buildroot}%{upgrade_script_path}
 
 %post
 mkdir -p %{SERVICE_UNIT_DIR}/default.target.wants
@@ -122,3 +126,5 @@ rm -f %{SERVICE_UNIT_DIR}/default.target.wants/context-service.service
 %{_bindir}/*
 %{SERVICE_UNIT_DIR}/context-service.service
 %{_datadir}/license/%{name}
+
+%{upgrade_script_path}/context-service_upgrade.sh
diff --git a/scripts/context-service_upgrade.sh b/scripts/context-service_upgrade.sh
new file mode 100644 (file)
index 0000000..26c028a
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+#------------------------------------------------#
+# context-service patch for upgrade (2.4 -> 3.0) #
+#------------------------------------------------#
+
+# Macro
+DB_DIR_24=/opt/usr/dbspace
+DB_CONTEXT_24=$DB_DIR_24/.context-service.db
+
+# Remomve DB
+rm $DB_CONTEXT_24
+rm $DB_CONTEXT_24-journal