-
Notifications
You must be signed in to change notification settings - Fork 386
Respect XDG_CONFIG_HOME #2153
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
Comments
It's not a new idea nor a bad one, the last time it was proposed the whole XDG thing was so new I remember being wary whether this new thing'll actually catch on at all 😅 The "problem" is that rpmrc and macros loading is handled as a simple |
Look for per-user macros primarily in ${XDG_CONFIG_HOME}/rpmmacros but fall back to traditional ~/.rpmmacros iff it exists and there's no config in the XDG location. As per the XDG spec, if ${XDG_CONFIG_HOME} is not set, it defaults to ~/.config Fixes: rpm-software-management#2153
Look for per-user macros primarily in ${XDG_CONFIG_HOME}/rpmmacros but fall back to traditional ~/.rpmmacros iff it exists and there's no config in the XDG location. As per the XDG spec, if ${XDG_CONFIG_HOME} is not set, it defaults to ~/.config Fixes: rpm-software-management#2153
Look for per-user macros primarily in ${XDG_CONFIG_HOME}/rpmmacros but fall back to traditional ~/.rpmmacros iff it exists and there's no config in the XDG location. As per the XDG spec, if ${XDG_CONFIG_HOME} is not set, it defaults to ~/.config Fixes: rpm-software-management#2153
Look for per-user macros primarily in ${XDG_CONFIG_HOME}/rpmmacros but fall back to traditional ~/.rpmmacros iff it exists and there's no config in the XDG location. As per the XDG spec, if ${XDG_CONFIG_HOME} is not set, it defaults to ~/.config As a side-effect of this change, always allocate the macrofiles path, previously it was sometimes allocated and sometimes not. Fixes: rpm-software-management#2153
Look for per-user macros primarily in ${XDG_CONFIG_HOME}/rpmmacros but fall back to traditional ~/.rpmmacros iff it exists and there's no config in the XDG location. As per the XDG spec, if ${XDG_CONFIG_HOME} is not set, it defaults to ~/.config As a side-effect of this change, always allocate the macrofiles path, previously it was sometimes allocated and sometimes not. Fixes: rpm-software-management#2153
Look for per-user rpm configugration primarily in ${XDG_CONFIG_HOME}/rpm but fall back to traditional ~/.rpmmacros and ~/.rpmrc iff either exists and the new XDG directory doesn't. This way we only advertise the old setup in 'rpm --showrc' for old users, new users only ever see the new path. As per the XDG spec, if ${XDG_CONFIG_HOME} is not set, it defaults to ~/.config Fixes: rpm-software-management#2153
Look for per-user rpm configugration primarily in ${XDG_CONFIG_HOME}/rpm but fall back to traditional ~/.rpmmacros and ~/.rpmrc iff either exists and the new XDG directory doesn't. This way we only advertise the old setup in 'rpm --showrc' for old users, new users only ever see the new path. As per the XDG spec, if ${XDG_CONFIG_HOME} is not set, it defaults to ~/.config Fixes: rpm-software-management#2153
Look for per-user rpm configugration primarily in ${XDG_CONFIG_HOME}/rpm but fall back to traditional ~/.rpmmacros and ~/.rpmrc iff either exists and the new XDG directory doesn't. This way we only advertise the old setup in 'rpm --showrc' for old users, new users only ever see the new path. As per the XDG spec, if ${XDG_CONFIG_HOME} is not set, it defaults to ~/.config Fixes: #2153
rpm looks for
.rpmmacros
in~/
but should probably look for anrpmmacros
file in$HOME/.config
instead.From https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html:
The text was updated successfully, but these errors were encountered: