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

xbps-src: allow loading xbp-src.conf from XDG compliant dirs #21746

Merged
merged 1 commit into from
May 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ If you don't want to waste your time building everything from scratch probably i

The `etc/defaults.conf` file contains the possible settings that can be overridden
through the `etc/conf` configuration file for the `xbps-src` utility; if that file
does not exist, will try to read configuration settings from `~/.xbps-src.conf`.
does not exist, will try to read configuration settings from `$XDG_CONFIG_HOME/xbps-src.conf`, `~/.config/xbps-src.conf`, `~/.xbps-src.conf`.

If you want to customize default `CFLAGS`, `CXXFLAGS` and `LDFLAGS`, don't override
those defined in `etc/defaults.conf`, set them on `etc/conf` instead i.e:
Expand Down
2 changes: 2 additions & 0 deletions xbps-src
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,8 @@ else
elif [ -s $XBPS_DISTDIR/etc/conf ]; then
# ... otherwise read generic user configuration...
readonly XBPS_CONFIG_FILE=$XBPS_DISTDIR/etc/conf
elif [ -s ${XDG_CONFIG_HOME:-$HOME/.config}/xbps-src.conf ]; then
readonly XBPS_CONFIG_FILE=${XDG_CONFIG_HOME:-$HOME/.config}/xbps-src.conf
elif [ -s $HOME/.xbps-src.conf ]; then
# ... fallback to ~/.xbps-src.conf otherwise.
readonly XBPS_CONFIG_FILE=$HOME/.xbps-src.conf
Expand Down