@pmatilai commented on this pull request.
> +#ifdef MACROFILES
+static char *initMacroPath(const char *confdir)
+{
+ return xstrdup(MACROFILES);
+}
+#else
+/*
+ * Prefer XDG_CONFIG_HOME/rpmmacros but fall back to ~/.rpmmacros
+ * if it exists and the XDG path doesn't.
+ */
+static char *initMacroPath(const char *confdir)
+{
+ const char *xdgconf = getenv("XDG_CONFIG_HOME");
+ if (!(xdgconf && *xdgconf))
+ xdgconf = "~/.config";
+ char *dotpath = rpmGetPath(xdgconf, "/rpmmacros", NULL);
Come to think of it, not just future: there's already ~/.rpmrc that we should
support in the new location too. Sigh :smile:
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2992#discussion_r1538670584
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/2992/review/1959458...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint