diff --git a/CHANGELOG.md b/CHANGELOG.md
index bfa8a59d..f32ca33c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [0.10.1]
+### Features
+- Flatpak
+ - new custom action "Full update": fully updates all installed Flatpak apps and components (useful if you are having issues with runtime updates)
+
+
+
+
+
+
### Improvements
- General
- code refactoring
diff --git a/README.md b/README.md
index 9b554c81..bb1d78ba 100644
--- a/README.md
+++ b/README.md
@@ -313,6 +313,8 @@ prefer_repository_provider: true # when there is just one repository provider f
```
installation_level: null # defines a default installation level: "user" or "system". (null will display a popup asking the level)
```
+- Custom actions supported:
+ - **Full update**: it completely updates the Flatpak apps and components. Useful if you are having issues with runtime updates.
#### Snap
diff --git a/bauh/gems/flatpak/controller.py b/bauh/gems/flatpak/controller.py
index 7cda8b2e..eae5c8d5 100644
--- a/bauh/gems/flatpak/controller.py
+++ b/bauh/gems/flatpak/controller.py
@@ -15,7 +15,7 @@ from bauh.api.abstract.controller import SearchResult, SoftwareManager, Applicat
from bauh.api.abstract.disk import DiskCacheLoader
from bauh.api.abstract.handler import ProcessWatcher, TaskManager
from bauh.api.abstract.model import PackageHistory, PackageUpdate, SoftwarePackage, PackageSuggestion, \
- SuggestionPriority, PackageStatus
+ SuggestionPriority, PackageStatus, CustomSoftwareAction
from bauh.api.abstract.view import MessageType, FormComponent, SingleSelectComponent, InputOption, SelectViewType, \
ViewComponent, PanelComponent
from bauh.commons.boot import CreateConfigFile
@@ -46,6 +46,7 @@ class FlatpakManager(SoftwareManager):
self.suggestions_cache = context.cache_factory.new(None)
self.logger = context.logger
self.configman = FlatpakConfigManager()
+ self._action_full_update: Optional[CustomSoftwareAction] = None
def get_managed_types(self) -> Set["type"]:
return {FlatpakApplication}
@@ -734,3 +735,25 @@ class FlatpakManager(SoftwareManager):
self._write_ignored_updates(ignored_keys)
pkg.updates_ignored = False
+
+ def gen_custom_actions(self) -> Generator[CustomSoftwareAction, None, None]:
+ yield self.action_full_update
+
+ def full_update(self, root_password: Optional[str], watcher: ProcessWatcher) -> bool:
+ handler = ProcessHandler(watcher)
+ return handler.handle_simple(flatpak.full_update(flatpak.get_version()))[0]
+
+ @property
+ def action_full_update(self) -> CustomSoftwareAction:
+ if self._action_full_update is None:
+ self._action_full_update = CustomSoftwareAction(i18n_label_key='flatpak.action.full_update',
+ i18n_description_key='flatpak.action.full_update.description',
+ i18n_status_key='flatpak.action.full_update.status',
+ backup=True,
+ manager=self,
+ requires_internet=True,
+ icon_path=get_icon_path(),
+ manager_method='full_update',
+ requires_root=False)
+
+ return self._action_full_update
diff --git a/bauh/gems/flatpak/flatpak.py b/bauh/gems/flatpak/flatpak.py
index c8cbbc64..04e2d009 100755
--- a/bauh/gems/flatpak/flatpak.py
+++ b/bauh/gems/flatpak/flatpak.py
@@ -172,6 +172,11 @@ def update(app_ref: str, installation: str, version: Version, related: bool = Fa
lang=DEFAULT_LANG if version < VERSION_1_12 else None)
+def full_update(version: VERSION_1_12) -> SimpleProcess:
+ return SimpleProcess(cmd=('flatpak', 'update', '-y'), extra_paths={EXPORTS_PATH}, shell=True,
+ lang=DEFAULT_LANG if version < VERSION_1_12 else None)
+
+
def uninstall(app_ref: str, installation: str, version: Version) -> SimpleProcess:
return SimpleProcess(cmd=('flatpak', 'uninstall', app_ref, '-y', f'--{installation}'),
extra_paths={EXPORTS_PATH},
diff --git a/bauh/gems/flatpak/resources/locale/ca b/bauh/gems/flatpak/resources/locale/ca
index 41c10420..8a66e731 100644
--- a/bauh/gems/flatpak/resources/locale/ca
+++ b/bauh/gems/flatpak/resources/locale/ca
@@ -1,3 +1,6 @@
+flatpak.action.full_update=Full update
+flatpak.action.full_update.description=It completely updates the Flatpak apps and components. Useful if you are having issues with runtime updates.
+flatpak.action.full_update.status=Updating Flatpak apps and components
flatpak.config.install_level=level
flatpak.config.install_level.ask.tip={app} will ask the level that should be applied during the app installation
flatpak.config.install_level.system=system
diff --git a/bauh/gems/flatpak/resources/locale/de b/bauh/gems/flatpak/resources/locale/de
index afd6ce47..46ae4945 100644
--- a/bauh/gems/flatpak/resources/locale/de
+++ b/bauh/gems/flatpak/resources/locale/de
@@ -1,3 +1,6 @@
+flatpak.action.full_update=Full update
+flatpak.action.full_update.description=It completely updates the Flatpak apps and components. Useful if you are having issues with runtime updates.
+flatpak.action.full_update.status=Updating Flatpak apps and components
flatpak.config.install_level=level
flatpak.config.install_level.ask.tip={app} will ask the level that should be applied during the app installation
flatpak.config.install_level.system=system
diff --git a/bauh/gems/flatpak/resources/locale/en b/bauh/gems/flatpak/resources/locale/en
index 726d6214..aafc924d 100644
--- a/bauh/gems/flatpak/resources/locale/en
+++ b/bauh/gems/flatpak/resources/locale/en
@@ -1,3 +1,6 @@
+flatpak.action.full_update=Full update
+flatpak.action.full_update.description=It completely updates the Flatpak apps and components. Useful if you are having issues with runtime updates.
+flatpak.action.full_update.status=Updating Flatpak apps and components
flatpak.config.install_level=level
flatpak.config.install_level.ask.tip={app} will ask the level that should be applied during the app installation
flatpak.config.install_level.system=system
diff --git a/bauh/gems/flatpak/resources/locale/es b/bauh/gems/flatpak/resources/locale/es
index 24e88dff..16d1d37f 100644
--- a/bauh/gems/flatpak/resources/locale/es
+++ b/bauh/gems/flatpak/resources/locale/es
@@ -1,3 +1,6 @@
+flatpak.action.full_update=Actualización completa
+flatpak.action.full_update.description=Actualiza completamente las aplicaciones y componentes Flatpak. Útil si hay problemas con las actualizaciones de runtimes.
+flatpak.action.full_update.status=Actualizando las aplicaciones y componentes Flatpak
flatpak.config.install_level=nivel
flatpak.config.install_level.ask.tip={app} preguntará el nivel que debe aplicarse durante la instalación de la aplicación
flatpak.config.install_level.system=sistema
diff --git a/bauh/gems/flatpak/resources/locale/fr b/bauh/gems/flatpak/resources/locale/fr
index df08b4c0..549ddcb5 100644
--- a/bauh/gems/flatpak/resources/locale/fr
+++ b/bauh/gems/flatpak/resources/locale/fr
@@ -1,3 +1,6 @@
+flatpak.action.full_update=Full update
+flatpak.action.full_update.description=It completely updates the Flatpak apps and components. Useful if you are having issues with runtime updates.
+flatpak.action.full_update.status=Updating Flatpak apps and components
flatpak.config.install_level=niveau
flatpak.config.install_level.ask.tip={app} va demander le niveau à appliquer durant l'installation
flatpak.config.install_level.system=système
diff --git a/bauh/gems/flatpak/resources/locale/it b/bauh/gems/flatpak/resources/locale/it
index 76ae88d7..54012fc5 100644
--- a/bauh/gems/flatpak/resources/locale/it
+++ b/bauh/gems/flatpak/resources/locale/it
@@ -1,3 +1,6 @@
+flatpak.action.full_update=Full update
+flatpak.action.full_update.description=It completely updates the Flatpak apps and components. Useful if you are having issues with runtime updates.
+flatpak.action.full_update.status=Updating Flatpak apps and components
flatpak.config.install_level=level
flatpak.config.install_level.ask.tip={app} will ask the level that should be applied during the app installation
flatpak.config.install_level.system=system
diff --git a/bauh/gems/flatpak/resources/locale/pt b/bauh/gems/flatpak/resources/locale/pt
index 724bcb8a..f4af8a3a 100644
--- a/bauh/gems/flatpak/resources/locale/pt
+++ b/bauh/gems/flatpak/resources/locale/pt
@@ -1,3 +1,6 @@
+flatpak.action.full_update=Atualização completa
+flatpak.action.full_update.description=Atualiza completamente aplicações e componentes Flatpak instalados. Útil se você estiver com problemas de atualização dos runtimes.
+flatpak.action.full_update.status=Atualizando aplicações e componentes Flatpak
flatpak.config.install_level=nível
flatpak.config.install_level.ask.tip=O {app} perguntará qual o nível deverá ser aplicado durante a instalação do aplicativo
flatpak.config.install_level.system=sistema
diff --git a/bauh/gems/flatpak/resources/locale/ru b/bauh/gems/flatpak/resources/locale/ru
index 80016c54..6e4e7bca 100644
--- a/bauh/gems/flatpak/resources/locale/ru
+++ b/bauh/gems/flatpak/resources/locale/ru
@@ -1,3 +1,6 @@
+flatpak.action.full_update=Full update
+flatpak.action.full_update.description=It completely updates the Flatpak apps and components. Useful if you are having issues with runtime updates.
+flatpak.action.full_update.status=Updating Flatpak apps and components
flatpak.config.install_level=Уровень
flatpak.config.install_level.ask.tip={app} запросит уровень, который должен быть применен во время установки приложения
flatpak.config.install_level.system=Система
diff --git a/bauh/gems/flatpak/resources/locale/tr b/bauh/gems/flatpak/resources/locale/tr
index 1901e447..95c170bb 100644
--- a/bauh/gems/flatpak/resources/locale/tr
+++ b/bauh/gems/flatpak/resources/locale/tr
@@ -1,3 +1,6 @@
+flatpak.action.full_update=Full update
+flatpak.action.full_update.description=It completely updates the Flatpak apps and components. Useful if you are having issues with runtime updates.
+flatpak.action.full_update.status=Updating Flatpak apps and components
flatpak.config.install_level=seviye
flatpak.config.install_level.ask.tip={app} uygulama kurulumu sırasında uygulanması gereken seviyeyi soracak
flatpak.config.install_level.system=sistem