Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/modules/client/bootenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,8 @@ def activate_live_be():
release_notes=self.img.imageplan.pd.release_notes_name
)

self.img.close_databases()

if be.beUnmount(self.be_name_clone) != 0:
logger.error(
_(
Expand Down
12 changes: 12 additions & 0 deletions src/modules/client/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -4058,6 +4058,18 @@ def gen_tracked_stems(self):
if a.name == "depend" and a.attrs["type"] == "group":
yield (f, self.strtofmri(a.attrs["fmri"]).pkg_name)

def close_databases(self):
"""Close any open connections to the image's sqlite databases"""

if self.__actioncache is not None:
self.__actioncache.close()
self.__actioncache = None
for cat in self.__catalogs.values():
close = getattr(cat, "close", None)
if close is not None:
close()
self.__catalogs = {}

def get_action_cache(self, progtrack=None):
"""Return an ActionCache open for reading and consistent with
the installed package catalog, creating or updating the
Expand Down
Loading