[arch] refactoring: CONFIG_DIR constant renamed to ARCH_CONFIG_DIR

This commit is contained in:
Vinicius Moreira
2021-11-24 12:08:48 -03:00
parent 43902e3ddc
commit 797bea4b6d
3 changed files with 9 additions and 9 deletions

View File

@@ -9,15 +9,15 @@ ARCH_CACHE_PATH = f'{CACHE_PATH}/arch'
CATEGORIES_FILE_PATH = f'{ARCH_CACHE_PATH}/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'
CONFIG_DIR = f'{CONFIG_PATH}/arch'
CUSTOM_MAKEPKG_FILE = '{}/makepkg.conf'.format(CONFIG_DIR)
ARCH_CONFIG_DIR = f'{CONFIG_PATH}/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'
CONFIG_FILE = f'{CONFIG_PATH}/arch.yml'
SUGGESTIONS_FILE = 'https://raw.githubusercontent.com/vinifmor/bauh-files/master/arch/aur_suggestions.txt'
UPDATES_IGNORED_FILE = '{}/updates_ignored.txt'.format(CONFIG_DIR)
EDITABLE_PKGBUILDS_FILE = '{}/aur/editable_pkgbuilds.txt'.format(CONFIG_DIR)
IGNORED_REBUILD_CHECK_FILE = '{}/aur/ignored_rebuild_check.txt'.format(CONFIG_DIR)
UPDATES_IGNORED_FILE = f'{ARCH_CONFIG_DIR}/updates_ignored.txt'
EDITABLE_PKGBUILDS_FILE = f'{ARCH_CONFIG_DIR}/aur/editable_pkgbuilds.txt'
IGNORED_REBUILD_CHECK_FILE = f'{ARCH_CONFIG_DIR}/aur/ignored_rebuild_check.txt'
def get_icon_path() -> str:

View File

@@ -38,7 +38,7 @@ from bauh.commons.view_utils import new_select
from bauh.gems.arch import aur, pacman, makepkg, message, confirmation, disk, git, \
gpg, URL_CATEGORIES_FILE, CATEGORIES_FILE_PATH, CUSTOM_MAKEPKG_FILE, SUGGESTIONS_FILE, \
get_icon_path, database, mirrors, sorting, cpu_manager, UPDATES_IGNORED_FILE, \
CONFIG_DIR, EDITABLE_PKGBUILDS_FILE, URL_GPG_SERVERS, BUILD_DIR, rebuild_detector
ARCH_CONFIG_DIR, EDITABLE_PKGBUILDS_FILE, URL_GPG_SERVERS, BUILD_DIR, rebuild_detector
from bauh.gems.arch.aur import AURClient
from bauh.gems.arch.config import get_build_dir, ArchConfigManager
from bauh.gems.arch.dependencies import DependenciesAnalyser
@@ -3193,7 +3193,7 @@ class ArchManager(SoftwareManager):
return ignored
def _write_ignored(self, names: Set[str]):
Path(CONFIG_DIR).mkdir(parents=True, exist_ok=True)
Path(ARCH_CONFIG_DIR).mkdir(parents=True, exist_ok=True)
ignored_list = [*names]
ignored_list.sort()

View File

@@ -17,7 +17,7 @@ from bauh.api.abstract.handler import TaskManager
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, CONFIG_DIR, AUR_INDEX_FILE, get_icon_path, database, \
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
from bauh.gems.arch.aur import URL_INDEX
from bauh.view.util.translation import I18n
@@ -275,7 +275,7 @@ class ArchCompilationOptimizer(Thread):
with open(GLOBAL_MAKEPKG) as f:
global_makepkg = f.read()
Path(CONFIG_DIR).mkdir(parents=True, exist_ok=True)
Path(ARCH_CONFIG_DIR).mkdir(parents=True, exist_ok=True)
custom_makepkg, optimizations = None, []