From: Johnnynator <Johnnynator@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] xbps-src: allow loading xbp-src.conf from XDG compliant dirs
Date: Fri, 08 May 2020 16:14:12 +0200 [thread overview]
Message-ID: <20200508141412.i6s7w8RmMkfi_cc1BEM_rAYhq-JCKvWYUk6Py41oTkA@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-21746@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 358 bytes --]
There is an updated pull request by Johnnynator against master on the void-packages repository
https://github.com/Johnnynator/void-packages xdg
https://github.com/void-linux/void-packages/pull/21746
xbps-src: allow loading xbp-src.conf from XDG compliant dirs
None
A patch file from https://github.com/void-linux/void-packages/pull/21746.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-xdg-21746.patch --]
[-- Type: text/x-diff, Size: 1754 bytes --]
From e4c7789d85a16104a8397a99046b9dbcee2db6e7 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Fri, 8 May 2020 16:09:48 +0200
Subject: [PATCH] xbps-src: allow loading xbp-src.conf from XDG compliant dirs
---
README.md | 2 +-
xbps-src | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 752fb3d4fdc..3dffd2b4511 100644
--- a/README.md
+++ b/README.md
@@ -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:
diff --git a/xbps-src b/xbps-src
index 68765b6c248..20319101128 100755
--- a/xbps-src
+++ b/xbps-src
@@ -428,6 +428,10 @@ 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/xbps-src.conf ]; then
+ readonly XBPS_CONFIG_FILE=$XDG_CONFIG_HOME/xbps-src.conf
+ elif [ -s $HOME/.config/xbps-src.conf ]; then
+ readonly XBPS_CONFIG_FILE=$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
next prev parent reply other threads:[~2020-05-08 14:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-08 14:12 [PR PATCH] " Johnnynator
2020-05-08 14:14 ` Johnnynator [this message]
2020-05-08 16:33 ` Chocimier
2020-05-08 16:46 ` [PR PATCH] [Updated] " Johnnynator
2020-05-08 22:16 ` [PR PATCH] [Merged]: " Johnnynator
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200508141412.i6s7w8RmMkfi_cc1BEM_rAYhq-JCKvWYUk6Py41oTkA@z \
--to=johnnynator@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).