mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-08 09:44:15 +02:00
[flatpak] sorting packages before updating
This commit is contained in:
@@ -438,9 +438,13 @@ class GenericSoftwareManager(SoftwareManager):
|
||||
|
||||
if by_manager:
|
||||
for man, pkgs in by_manager.items():
|
||||
ti = time.time()
|
||||
sorted_list.extend(man.sort_update_order(pkgs))
|
||||
tf = time.time()
|
||||
self.logger.info(man.__class__.__name__ + " took {0:.2f} seconds".format(tf - ti))
|
||||
if len(pkgs) > 1:
|
||||
ti = time.time()
|
||||
sorted_list.extend(man.sort_update_order(pkgs))
|
||||
tf = time.time()
|
||||
self.logger.info(man.__class__.__name__ + " took {0:.2f} seconds".format(tf - ti))
|
||||
else:
|
||||
self.logger.info("Only one package to sort for {}. Ignoring sorting.".format(man.__class__.__name__))
|
||||
sorted_list.extend(pkgs)
|
||||
|
||||
return sorted_list
|
||||
|
||||
@@ -108,7 +108,7 @@ class UpdateSelectedApps(AsyncAction):
|
||||
sorted_pkgs = self.manager.sort_update_order([view.model for view in self.apps_to_update])
|
||||
|
||||
for pkg in sorted_pkgs:
|
||||
|
||||
self.change_substatus('')
|
||||
name = pkg.name if not RE_VERSION_IN_NAME.findall(pkg.name) else pkg.name.split('version')[0].strip()
|
||||
|
||||
self.change_status('{} {} {}...'.format(self.i18n['manage_window.status.upgrading'], name, pkg.version))
|
||||
|
||||
Reference in New Issue
Block a user