mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 20:54:15 +02:00
[api.paths] refactoring: CACHE_PATH renamed to CACHE_DIR
This commit is contained in:
@@ -2,7 +2,7 @@ import os
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
|
||||
from bauh.api.paths import CONFIG_DIR, TEMP_DIR, CACHE_PATH
|
||||
from bauh.api.paths import CONFIG_DIR, TEMP_DIR, CACHE_DIR
|
||||
from bauh.commons import resource
|
||||
|
||||
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
@@ -14,7 +14,7 @@ APPIMAGE_CONFIG_DIR = f'{CONFIG_DIR}/appimage'
|
||||
UPDATES_IGNORED_FILE = f'{APPIMAGE_CONFIG_DIR}/updates_ignored.txt'
|
||||
SYMLINKS_DIR = '{}/.local/bin'.format(str(Path.home()))
|
||||
URL_COMPRESSED_DATABASES = 'https://raw.githubusercontent.com/vinifmor/bauh-files/master/appimage/dbs.tar.gz'
|
||||
APPIMAGE_CACHE_PATH = f'{CACHE_PATH}/appimage'
|
||||
APPIMAGE_CACHE_PATH = f'{CACHE_DIR}/appimage'
|
||||
DATABASE_APPS_FILE = f'{APPIMAGE_CACHE_PATH}/apps.db'
|
||||
DATABASE_RELEASES_FILE = f'{APPIMAGE_CACHE_PATH}/releases.db'
|
||||
DATABASES_TS_FILE = f'{APPIMAGE_CACHE_PATH}/dbs.ts'
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import os
|
||||
|
||||
from bauh.api.paths import CONFIG_DIR, TEMP_DIR, CACHE_PATH
|
||||
from bauh.api.paths import CONFIG_DIR, TEMP_DIR, CACHE_DIR
|
||||
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_PATH}/arch'
|
||||
ARCH_CACHE_PATH = f'{CACHE_DIR}/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'
|
||||
|
||||
@@ -7,10 +7,10 @@ from logging import Logger
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
|
||||
from bauh.api.paths import CACHE_PATH
|
||||
from bauh.api.paths import CACHE_DIR
|
||||
from bauh.commons.system import ProcessHandler
|
||||
|
||||
SYNC_FILE = f'{CACHE_PATH}/arch/db_sync'
|
||||
SYNC_FILE = f'{CACHE_DIR}/arch/db_sync'
|
||||
|
||||
|
||||
def should_sync(arch_config: dict, aur_supported: bool, handler: Optional[ProcessHandler], logger: logging.Logger):
|
||||
|
||||
@@ -6,9 +6,9 @@ from datetime import datetime
|
||||
from logging import Logger
|
||||
from pathlib import Path
|
||||
|
||||
from bauh.api.paths import CACHE_PATH
|
||||
from bauh.api.paths import CACHE_DIR
|
||||
|
||||
SYNC_FILE = f'{CACHE_PATH}/arch/mirrors_sync'
|
||||
SYNC_FILE = f'{CACHE_DIR}/arch/mirrors_sync'
|
||||
|
||||
|
||||
def should_sync(logger: logging.Logger):
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import os
|
||||
|
||||
from bauh.api.paths import CONFIG_DIR, CACHE_PATH
|
||||
from bauh.api.paths import CONFIG_DIR, CACHE_DIR
|
||||
from bauh.commons import resource
|
||||
|
||||
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
SNAP_CACHE_PATH = f'{CACHE_PATH}/snap'
|
||||
SNAP_CACHE_PATH = f'{CACHE_DIR}/snap'
|
||||
CONFIG_FILE = f'{CONFIG_DIR}/snap.yml'
|
||||
CATEGORIES_FILE_PATH = f'{SNAP_CACHE_PATH}/categories.txt'
|
||||
URL_CATEGORIES_FILE = 'https://raw.githubusercontent.com/vinifmor/bauh-files/master/snap/categories.txt'
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from bauh.api.paths import DESKTOP_ENTRIES_DIR, CONFIG_DIR, TEMP_DIR, CACHE_PATH
|
||||
from bauh.api.paths import DESKTOP_ENTRIES_DIR, CONFIG_DIR, TEMP_DIR, CACHE_DIR
|
||||
from bauh.commons import resource
|
||||
from bauh.commons.util import map_timestamp_file
|
||||
|
||||
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
WEB_PATH = '{}/.local/share/bauh/web'.format(Path.home())
|
||||
WEB_CACHE_PATH = f'{CACHE_PATH}/web'
|
||||
WEB_CACHE_PATH = f'{CACHE_DIR}/web'
|
||||
INSTALLED_PATH = '{}/installed'.format(WEB_PATH)
|
||||
ENV_PATH = '{}/env'.format(WEB_PATH)
|
||||
FIXES_PATH = '{}/fixes'.format(WEB_PATH)
|
||||
|
||||
Reference in New Issue
Block a user