[fix][flatpak] updating application dependencies during updating and downgrading

This commit is contained in:
Vinícius Moreira
2020-01-13 16:05:43 -03:00
parent 4a26381c04
commit b76294b075
3 changed files with 4 additions and 6 deletions

View File

@@ -28,6 +28,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Fixes
- missing categories i18n [#48](https://github.com/vinifmor/bauh/issues/48)
- Flatpak:
- updating application dependencies during updating and downgrading
- Web:
- not handling HTTP connection issues
- not passing the Home path as a String ( an exception happens for Python 3.5 )

View File

@@ -287,10 +287,6 @@ class FlatpakManager(SoftwareManager):
watcher.print("Operation cancelled")
return False
if pkg.installation == 'user':
if not handler.handle_simple(flatpak.register_flathub('user')):
return False
res = handler.handle(SystemProcess(subproc=flatpak.install(str(pkg.id), pkg.origin, pkg.installation), wrong_error_phrase='Warning'))
if res:

View File

@@ -148,7 +148,7 @@ def update(app_ref: str, installation: str):
:param app_ref:
:return:
"""
return new_subprocess([BASE_CMD, 'update', '--no-related', '-y', app_ref, '--{}'.format(installation)])
return new_subprocess([BASE_CMD, 'update', '--no-related', '--no-deps', '-y', app_ref, '--{}'.format(installation)])
def register_flathub(installation: str) -> SimpleProcess:
@@ -221,7 +221,7 @@ def read_updates(version: str, installation: str) -> Dict[str, set]:
def downgrade(app_ref: str, commit: str, installation: str, root_password: str) -> subprocess.Popen:
cmd = [BASE_CMD, 'update', '--no-related', '--commit={}'.format(commit), app_ref, '-y', '--{}'.format(installation)]
cmd = [BASE_CMD, 'update', '--no-related', '--no-deps', '--commit={}'.format(commit), app_ref, '-y', '--{}'.format(installation)]
if installation == 'system':
return new_root_subprocess(cmd, root_password)