mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-09 20:04:15 +02:00
fix: disk cache keeps enabled even with --disk-cache=0 | improving snaps launching | arch gem label as 'AUR' for now
This commit is contained in:
@@ -39,7 +39,7 @@ class ArchManager(SoftwareManager):
|
||||
self.aur_client = AURClient(context.http_client)
|
||||
self.names_index = {}
|
||||
self.aur_index_updater = AURIndexUpdater(context, self)
|
||||
self.dcache_updater = ArchDiskCacheUpdater(context.logger)
|
||||
self.dcache_updater = ArchDiskCacheUpdater(context.logger, context.disk_cache)
|
||||
self.logger = context.logger
|
||||
self.enabled = True
|
||||
self.arch_distro = self.context.linux_distro[0].lower() == 'arch'
|
||||
@@ -467,7 +467,9 @@ class ArchManager(SoftwareManager):
|
||||
|
||||
if installed and self.context.disk_cache:
|
||||
handler.watcher.change_substatus(self.i18n['status.caching_data'].format(bold(pkgname)))
|
||||
disk.save_several({pkgname}, mirror)
|
||||
if self.context.disk_cache:
|
||||
disk.save_several({pkgname}, mirror)
|
||||
|
||||
self._update_progress(handler.watcher, 100, change_progress)
|
||||
|
||||
return installed
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
gem.arch.label=Arch ( AUR )
|
||||
gem.arch.label=AUR
|
||||
gem.arch.info=AUR packages are maintained by an independent user community. There is no warranty that they will work or not harm you system.
|
||||
arch.install.conflict.popup.title=Conflict detected
|
||||
arch.install.conflict.popup.body=The applications {} are in conflict. You must uninstall one to install the other. Continue ?
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
gem.arch.label=Arch ( AUR )
|
||||
gem.arch.label=AUR
|
||||
gem.arch.info=Los paquetes AUR son mantenidos por una comunidad de usuarios independiente. No hay garantía de que funcionen o que no dañen su sistema.
|
||||
aur.info.architecture=arquitectura
|
||||
aur.info.architecture.any=cualquier
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
gem.arch.label=Arch ( AUR )
|
||||
gem.arch.label=AUR
|
||||
gem.arch.info=Pacotes do AUR são mantidos por uma comunidade de usuários independente. Não há garantia que funcionarão ou que não prejudicarão o seus sistema.
|
||||
aur.info.architecture=arquitetura
|
||||
aur.info.architecture.any=qualquer
|
||||
|
||||
@@ -37,16 +37,18 @@ class AURIndexUpdater(Thread):
|
||||
|
||||
class ArchDiskCacheUpdater(Thread if bool(os.getenv('BAUH_DEBUG', 0)) else Process):
|
||||
|
||||
def __init__(self, logger: logging.Logger):
|
||||
def __init__(self, logger: logging.Logger, disk_cache: bool):
|
||||
super(ArchDiskCacheUpdater, self).__init__(daemon=True)
|
||||
self.logger = logger
|
||||
self.disk_cache = disk_cache
|
||||
|
||||
def run(self):
|
||||
self.logger.info('Pre-caching installed AUR packages data to disk')
|
||||
installed = pacman.list_and_map_installed()
|
||||
if self.disk_cache:
|
||||
self.logger.info('Pre-caching installed AUR packages data to disk')
|
||||
installed = pacman.list_and_map_installed()
|
||||
|
||||
saved = 0
|
||||
if installed and installed['not_signed']:
|
||||
saved = disk.save_several({app for app in installed['not_signed']}, 'aur', overwrite=False)
|
||||
saved = 0
|
||||
if installed and installed['not_signed']:
|
||||
saved = disk.save_several({app for app in installed['not_signed']}, 'aur', overwrite=False)
|
||||
|
||||
self.logger.info('Pre-cached data of {} AUR packages to the disk'.format(saved))
|
||||
self.logger.info('Pre-cached data of {} AUR packages to the disk'.format(saved))
|
||||
|
||||
Reference in New Issue
Block a user