[debian] improvement: installation/download sizes order (installation dependencies dialog)

This commit is contained in:
Vinicius Moreira
2022-04-07 15:15:21 -03:00
parent 57eea7b08b
commit 8a776d7efc
11 changed files with 14 additions and 13 deletions

View File

@@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- displaying hard and unnecessary requirements versions and descriptions
- Debian
- install: installation/download sizes order (to follow the upgrade dialog order)
- uninstall: dependencies dialog size
- General

View File

@@ -36,13 +36,13 @@ class DebianViewBridge:
else:
uncompressed = '?'
views.append(InputOption(label=f"{p.name} ({compressed} | {uncompressed})",
views.append(InputOption(label=f"{p.name} ({uncompressed} | {compressed})",
value=p.name, read_only=True, icon_path=DEBIAN_ICON_PATH,
tooltip=p.description if p.description else '?'))
dsize = get_human_size_str(download_size) if download_size > 0 else '?'
isize = get_human_size_str(install_size) if install_size > 0 else '?'
return views, dsize, isize
return views, isize, dsize
def _map_to_remove(self, pkgs: Optional[Collection[DebianPackage]]) -> Optional[Tuple[List[InputOption], str]]:
if pkgs:
@@ -88,8 +88,8 @@ class DebianViewBridge:
if to_install_data:
to_install_data[0].sort(key=attrgetter('label'))
lb_deps = self._i18n['debian.transaction.to_install'].format(no=bold(str(len(to_install_data[0]))),
dsize=bold(to_install_data[1]),
isize=bold(to_install_data[2]))
dsize=bold(to_install_data[2]),
isize=bold(to_install_data[1]))
components.append(TextComponent(html=f'<br/>{lb_deps}', min_width=text_width))
components.append(MultipleSelectComponent(id_='inst', label='', options=to_install_data[0],

View File

@@ -77,7 +77,7 @@ debian.task.sync_pkgs.status=Synchronizing packages
debian.transaction.dependency_of=Dependency of {pkgs}
debian.transaction.get_data=Retrieving the operation's data
debian.transaction.title=Operation details
debian.transaction.to_install=The following additional packages ({no}) will be installed (Download: {dsize} | Installation: {isize})
debian.transaction.to_install=The following additional packages ({no}) will be installed (Installation: {isize} | Download: {dsize})
debian.transaction.to_remove=The following packages ({no}) will be removed (Freed space: {fspace})
debian.uninstall.failed_to_remove=It was not possible to remove the following {no} packages: {pkgs}
debian.uninstall.removing=Removing packages

View File

@@ -77,7 +77,7 @@ debian.task.sync_pkgs.status=Synchronizing packages
debian.transaction.dependency_of=Dependency of {pkgs}
debian.transaction.get_data=Retrieving the operation's data
debian.transaction.title=Operation details
debian.transaction.to_install=The following additional packages ({no}) will be installed (Download: {dsize} | Installation: {isize})
debian.transaction.to_install=The following additional packages ({no}) will be installed (Installation: {isize} | Download: {dsize})
debian.transaction.to_remove=The following packages ({no}) will be removed (Freed space: {fspace})
debian.uninstall.failed_to_remove=It was not possible to remove the following {no} packages: {pkgs}
debian.uninstall.removing=Removing packages

View File

@@ -77,7 +77,7 @@ debian.task.sync_pkgs.status=Synchronizing packages
debian.transaction.dependency_of=Dependency of {pkgs}
debian.transaction.get_data=Retrieving the operation's data
debian.transaction.title=Operation details
debian.transaction.to_install=The following additional packages ({no}) will be installed (Download: {dsize} | Installation: {isize})
debian.transaction.to_install=The following additional packages ({no}) will be installed (Installation: {isize} | Download: {dsize})
debian.transaction.to_remove=The following packages ({no}) will be removed (Freed space: {fspace})
debian.uninstall.failed_to_remove=It was not possible to remove the following {no} packages: {pkgs}
debian.uninstall.removing=Removing packages

View File

@@ -77,7 +77,7 @@ debian.task.sync_pkgs.status=Sincronizando paquetes
debian.transaction.dependency_of=Dependencia de {pkgs}
debian.transaction.get_data=Recuperando datos de la operación
debian.transaction.title=Detalles de la operación
debian.transaction.to_install=Los siguientes paquetes adicionales ({no}) serán instalados (Descarga: {dsize} | Instalación: {isize})
debian.transaction.to_install=Los siguientes paquetes adicionales ({no}) serán instalados (Instalación: {isize} | Descarga: {dsize})
debian.transaction.to_remove=Los siguientes paquetes ({no}) serán eliminados (Espacio liberado: {fspace})
debian.uninstall.failed_to_remove=No fue posible eliminar los siguientes {no} paquetes: {pkgs}
debian.uninstall.removing=Removendo paquetes

View File

@@ -76,7 +76,7 @@ debian.task.sync_pkgs.status=Synchronizing packages
debian.transaction.dependency_of=Dependency of {pkgs}
debian.transaction.get_data=Retrieving the operation's data
debian.transaction.title=Operation details
debian.transaction.to_install=The following additional packages ({no}) will be installed (Download: {dsize} | Installation: {isize})
debian.transaction.to_install=The following additional packages ({no}) will be installed (Installation: {isize} | Download: {dsize})
debian.transaction.to_remove=The following packages ({no}) will be removed (Freed space: {fspace})
debian.uninstall.failed_to_remove=It was not possible to remove the following {no} packages: {pkgs}
debian.uninstall.removing=Removing packages

View File

@@ -77,7 +77,7 @@ debian.task.sync_pkgs.status=Synchronizing packages
debian.transaction.dependency_of=Dependency of {pkgs}
debian.transaction.get_data=Retrieving the operation's data
debian.transaction.title=Operation details
debian.transaction.to_install=The following additional packages ({no}) will be installed (Download: {dsize} | Installation: {isize})
debian.transaction.to_install=The following additional packages ({no}) will be installed (Installation: {isize} | Download: {dsize})
debian.transaction.to_remove=The following packages ({no}) will be removed (Freed space: {fspace})
debian.uninstall.failed_to_remove=It was not possible to remove the following {no} packages: {pkgs}
debian.uninstall.removing=Removing packages

View File

@@ -77,7 +77,7 @@ debian.task.sync_pkgs.status=Sincronizando pacotes
debian.transaction.dependency_of=Dependência de {pkgs}
debian.transaction.get_data=Obtendo dados da operação
debian.transaction.title=Detalhes da operação
debian.transaction.to_install=Os seguintes pacotes adicionais ({no}) serão instaladas (Download: {dsize} | Instalação: {isize})
debian.transaction.to_install=Os seguintes pacotes adicionais ({no}) serão instaladas (Instalação: {isize} | Download: {dsize})
debian.transaction.to_remove=Os seguintes pacotes ({no}) serão removidos (Espaço liberado: {fspace})
debian.uninstall.failed_to_remove=Não foi possível remover os seguintes {no} pacotes: {pkgs}
debian.uninstall.removing=Removendo pacotes

View File

@@ -77,7 +77,7 @@ debian.task.sync_pkgs.status=Synchronizing packages
debian.transaction.dependency_of=Dependency of {pkgs}
debian.transaction.get_data=Retrieving the operation's data
debian.transaction.title=Operation details
debian.transaction.to_install=The following additional packages ({no}) will be installed (Download: {dsize} | Installation: {isize})
debian.transaction.to_install=The following additional packages ({no}) will be installed (Installation: {isize} | Download: {dsize})
debian.transaction.to_remove=The following packages ({no}) will be removed (Freed space: {fspace})
debian.uninstall.failed_to_remove=It was not possible to remove the following {no} packages: {pkgs}
debian.uninstall.removing=Removing packages

View File

@@ -76,7 +76,7 @@ debian.task.sync_pkgs.status=Synchronizing packages
debian.transaction.dependency_of=Dependency of {pkgs}
debian.transaction.get_data=Retrieving the operation's data
debian.transaction.title=Operation details
debian.transaction.to_install=The following additional packages ({no}) will be installed (Download: {dsize} | Installation: {isize})
debian.transaction.to_install=The following additional packages ({no}) will be installed (Installation: {isize} | Download: {dsize})
debian.transaction.to_remove=The following packages ({no}) will be removed (Freed space: {fspace})
debian.uninstall.failed_to_remove=It was not possible to remove the following {no} packages: {pkgs}
debian.uninstall.removing=Removing packages