[pacman-dev] [PATCH] Make bash-completion optional
The bash completion files were the only reason pacman was not able to
build as a non-root user. This patch adds the option to not install
these files. This was needed for my use case, hopefully upstream someone
else has a use for it as well.
Signed-off-by: Wouter Wijsman
On 5/7/20 2:45 PM, Wouter Wijsman wrote:
The bash completion files were the only reason pacman was not able to build as a non-root user. This patch adds the option to not install these files. This was needed for my use case, hopefully upstream someone else has a use for it as well.
The problem should only happen during install, not during build. I presume that it is trying to install to e.g. /usr/share/bash-completion/completions/pacman and raising a PermissionError? To find the correct install dir for the completions, it first tries to look at pkg-config to see where pkg-config says they should be installed. It then falls back on --datadir and installs to ${datadir}/bash-completion/completions/ If you have bash-completion installed and its pkg-config file points at a root-owned location you'll need root to install pacman. If you don't have bash-completion installed, then your custom prefix might not actually be picked up by bash-completion. I wonder what the right solution is here. In autotools land, ./configure --help has this to say: Some influential environment variables: [...] bashcompdir value of completionsdir for bash-completion, overriding pkg-config This is part of the builtin functionality of the pkg.m4 macros which autotools is using. meson doesn't directly support anything like this. -- Eli Schwartz Bug Wrangler and Trusted User
On Thu, 2020-05-07 at 15:21 -0400, Eli Schwartz wrote:
The problem should only happen during install, not during build. I presume that it is trying to install to e.g. /usr/share/bash-completion/completions/pacman and raising a PermissionError?
That is true, my bad, it only fails upon installation and only if you deny it root access. /usr/share/bash-completion is used regardless of prefix for both build systems, so I assumed that was intended, especially since it wouldn't work if it was in any other place. Kind regards, Wouter Wijsman
On 8/5/20 5:40 am, wwijsman@live.nl wrote:
On Thu, 2020-05-07 at 15:21 -0400, Eli Schwartz wrote:
The problem should only happen during install, not during build. I presume that it is trying to install to e.g. /usr/share/bash-completion/completions/pacman and raising a PermissionError?
That is true, my bad, it only fails upon installation and only if you deny it root access. /usr/share/bash-completion is used regardless of prefix for both build systems, so I assumed that was intended, especially since it wouldn't work if it was in any other place.
So the real error here that --prefix is ignored for bash-completion? It would be better to solve the problem than to work around it. A
participants (4)
-
Allan McRae
-
Eli Schwartz
-
Wouter Wijsman
-
wwijsman@live.nl