[fix][flatpak] not able to update partials for Flatpak < 1.5

This commit is contained in:
Vinícius Moreira
2020-01-30 16:05:57 -03:00
parent da64ed4fc3
commit 9885aa151b
3 changed files with 23 additions and 3 deletions

View File

@@ -149,13 +149,21 @@ def list_installed(version: str) -> List[dict]:
return apps
def update(app_ref: str, installation: str):
def update(app_ref: str, installation: str, related: bool = False, deps: bool = False):
"""
Updates the app reference
:param app_ref:
:return:
"""
return new_subprocess(['flatpak', 'update', '--no-related', '--no-deps', '-y', app_ref, '--{}'.format(installation)])
cmd = ['flatpak', 'update', '-y', app_ref, '--{}'.format(installation)]
if not related:
cmd.append('--no-related')
if not deps:
cmd.append('--no-deps')
return new_subprocess(cmd)
def uninstall(app_ref: str, installation: str):