From 58ed96f5b9d5065bd617faf5b55c8ac4a4a7dd96 Mon Sep 17 00:00:00 2001 From: Lucas Gameiro Borges Date: Mon, 15 Apr 2024 12:12:52 +0000 Subject: [PATCH] update operator_libs_linux library --- lib/charms/operator_libs_linux/v2/snap.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/charms/operator_libs_linux/v2/snap.py b/lib/charms/operator_libs_linux/v2/snap.py index 871ff5de2c..ef426775d8 100644 --- a/lib/charms/operator_libs_linux/v2/snap.py +++ b/lib/charms/operator_libs_linux/v2/snap.py @@ -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 @@ -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