From: Sangyoon Jang Date: Wed, 16 Sep 2020 07:07:24 +0000 (+0900) Subject: Remove incorrectly created shared data directory X-Git-Tag: accepted/tizen/6.0/unified/20201030.115918~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0335667170e6c140306a7d8567ef1fe88c340d74;p=platform%2Fcore%2Fappfw%2Fpkgmgr-tool.git Remove incorrectly created shared data directory /opt/usr/globalapps/{pkgid}/shared/data should not be exist. Change-Id: I72342fd32a3d5d972b51c80231351f8c27623253 Signed-off-by: Sangyoon Jang --- diff --git a/data/updates/upgrade_to_30005.sh.in b/data/updates/upgrade_to_30005.sh.in index 79d2d3a..287510f 100644 --- a/data/updates/upgrade_to_30005.sh.in +++ b/data/updates/upgrade_to_30005.sh.in @@ -154,8 +154,21 @@ function migrate_user_pkg_shareddata() { done } +# There are a bug when updating package, shared/data directories are created +# under /opt/usr/globalapps/{pkgid}. This causes smack denial error when +# uninstalling package after upgrade. +function remove_shareddata() { + echo "#remove shareddata" + for shared in `find $TZ_SYS_RW_APP -mindepth 2 -maxdepth 2 -name shared` + do + find $shared -mindepth 1 -maxdepth 1 -name data -exec rmdir {} \; + done +} + rm -f $DB_RESULT_FILE +remove_shareddata + migrate_skel_shared_dir create_user_shared_dir