mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 00:04:15 +02:00
[settings] property to disable pre-dependency checking
This commit is contained in:
@@ -2,7 +2,6 @@ import logging
|
||||
import os
|
||||
import traceback
|
||||
from pathlib import Path
|
||||
from typing import List
|
||||
|
||||
import yaml
|
||||
|
||||
@@ -23,7 +22,8 @@ def read_config(update_file: bool = False) -> dict:
|
||||
'locale': None,
|
||||
'updates': {
|
||||
'check_interval': 30,
|
||||
'sort_packages': True
|
||||
'sort_packages': True,
|
||||
"pre_dependency_checking": True
|
||||
},
|
||||
'system': {
|
||||
'notifications': True,
|
||||
|
||||
@@ -80,6 +80,7 @@ class GenericSettingsManager:
|
||||
select_dcache = self._gen_bool_component(label=self.i18n['core.config.disk_cache'],
|
||||
tooltip=self.i18n['core.config.disk_cache.tip'],
|
||||
value=core_config['disk_cache']['enabled'],
|
||||
max_width=default_width,
|
||||
id_='dcache')
|
||||
|
||||
input_data_exp = TextInputComponent(label=self.i18n['core.config.mem_cache.data_exp'],
|
||||
@@ -98,10 +99,16 @@ class GenericSettingsManager:
|
||||
|
||||
select_update_sort = self._gen_bool_component(label=self.i18n['core.config.updates.sort_pkgs'],
|
||||
tooltip=self.i18n['core.config.updates.sort_pkgs.tip'],
|
||||
value=core_config['updates']['sort_packages'],
|
||||
value=bool(core_config['updates']['sort_packages']),
|
||||
max_width=default_width,
|
||||
id_="up_sort")
|
||||
|
||||
select_update_check = self._gen_bool_component(label=self.i18n['core.config.updates.dep_check'],
|
||||
tooltip=self.i18n['core.config.updates.dep_check.tip'],
|
||||
value=bool(core_config['updates']['pre_dependency_checking']),
|
||||
max_width=default_width,
|
||||
id_="up_dep_check")
|
||||
|
||||
select_dep_check = self._gen_bool_component(label=self.i18n['core.config.system.dep_checking'],
|
||||
tooltip=self.i18n['core.config.system.dep_checking.tip'],
|
||||
value=core_config['system']['single_dependency_checking'],
|
||||
@@ -114,7 +121,7 @@ class GenericSettingsManager:
|
||||
max_width=default_width,
|
||||
value=core_config['download']['multithreaded'])
|
||||
|
||||
sub_comps = [FormComponent([select_dcache, select_dmthread, select_update_sort, select_dep_check, input_data_exp, input_icon_exp], spaces=False)]
|
||||
sub_comps = [FormComponent([select_dcache, select_dmthread, select_update_check, select_update_sort, select_dep_check, input_data_exp, input_icon_exp], spaces=False)]
|
||||
return TabComponent(self.i18n['core.config.tab.advanced'].capitalize(), PanelComponent(sub_comps), None, 'core.adv')
|
||||
|
||||
def _gen_tray_settings(self, core_config: dict, screen_width: int, screen_height: int) -> TabComponent:
|
||||
@@ -270,6 +277,7 @@ class GenericSettingsManager:
|
||||
download_mthreaded = adv_form.get_component('down_mthread').get_selected()
|
||||
core_config['download']['multithreaded'] = download_mthreaded
|
||||
|
||||
core_config['updates']['pre_dependency_checking'] = adv_form.get_component('up_dep_check').get_selected()
|
||||
core_config['updates']['sort_packages'] = adv_form.get_component('up_sort').get_selected()
|
||||
|
||||
single_dep_check = adv_form.get_component('dep_check').get_selected()
|
||||
|
||||
@@ -173,7 +173,7 @@ class UpdateSelectedApps(AsyncAction):
|
||||
|
||||
models = [view.model for view in self.pkgs]
|
||||
|
||||
if not self._handle_update_requirements(models):
|
||||
if bool(app_config['updates']['pre_dependency_checking']) and not self._handle_update_requirements(models):
|
||||
return
|
||||
|
||||
proceed, sorted_pkgs = self._sort_packages(models, app_config)
|
||||
|
||||
@@ -255,6 +255,8 @@ core.config.ui.auto_scale=Auto scale
|
||||
core.config.ui.auto_scale.tip=It activates the auto screen scale factor ( {} ). It fixes scaling issues for some desktop environments.
|
||||
core.config.updates.sort_pkgs=Sort updates
|
||||
core.config.updates.sort_pkgs.tip=Defines the best update order for the selected applications / packages to avoid issues
|
||||
core.config.updates.dep_check=Mostra els requisits d’actualització
|
||||
core.config.updates.dep_check.tip=Mostra tots els paquets / aplicacions addicionals que cal instal·lar abans de començar a actualitzar els seleccionats
|
||||
settings.changed.success.warning=Settings successfully changed. Some of them will only take effect after a restart.
|
||||
settings.changed.success.reboot=Restart now ?
|
||||
settings.error=It was not possible to properly change all the settings
|
||||
|
||||
@@ -210,6 +210,8 @@ core.config.ui.auto_scale=Auto scale
|
||||
core.config.ui.auto_scale.tip=It activates the auto screen scale factor ( {} ). It fixes scaling issues for some desktop environments.
|
||||
core.config.updates.sort_pkgs=Sort updates
|
||||
core.config.updates.sort_pkgs.tip=Defines the best update order for the selected applications / packages to avoid issues
|
||||
core.config.updates.dep_check=Show update requirements
|
||||
core.config.updates.dep_check.tip=Displays all additional packages / applications that need to be installed before starting to update selected ones
|
||||
settings.changed.success.warning=Settings successfully changed. Some of them will only take effect after a restart.
|
||||
settings.changed.success.reboot=Restart now ?
|
||||
settings.error=It was not possible to properly change all the settings
|
||||
|
||||
@@ -217,6 +217,8 @@ core.config.ui.auto_scale=Auto scale
|
||||
core.config.ui.auto_scale.tip=It activates the auto screen scale factor ( {} ). It fixes scaling issues for some desktop environments.
|
||||
core.config.updates.sort_pkgs=Sort updates
|
||||
core.config.updates.sort_pkgs.tip=Defines the best update order for the selected applications / packages to avoid issues
|
||||
core.config.updates.dep_check=Show update requirements
|
||||
core.config.updates.dep_check.tip=Displays all additional packages / applications that need to be installed before starting to update selected ones
|
||||
settings.changed.success.warning=Settings successfully changed. Some of them will only take effect after a restart.
|
||||
settings.changed.success.reboot=Restart now ?
|
||||
settings.error=It was not possible to properly change all the settings
|
||||
@@ -232,7 +234,7 @@ download=download
|
||||
clean=clean
|
||||
action.update.status.sorting=Determining the best update order
|
||||
action.update.requirements.title=Upgrade requirements
|
||||
action.update.requirements.body=The following applications / packages must be installed before upgrading
|
||||
action.update.requirements.body=The following {} applications / packages must be installed before upgrading
|
||||
action.update.install_req.fail.title=Installation failed
|
||||
action.update.install_req.fail.body=It was not possible to install {}
|
||||
action.update.requirements.status=Checking requirements
|
||||
|
||||
@@ -258,6 +258,8 @@ core.config.ui.auto_scale=Escala automática
|
||||
core.config.ui.auto_scale.tip=Activa el factor de escala de pantalla automática ( {} ). Soluciona problemas de escala para algunos ambientes desktop.
|
||||
core.config.updates.sort_pkgs=Ordenar actualizaciones
|
||||
core.config.updates.sort_pkgs.tip=Define el mejor orden de actualización para las aplicaciones / paquetes seleccionados para evitar problemas
|
||||
core.config.updates.dep_check=Mostrar requisitos de actualización
|
||||
core.config.updates.dep_check.tip=Muestra todos los paquetes / aplicaciones adicionales que deben instalarse antes de comenzar a actualizar los seleccionados
|
||||
settings.changed.success.warning=Las configuraciones se cambiaron con éxito. Algunas solo tendrán efecto después del reinicio.
|
||||
settings.changed.success.reboot=¿Reiniciar ahora?
|
||||
settings.error=No fue posible cambiar correctamente todas las configuraciones
|
||||
|
||||
@@ -210,6 +210,8 @@ core.config.ui.auto_scale=Auto scale
|
||||
core.config.ui.auto_scale.tip=It activates the auto screen scale factor ( {} ). It fixes scaling issues for some desktop environments.
|
||||
core.config.updates.sort_pkgs=Sort updates
|
||||
core.config.updates.sort_pkgs.tip=Defines the best update order for the selected applications / packages to avoid issues
|
||||
core.config.updates.dep_check=Mostra i requisiti di aggiornamento
|
||||
core.config.updates.dep_check.tip=Visualizza tutti i pacchetti / applicazioni aggiuntivi che devono essere installati prima di iniziare ad aggiornare quelli selezionati
|
||||
settings.changed.success.warning=Settings successfully changed. Some of them will only take effect after a restart.
|
||||
settings.changed.success.reboot=Restart now ?
|
||||
settings.error=It was not possible to properly change all the settings
|
||||
|
||||
@@ -261,6 +261,8 @@ core.config.ui.auto_scale=Escala automática
|
||||
core.config.ui.auto_scale.tip=Ativa o fator de escala automático ( {} ). Corrige problemas de escala para alguns ambientes desktop.
|
||||
core.config.updates.sort_pkgs=Organizar atualizações
|
||||
core.config.updates.sort_pkgs.tip=Define a melhor ordem de atualização para os aplicativos / pacotes selecionados para evitar problemas
|
||||
core.config.updates.dep_check=Mostrar requisitos de atualização
|
||||
core.config.updates.dep_check.tip=Exibe todos os pacotes / aplicativos adicionais que precisam ser instalados antes de iniciar a atualização dos selecionados
|
||||
settings.changed.success.warning=Configurações alteradas com sucesso ! Algumas delas só surtirão após a reinicialização.
|
||||
settings.changed.success.reboot=Reiniciar agora ?
|
||||
settings.error=Não foi possível alterar todas as configurações adequadamente
|
||||
|
||||
Reference in New Issue
Block a user