diff --git a/bauh/gems/arch/__init__.py b/bauh/gems/arch/__init__.py index 8abaa524..82b58c24 100644 --- a/bauh/gems/arch/__init__.py +++ b/bauh/gems/arch/__init__.py @@ -5,14 +5,14 @@ from bauh.commons import resource ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) BUILD_DIR = f'{TEMP_DIR}/arch' -ARCH_CACHE_PATH = f'{CACHE_DIR}/arch' -CATEGORIES_FILE_PATH = f'{ARCH_CACHE_PATH}/categories.txt' +ARCH_CACHE_DIR = f'{CACHE_DIR}/arch' +CATEGORIES_FILE_PATH = f'{ARCH_CACHE_DIR}/categories.txt' URL_CATEGORIES_FILE = 'https://raw.githubusercontent.com/vinifmor/bauh-files/master/arch/categories.txt' URL_GPG_SERVERS = 'https://raw.githubusercontent.com/vinifmor/bauh-files/master/arch/gpgservers.txt' ARCH_CONFIG_DIR = f'{CONFIG_DIR}/arch' CUSTOM_MAKEPKG_FILE = f'{ARCH_CONFIG_DIR}/makepkg.conf' -AUR_INDEX_FILE = f'{ARCH_CACHE_PATH}/aur/index.txt' -AUR_INDEX_TS_FILE = f'{ARCH_CACHE_PATH}/aur/index.ts' +AUR_INDEX_FILE = f'{ARCH_CACHE_DIR}/aur/index.txt' +AUR_INDEX_TS_FILE = f'{ARCH_CACHE_DIR}/aur/index.ts' CONFIG_FILE = f'{CONFIG_DIR}/arch.yml' SUGGESTIONS_FILE = 'https://raw.githubusercontent.com/vinifmor/bauh-files/master/arch/aur_suggestions.txt' UPDATES_IGNORED_FILE = f'{ARCH_CONFIG_DIR}/updates_ignored.txt' diff --git a/bauh/gems/arch/model.py b/bauh/gems/arch/model.py index 70320ff4..6c628e49 100644 --- a/bauh/gems/arch/model.py +++ b/bauh/gems/arch/model.py @@ -2,7 +2,7 @@ from typing import List, Set, Optional from bauh.api.abstract.model import SoftwarePackage, CustomSoftwareAction from bauh.commons import resource -from bauh.gems.arch import ROOT_DIR, ARCH_CACHE_PATH +from bauh.gems.arch import ROOT_DIR, ARCH_CACHE_DIR from bauh.view.util.translation import I18n CACHED_ATTRS = {'command', 'icon_path', 'repository', 'maintainer', 'desktop_entry', 'categories', 'last_modified', 'commit'} @@ -85,7 +85,7 @@ class ArchPackage(SoftwarePackage): @staticmethod def disk_cache_path(pkgname: str): - return f'{ARCH_CACHE_PATH}/installed/{pkgname}' + return f'{ARCH_CACHE_DIR}/installed/{pkgname}' def get_pkg_build_url(self): if self.package_base: diff --git a/bauh/gems/arch/worker.py b/bauh/gems/arch/worker.py index 9f34a56b..c33cd28b 100644 --- a/bauh/gems/arch/worker.py +++ b/bauh/gems/arch/worker.py @@ -18,7 +18,7 @@ from bauh.commons.boot import CreateConfigFile from bauh.commons.html import bold from bauh.commons.system import new_root_subprocess, ProcessHandler from bauh.gems.arch import pacman, disk, CUSTOM_MAKEPKG_FILE, ARCH_CONFIG_DIR, AUR_INDEX_FILE, get_icon_path, database, \ - mirrors, ARCH_CACHE_PATH, AUR_INDEX_TS_FILE, aur + mirrors, ARCH_CACHE_DIR, AUR_INDEX_TS_FILE, aur from bauh.gems.arch.aur import URL_INDEX from bauh.view.util.translation import I18n @@ -156,8 +156,8 @@ class ArchDiskCacheUpdater(Thread): self.progress = 0 # progress is defined by the number of packages prepared and indexed self.controller = controller self.internet_available = internet_available - self.installed_hash_path = f'{ARCH_CACHE_PATH}/installed.sha1' - self.installed_cache_dir = f'{ARCH_CACHE_PATH}/installed' + self.installed_hash_path = f'{ARCH_CACHE_DIR}/installed.sha1' + self.installed_cache_dir = f'{ARCH_CACHE_DIR}/installed' self.aur_indexer = aur_indexer self.create_config = create_config self.taskman.register_task(self.task_id, self.i18n['arch.task.disk_cache'], get_icon_path())