16 May
2018
16 May
'18
4:41 a.m.
On 16/05/18 01:46, Dave Reisner wrote:
On Tue, May 15, 2018 at 11:13:09AM -0400, Eli Schwartz wrote:
In commit 5698d7b66daa2a0bc99cab7a989cef1c806c3bf6 a new non-root use of pacman was added -- previously we used -T or -Qq, and run_pacman did not know how to special-case -Qi to skip being prepended with sudo.
Can we just be explicit about when we do and don't need elevated privileges rather than trying to guess? Surely the caller knows the requirements a priori.
Are you thinking two functions? One for root, one not? Or a helper function as_root() that does the su/sudo part? Or a function parameter for root usage? Either way, I think the current patch is fine for 5.1. Bigger change can happen later. A