Skip to content

Commit

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

Signed-off-by: Wouter Born <[email protected]>
  • Loading branch information
wborn authored Jan 14, 2024
1 parent 6fabd65 commit 2e23512
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 2e23512

Please sign in to comment.