Recreate the link to tastore during rpm update 83/173983/2
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Tue, 27 Mar 2018 09:37:24 +0000 (11:37 +0200)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Tue, 27 Mar 2018 12:34:56 +0000 (12:34 +0000)
The link to tastore was only created during rpm installation. However, the path
to tastore has changed since the last release and the link should be recreated
during rpm update as well.

This commit makes the rpm update recreate the link so that it points to the
valid tastore directory.

Change-Id: I545461b058eb966e2c24a4f1752b241948e5134c

packaging/tef-simulator.spec

index ce39efe..d9cdf79 100644 (file)
@@ -111,10 +111,12 @@ if [ $1 -gt 1 ] ; then
 fi
 
 %post
+# do it always in case the path was changed
+rm -rf %{link_tastore_dir}
+mkdir -p `dirname %{link_tastore_dir}`
+ln -sf %{tastore_dir} %{link_tastore_dir}
+
 if [ $1 -eq 1 ] ; then
-    rm -rf %{link_tastore_dir}
-    mkdir -p `dirname %{link_tastore_dir}`
-    ln -sf %{tastore_dir} %{link_tastore_dir}
     tef-update.sh simulator
 fi