mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-10 12:14:16 +02:00
[arch] feature: allowing AUR packages to be installed when bauh is launched by the root user
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
from bauh import __app_name__
|
||||
from bauh.api.paths import CONFIG_DIR, TEMP_DIR, CACHE_DIR
|
||||
from bauh.api.paths import CONFIG_DIR, TEMP_DIR, CACHE_DIR, get_temp_dir
|
||||
from bauh.commons import resource
|
||||
|
||||
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
BUILD_DIR = f'{TEMP_DIR}/arch'
|
||||
ARCH_CACHE_DIR = f'{CACHE_DIR}/arch'
|
||||
CATEGORIES_FILE_PATH = f'{ARCH_CACHE_DIR}/categories.txt'
|
||||
URL_CATEGORIES_FILE = f'https://raw.githubusercontent.com/vinifmor/{__app_name__}-files/master/arch/categories.txt'
|
||||
@@ -21,6 +21,10 @@ 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_pkgbuild_dir(user: Optional[str] = None) -> str:
|
||||
return f'{get_temp_dir(user) if user else TEMP_DIR}/arch'
|
||||
|
||||
|
||||
def get_icon_path() -> str:
|
||||
return resource.get_path('img/arch.svg', ROOT_DIR)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user