From: Krzysztof Jackiewicz Date: Tue, 27 Mar 2018 09:37:24 +0000 (+0200) Subject: Recreate the link to tastore during rpm update X-Git-Tag: submit/tizen/20180412.092951~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=30352414e81a7600303edfe9f86e3854ab99b5f5;p=platform%2Fcore%2Fsecurity%2Ftef-simulator.git Recreate the link to tastore during rpm update 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 --- diff --git a/packaging/tef-simulator.spec b/packaging/tef-simulator.spec index ce39efe..d9cdf79 100644 --- a/packaging/tef-simulator.spec +++ b/packaging/tef-simulator.spec @@ -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