Skip to content

Commit

Permalink
Clear marketplace cache during upgrade
Browse files Browse the repository at this point in the history
Related to openhab/openhab-core#4019

Signed-off-by: Wouter Born <github@maindrain.net>
  • Loading branch information
wborn committed Jan 14, 2024
1 parent 6fabd65 commit 412dadf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion alpine/update
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,12 @@ do
fi
done < "${OPENHAB_HOME}/runtime/bin/userdata_sysfiles.lst"

# Clearing the cache and tmp folders is necessary for upgrade.
# Clearing the cache, marketplace and tmp folders is necessary for upgrade.
echo "Clearing cache..."
rm -rf "${OPENHAB_USERDATA:?}/cache"
if [ $(get_version_number "${oh_version}") -ge $(get_version_number "4.2.0") ]; then
rm -rf "${OPENHAB_USERDATA:?}/marketplace"
fi
rm -rf "${OPENHAB_USERDATA:?}/tmp"

# Perform version specific post-update commands
Expand Down
5 changes: 4 additions & 1 deletion debian/update
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,12 @@ do
fi
done < "${OPENHAB_HOME}/runtime/bin/userdata_sysfiles.lst"

# Clearing the cache and tmp folders is necessary for upgrade.
# Clearing the cache, marketplace and tmp folders is necessary for upgrade.
echo "Clearing cache..."
rm -rf "${OPENHAB_USERDATA:?}/cache"
if [ $(get_version_number "${oh_version}") -ge $(get_version_number "4.2.0") ]; then
rm -rf "${OPENHAB_USERDATA:?}/marketplace"
fi
rm -rf "${OPENHAB_USERDATA:?}/tmp"

# Perform version specific post-update commands
Expand Down

0 comments on commit 412dadf

Please sign in to comment.