Install scriptlets source root users .bashrc when pacman is run through sudo

Andrew Gregory andrew.gregory.8 at gmail.com
Sat Nov 6 20:34:18 UTC 2021


On 11/06/21 at 09:08pm, brainpower wrote:
> Am 06.11.21 um 19:15 schrieb Andrew Gregory:
> > bash thinks it's being run remotely because we connect to the child over
> > sockets.
> 
> oh, right, that makes sense... I knew I was missing something rather obvious. :/
> (I shouldn't have just skimmed the manpage after all... I missed it b/c I was only looking for the word "interactive", which isn't in that paragraph)
> 
> 
> But what I'm still not quite getting is,
> what's the difference of pacman being run by sudo vs. directly?
> Shouldn't bash also think the sockets were remote if pacman is not run using sudo?
> 
> But it probably can detect somehow that it runs inside a interactive zsh when pacman is run directly,
> while there is no shell running between sudo and pacman when running it using sudo...
> or something like that.
> 
> Well mystery somewhat solved, thanks for pointing me in the right direction.

I'd guess it's because it also checks for $SHLVL < 2.


More information about the pacman-dev mailing list