[api] refactoring: caching directory for root user is now /var/cache/bauh

This commit is contained in:
Vinicius Moreira
2021-11-24 10:34:04 -03:00
parent f78498c1ec
commit aa889dcd51
18 changed files with 49 additions and 42 deletions

View File

@@ -1,19 +1,19 @@
import os
from pathlib import Path
from bauh.api.paths import CACHE_PATH, CONFIG_PATH, TEMP_DIR
from bauh.api.paths import CONFIG_PATH, TEMP_DIR, CACHE_PATH
from bauh.commons import resource
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
BUILD_DIR = '{}/arch'.format(TEMP_DIR)
ARCH_CACHE_PATH = CACHE_PATH + '/arch'
CATEGORIES_FILE_PATH = ARCH_CACHE_PATH + '/categories.txt'
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 = '{}/.config/bauh/arch'.format(str(Path.home()))
CUSTOM_MAKEPKG_FILE = '{}/makepkg.conf'.format(CONFIG_DIR)
AUR_INDEX_FILE = '{}/aur/index.txt'.format(ARCH_CACHE_PATH)
AUR_INDEX_TS_FILE = '{}/aur/index.ts'.format(ARCH_CACHE_PATH)
AUR_INDEX_FILE = f'{ARCH_CACHE_PATH}/aur/index.txt'
AUR_INDEX_TS_FILE = f'{ARCH_CACHE_PATH}/aur/index.ts'
CONFIG_FILE = '{}/arch.yml'.format(CONFIG_PATH)
SUGGESTIONS_FILE = 'https://raw.githubusercontent.com/vinifmor/bauh-files/master/arch/aur_suggestions.txt'
UPDATES_IGNORED_FILE = '{}/updates_ignored.txt'.format(CONFIG_DIR)