Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XDG variables / config-settings confusion #801

Closed
Baerbeisser opened this issue May 31, 2024 · 2 comments · Fixed by #806
Closed

XDG variables / config-settings confusion #801

Baerbeisser opened this issue May 31, 2024 · 2 comments · Fixed by #806

Comments

@Baerbeisser
Copy link

Baerbeisser commented May 31, 2024

pikaur -Sy

Prerequisites:

environment set to:
XDG_CACHE_HOME=$HOME/.local/tmp
XDG_DATA_HOME=$HOME/.local/data

Description:

every time you run pikaur,

cachepath = $HOME/.cache
datapath = $HOME/.local/share

gets addded to pikaur.conf independ of your XDG variables and it then uses cachepath for cache.
Curiously, it then still uses ~/.local/data/pikaur for aur_repos.

So, in summary:

  • XDG_CACHE_HOME gets ignored for config
    • cachepath in config gets used
  • XDG_DATA_HOME gets ignored for config
    • but used for repo backups
@Baerbeisser Baerbeisser changed the title use XDG variables for config XDG variables / config-settings confusion May 31, 2024
@actionless
Copy link
Owner

@samuel-jimenez , please communicate with @Baerbeisser how to fix that, otherwise i'll have to unmerge your PR (#796)

@samuel-jimenez
Copy link
Contributor

The order of resolution is:

  1. Command line options (--xdg-cache-home)
  2. Environment variables (XDG_CACHE_HOME)
  3. Config setting (cachepath = ..)

So the config setting should not matter if an environment variable is set.

Part of the pikaur operation is to call itself with sudo and command line options. In this step, the incorrect cachepath is used.

I will look around to find a fix.

actionless pushed a commit that referenced this issue Jun 15, 2024
* Prefer environment variables over config

* Sync default config values
justinnhli added a commit to justinnhli/dotfiles that referenced this issue Jun 16, 2024
These values are ignored if XDG* environment variables are set.
See actionless/pikaur#801
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants