Skip to content

Commit

Permalink
[flatpak] improvement: always considering 'system' as the installatio…
Browse files Browse the repository at this point in the history
…n level for the root user
  • Loading branch information
vinifmor committed Nov 30, 2021
1 parent f511121 commit 32a50be
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Expand Up @@ -33,7 +33,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- faster reading of installed applications (subprocess call replaced by Python call)

- Flatpak
- settings: not displaying the installation target option when bauh is launched by the root user
- settings: not displaying the installation target option when bauh is launched by the root user
- always considering **system** as the installation level for the root user

- Web
- the Electron builds cache directory has been moved to the environment directory `~/.local/share/bauh/web/env/electron`
Expand Down
8 changes: 5 additions & 3 deletions bauh/gems/flatpak/controller.py
Expand Up @@ -375,9 +375,11 @@ def _make_exports_dir(self, watcher: ProcessWatcher) -> bool:
return True

def install(self, pkg: FlatpakApplication, root_password: str, disk_loader: DiskCacheLoader, watcher: ProcessWatcher) -> TransactionResult:
flatpak_config = self.configman.get_config()

install_level = flatpak_config['installation_level']
if not self.context.root_user:
flatpak_config = self.configman.get_config()
install_level = flatpak_config['installation_level']
else:
install_level = 'system'

if install_level is not None:
self.logger.info("Default Flaptak installation level defined: {}".format(install_level))
Expand Down

0 comments on commit 32a50be

Please sign in to comment.