Skip to content

Commit

Permalink
Guard against flatpak support in some recent changes.
Browse files Browse the repository at this point in the history
Fixes #423.
  • Loading branch information
mtwebster committed Jul 29, 2024
1 parent 9a292ee commit 0539c2d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions usr/lib/linuxmint/mintinstall/mintinstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -1453,7 +1453,7 @@ def load_banner(self):
name = name.replace("flatpak:", "")
pkginfo = self.installer.find_pkginfo(name, installer.PKG_TYPE_FLATPAK)

if not pkginfo.verified:
if pkginfo is None or not pkginfo.verified:
continue

is_flatpak = True
Expand Down Expand Up @@ -1634,7 +1634,7 @@ def load_featured(self):
if name.startswith("flatpak:"):
name = name.replace("flatpak:", "")
pkginfo = self.installer.find_pkginfo(name, installer.PKG_TYPE_FLATPAK)
if not pkginfo.verified:
if pkginfo is None or not pkginfo.verified:
continue
else:
pkginfo = self.installer.find_pkginfo(name, installer.PKG_TYPE_APT)
Expand Down Expand Up @@ -2387,8 +2387,11 @@ def finished_loading_packages(self):
return False

def get_installed_package_hashes(self):
installed_fp_refs = installer._flatpak.get_fp_sys().list_installed_refs(None)
fp_hashes = [installer._flatpak.make_pkg_hash(ref) for ref in installed_fp_refs]
if self.installer.have_flatpak:
installed_fp_refs = installer._flatpak.get_fp_sys().list_installed_refs(None)
fp_hashes = [installer._flatpak.make_pkg_hash(ref) for ref in installed_fp_refs]
else:
fp_hashes = []

apt_cache = installer._apt.get_apt_cache()
apt_hashes = [installer._apt.make_pkg_hash(pkg) for pkg in apt_cache if pkg.installed]
Expand Down

0 comments on commit 0539c2d

Please sign in to comment.