Skip to content

Commit

Permalink
chore: update charm libraries (#35)
Browse files Browse the repository at this point in the history
Co-authored-by: Github Actions <[email protected]>
  • Loading branch information
maas-lander and Github Actions authored Apr 17, 2024
1 parent 34a23c2 commit f7388fb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion maas-agent/lib/charms/operator_libs_linux/v2/snap.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@

# Increment this PATCH version before using `charmcraft publish-lib` or reset
# to 0 if you are raising the major API version
LIBPATCH = 4
LIBPATCH = 5


# Regex to locate 7-bit C1 ANSI sequences
Expand Down Expand Up @@ -580,10 +580,17 @@ def ensure(
# We are installing or refreshing a snap.
if self._state not in (SnapState.Present, SnapState.Latest):
# The snap is not installed, so we install it.
logger.info(
"Installing snap %s, revision %s, tracking %s", self._name, revision, channel
)
self._install(channel, cohort, revision)
else:
# The snap is installed, but we are changing it (e.g., switching channels).
logger.info(
"Refreshing snap %s, revision %s, tracking %s", self._name, revision, channel
)
self._refresh(channel=channel, cohort=cohort, revision=revision, devmode=devmode)
logger.info("The snap installation completed successfully")

self._update_snap_apps()
self._state = state
Expand Down

0 comments on commit f7388fb

Please sign in to comment.