Skip to content

Commit

Permalink
fix(build: deps_lock; config): when using System Dynamic Users, use i…
Browse files Browse the repository at this point in the history
…ts dir instead of /tmp/ (fixes #610)
  • Loading branch information
actionless committed Dec 26, 2021
1 parent 99ad234 commit 18f746f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 1 addition & 4 deletions pikaur/build.py
Expand Up @@ -15,7 +15,7 @@
)
from .i18n import translate, translate_many
from .config import (
PikaurConfig,
BUILD_DEPS_LOCK, PikaurConfig,
AUR_REPOS_CACHE_PATH, BUILD_CACHE_PATH, PACKAGE_CACHE_PATH,
)
from .aur import get_repo_url, find_aur_packages
Expand Down Expand Up @@ -43,9 +43,6 @@
from .filelock import FileLock


BUILD_DEPS_LOCK = '/tmp/pikaur_build_deps.lock'


def debug(msg: Any) -> None:
print_debug(f"{color_line('build', 5)}: {str(msg)}")

Expand Down
5 changes: 5 additions & 0 deletions pikaur/config.py
Expand Up @@ -46,6 +46,11 @@
else:
AUR_REPOS_CACHE_PATH = os.path.join(DATA_ROOT, 'aur_repos')

if RUNNING_AS_ROOT:
BUILD_DEPS_LOCK = os.path.join(_USER_CACHE_HOME, 'pikaur_build_deps.lock')
else:
BUILD_DEPS_LOCK = '/tmp/pikaur_build_deps.lock'


def get_config_path() -> str:
config_flag = '--pikaur-config'
Expand Down

0 comments on commit 18f746f

Please sign in to comment.