[aur] caching categories to the disk | not locking the application boot while the AUR categories are being retrieved

This commit is contained in:
Vinicius Moreira
2019-10-22 16:13:32 -03:00
parent 9b17407067
commit 930308834b
7 changed files with 87 additions and 32 deletions

View File

@@ -2,10 +2,8 @@ import datetime
from typing import List
from bauh.api.abstract.model import SoftwarePackage
from bauh.api.constants import CACHE_PATH
from bauh.commons import resource
from bauh.gems.arch import ROOT_DIR
from bauh.gems.arch import ROOT_DIR, ARCH_CACHE_PATH
CACHED_ATTRS = {'command', 'icon_path', 'mirror', 'maintainer', 'desktop_entry'}
@@ -35,7 +33,7 @@ class ArchPackage(SoftwarePackage):
@staticmethod
def disk_cache_path(pkgname: str, mirror: str):
return CACHE_PATH + '/arch/installed/' + ('aur' if mirror == 'aur' else 'mirror') + '/' + pkgname
return ARCH_CACHE_PATH + '/installed/' + ('aur' if mirror == 'aur' else 'mirror') + '/' + pkgname
def get_pkg_build_url(self):
if self.package_base: