mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-06 22:54:16 +02:00
[arch] improvement -> AUR index expiration is now defined in hours instead of minutes
This commit is contained in:
@@ -30,7 +30,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- downgrade: using the cached package commit (if available) to determine the correct version to downgrade to (otherwise only the version will be used -> old behavior)
|
||||
- history: using the cached package commit (if available) to properly determine the current version (otherwise only the version will be used -> old behavior)
|
||||
- the task responsible for generating the local index is displayed on the initialization dialog
|
||||
- the index is not always being updated during the initialization process. It its kept for a period of time controlled by the settings property **aur_idx_exp** (in minutes -> default: 720 = 8 hours.). (P.S: this index is always updated when a package is installed/upgraded)
|
||||
- the index is not always being updated during the initialization process. It its kept for a period of time controlled by the settings property **aur_idx_exp** (in HOURS -> default: 1). (P.S: this index is always updated when a package is installed/upgraded)
|
||||
<p align="center">
|
||||
<img src="https://raw.githubusercontent.com/vinifmor/bauh-files/master/pictures/releases/0.9.11/aur_idx_exp.png">
|
||||
</p>
|
||||
|
||||
@@ -206,7 +206,7 @@ edit_aur_pkgbuild: false # if the AUR PKGBUILD file should be displayed for edi
|
||||
aur_build_dir: null # defines a custom build directory for AUR packages (a null value will point to /tmp/bauh/arch (non-root user) or /tmp/bauh_root/arch (root user)). Default: null.
|
||||
aur_remove_build_dir: true # it defines if a package's generated build directory should be removed after the operation is finished (installation, upgrading, ...). Options: true, false (default: true).
|
||||
aur_build_only_chosen : true # some AUR packages have a common file definition declaring several packages to be built. When this property is 'true' only the package the user select to install will be built (unless its name is different from those declared in the PKGBUILD base). With a 'null' value a popup asking if the user wants to build all of them will be displayed. 'false' will build and install all packages. Default: true.
|
||||
aur_idx_exp: 720 # It defines the period (in minutes) for the AUR index stored in disc to be considered valid during the initialization process. Use 0 so that it is always updated. Default: 720 (12 hours). (P.S: this index is always updated when a package is installed/upgraded)
|
||||
aur_idx_exp: 1 # It defines the period (in HOURS) for the AUR index stored in disc to be considered up to date during the initialization process. Use 0 so that it is always updated. Default: 1. (P.S: this index is always updated when a package is installed/upgraded)
|
||||
check_dependency_breakage: true # if, during the verification of the update requirements, specific versions of dependencies must also be checked. Example: package A depends on version 1.0 of B. If A and B were selected to upgrade, and B would be upgrade to 2.0, then B would be excluded from the transaction. Default: true.
|
||||
suggest_unneeded_uninstall: false # if the dependencies apparently no longer necessary associated with the uninstalled packages should be suggested for uninstallation. When this property is enabled it automatically disables the property 'suggest_optdep_uninstall'. Default: false (to prevent new users from making mistakes)
|
||||
suggest_optdep_uninstall: false # if the optional dependencies associated with uninstalled packages should be suggested for uninstallation. Only the optional dependencies that are not dependencies of other packages will be suggested. Default: false (to prevent new users from making mistakes)
|
||||
|
||||
@@ -37,5 +37,5 @@ class ArchConfigManager(YAMLConfigManager):
|
||||
'check_dependency_breakage': True,
|
||||
'suggest_unneeded_uninstall': False,
|
||||
'suggest_optdep_uninstall': False,
|
||||
'aur_idx_exp': 720,
|
||||
'aur_idx_exp': 1,
|
||||
'categories_exp': 24}
|
||||
|
||||
@@ -50,7 +50,7 @@ arch.config.check_dependency_breakage.tip=If, during the verification of upgrade
|
||||
arch.config.edit_aur_pkgbuild=Edit PKGBUILD (AUR)
|
||||
arch.config.edit_aur_pkgbuild.tip=If the PKGBUILD file of an AUR package should be displayed for editing before its installation/upgrade/downgrade
|
||||
arch.config.aur_idx_exp=Index expiration
|
||||
arch.config.aur_idx_exp.tip=It defines the period (in minutes) for the AUR index stored in disc to be considered valid during the initialization process. Use 0 so that it is always updated.
|
||||
arch.config.aur_idx_exp.tip=It defines the period (in HOURS) for the AUR index stored in disc to be considered up to date during the initialization process. Use 0 so that it is always updated.
|
||||
arch.config.mirrors_sort_limit=Mirrors sort limit
|
||||
arch.config.mirrors_sort_limit.tip=Defines the maximum number of mirrors that will be used for speed sorting. Use 0 for no limit or leave it blank to disable sorting.
|
||||
arch.config.optimize=Optimize {}
|
||||
|
||||
@@ -50,7 +50,7 @@ arch.config.check_dependency_breakage.tip=If, during the verification of upgrade
|
||||
arch.config.edit_aur_pkgbuild=Edit PKGBUILD (AUR)
|
||||
arch.config.edit_aur_pkgbuild.tip=If the PKGBUILD file of an AUR package should be displayed for editing before its installation/upgrade/downgrade
|
||||
arch.config.aur_idx_exp=Index expiration
|
||||
arch.config.aur_idx_exp.tip=It defines the period (in minutes) for the AUR index stored in disc to be considered valid during the initialization process. Use 0 so that it is always updated.
|
||||
arch.config.aur_idx_exp.tip=It defines the period (in HOURS) for the AUR index stored in disc to be considered up to date during the initialization process. Use 0 so that it is always updated.
|
||||
arch.config.mirrors_sort_limit=Mirrors sort limit
|
||||
arch.config.mirrors_sort_limit.tip=Defines the maximum number of mirrors that will be used for speed sorting. Use 0 for no limit or leave it blank to disable sorting.
|
||||
arch.config.optimize=Optimize {}
|
||||
|
||||
@@ -50,7 +50,7 @@ arch.config.check_dependency_breakage.tip=If, during the verification of upgrade
|
||||
arch.config.edit_aur_pkgbuild=Edit PKGBUILD (AUR)
|
||||
arch.config.edit_aur_pkgbuild.tip=If the PKGBUILD file of an AUR package should be displayed for editing before its installation/upgrade/downgrade
|
||||
arch.config.aur_idx_exp=Index expiration
|
||||
arch.config.aur_idx_exp.tip=It defines the period (in minutes) for the AUR index stored in disc to be considered valid during the initialization process. Use 0 so that it is always updated.
|
||||
arch.config.aur_idx_exp.tip=It defines the period (in HOURS) for the AUR index stored in disc to be considered up to date during the initialization process. Use 0 so that it is always updated.
|
||||
arch.config.mirrors_sort_limit=Mirrors sort limit
|
||||
arch.config.mirrors_sort_limit.tip=Defines the maximum number of mirrors that will be used for speed sorting. Use 0 for no limit or leave it blank to disable sorting.
|
||||
arch.config.optimize=Optimize {}
|
||||
|
||||
@@ -50,7 +50,7 @@ arch.config.check_dependency_breakage.tip=Si, durante la verificación de los re
|
||||
arch.config.edit_aur_pkgbuild=Editar PKGBUILD (AUR)
|
||||
arch.config.edit_aur_pkgbuild.tip=Si el archivo PKGBUILD de un paquete AUR debe ser exhibido para edición antes de su instalación/actualización/degradación
|
||||
arch.config.aur_idx_exp=Expiración del índice
|
||||
arch.config.aur_idx_exp.tip=Define el período (en minutos) para que el índice AUR almacenado en el disco se considere válido durante el proceso de inicialización. Utilice 0 para que esté siempre actualizado.
|
||||
arch.config.aur_idx_exp.tip=Define el período (en HORAS) en que el índice de AUR almacenado en el disco es considerado actualizado durante el proceso de inicialización. Utilice 0 para que sea siempre actualizado.
|
||||
arch.config.mirrors_sort_limit=Límite de ordenación de espejos
|
||||
arch.config.mirrors_sort_limit.tip=Define el número máximo de espejos que se utilizarán para la ordenación por velocidad. Use 0 para no limitar o déjelo en blanco para deshabilitar la clasificación.
|
||||
arch.config.optimize=Optimizar {}
|
||||
|
||||
@@ -50,7 +50,7 @@ arch.config.check_dependency_breakage.tip=Si, durant la vérification des prére
|
||||
arch.config.edit_aur_pkgbuild=Éditer PKGBUILD (AUR)
|
||||
arch.config.edit_aur_pkgbuild.tip=Si le fichier PKGBUILD d'un paquet AUR devrait être affiché pour édition avant installation/mise à jour/downgrade
|
||||
arch.config.aur_idx_exp=Index expiration
|
||||
arch.config.aur_idx_exp.tip=It defines the period (in minutes) for the AUR index stored in disc to be considered valid during the initialization process. Use 0 so that it is always updated.
|
||||
arch.config.aur_idx_exp.tip=It defines the period (in HOURS) for the AUR index stored in disc to be considered up to date during the initialization process. Use 0 so that it is always updated.
|
||||
arch.config.mirrors_sort_limit=Limite de tri des miroirs
|
||||
arch.config.mirrors_sort_limit.tip=Définit le nombre maximal de miroirs utilisés pour trier vite. 0 pour aucune limite ou vide pour désactiver le tri.
|
||||
arch.config.optimize=Optimizer {}
|
||||
|
||||
@@ -50,7 +50,7 @@ arch.config.check_dependency_breakage.tip=If, during the verification of upgrade
|
||||
arch.config.edit_aur_pkgbuild=Edit PKGBUILD (AUR)
|
||||
arch.config.edit_aur_pkgbuild.tip=If the PKGBUILD file of an AUR package should be displayed for editing before its installation/upgrade/downgrade
|
||||
arch.config.aur_idx_exp=Index expiration
|
||||
arch.config.aur_idx_exp.tip=It defines the period (in minutes) for the AUR index stored in disc to be considered valid during the initialization process. Use 0 so that it is always updated.
|
||||
arch.config.aur_idx_exp.tip=It defines the period (in HOURS) for the AUR index stored in disc to be considered up to date during the initialization process. Use 0 so that it is always updated.
|
||||
arch.config.mirrors_sort_limit=Mirrors sort limit
|
||||
arch.config.mirrors_sort_limit.tip=Defines the maximum number of mirrors that will be used for speed sorting. Use 0 for no limit or leave it blank to disable sorting.
|
||||
arch.config.optimize=Optimize {}
|
||||
|
||||
@@ -50,7 +50,7 @@ arch.config.check_dependency_breakage.tip=Se durante a verificação dos requisi
|
||||
arch.config.edit_aur_pkgbuild=Editar PKGBUILD (AUR)
|
||||
arch.config.edit_aur_pkgbuild.tip=Se o arquivo PKGBUILD de um pacote do AUR deve ser exibido para edição antes da instalação/atualização/reversão
|
||||
arch.config.aur_idx_exp=Expiração do índice
|
||||
arch.config.aur_idx_exp.tip=Define o período (em minutos) em que o índice do AUR armazenado em disco é considerado válido durante a inicialização. Utilize 0 para que ele sempre seja atualizado.
|
||||
arch.config.aur_idx_exp.tip=Define o período (em HORAS) em que o índice do AUR armazenado em disco é considerado atualizado durante a inicialização. Utilize 0 para que ele sempre seja atualizado.
|
||||
arch.config.mirrors_sort_limit=Limite de ordenação de espelhos
|
||||
arch.config.mirrors_sort_limit.tip=Define o número máximo de espelhos que serão utilizados para a ordenação por velocidade. Utilize 0 para não limitar ou deixe em branco para desabilitar a ordenação.
|
||||
arch.config.optimize=Otimizar {}
|
||||
|
||||
@@ -50,7 +50,7 @@ arch.config.check_dependency_breakage.tip=If, during the verification of upgrade
|
||||
arch.config.edit_aur_pkgbuild=Edit PKGBUILD (AUR)
|
||||
arch.config.edit_aur_pkgbuild.tip=If the PKGBUILD file of an AUR package should be displayed for editing before its installation/upgrade/downgrade
|
||||
arch.config.aur_idx_exp=Index expiration
|
||||
arch.config.aur_idx_exp.tip=It defines the period (in minutes) for the AUR index stored in disc to be considered valid during the initialization process. Use 0 so that it is always updated.
|
||||
arch.config.aur_idx_exp.tip=It defines the period (in HOURS) for the AUR index stored in disc to be considered up to date during the initialization process. Use 0 so that it is always updated.
|
||||
arch.config.mirrors_sort_limit=Ограничение сортировки зеркал
|
||||
arch.config.mirrors_sort_limit.tip=Определяет максимальное количество зеркал, которые будут использоваться для сортировки по скорости. Используйте 0 для No limit или оставьте его пустым, чтобы отключить сортировку.
|
||||
arch.config.optimize=Оптимизация {}
|
||||
|
||||
@@ -50,7 +50,7 @@ arch.config.check_dependency_breakage.tip=If, during the verification of upgrade
|
||||
arch.config.edit_aur_pkgbuild=Edit PKGBUILD (AUR)
|
||||
arch.config.edit_aur_pkgbuild.tip=If the PKGBUILD file of an AUR package should be displayed for editing before its installation/upgrade/downgrade
|
||||
arch.config.aur_idx_exp=Index expiration
|
||||
arch.config.aur_idx_exp.tip=It defines the period (in minutes) for the AUR index stored in disc to be considered valid during the initialization process. Use 0 so that it is always updated.
|
||||
arch.config.aur_idx_exp.tip=It defines the period (in HOURS) for the AUR index stored in disc to be considered up to date during the initialization process. Use 0 so that it is always updated.
|
||||
arch.config.mirrors_sort_limit=Yansı sıralama sınırı
|
||||
arch.config.mirrors_sort_limit.tip=Hız sıralama için kullanılacak maksimum yansı sayısını tanımlar. Sınırsız olması için 0 kullanın veya sıralamayı devre dışı bırakmak için boş bırakın.
|
||||
arch.config.optimize=Optimize {}
|
||||
|
||||
@@ -45,12 +45,12 @@ class AURIndexUpdater(Thread):
|
||||
|
||||
def should_update(self) -> bool:
|
||||
try:
|
||||
exp_minutes = int(self.config['aur_idx_exp'])
|
||||
exp_hours = int(self.config['aur_idx_exp'])
|
||||
except:
|
||||
traceback.print_exc()
|
||||
return True
|
||||
|
||||
if exp_minutes <= 0:
|
||||
if exp_hours <= 0:
|
||||
return True
|
||||
|
||||
if not os.path.exists(AUR_INDEX_FILE):
|
||||
@@ -64,7 +64,7 @@ class AURIndexUpdater(Thread):
|
||||
|
||||
try:
|
||||
index_timestamp = datetime.fromtimestamp(float(timestamp_str))
|
||||
return (index_timestamp + timedelta(minutes=exp_minutes)) <= datetime.utcnow()
|
||||
return (index_timestamp + timedelta(hours=exp_hours)) <= datetime.utcnow()
|
||||
except:
|
||||
traceback.print_exc()
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user