FS#19967 - pacman should check if /sbin is in path

Attached to Project: Pacman
Opened by David Watzke (dwatzke) - Friday, 25 June 2010, 09:29 GMT
Last edited by Allan McRae (Allan) - Tuesday, 29 June 2010, 05:44 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description: pacman should check if /sbin and /usr/sbin is in path - problem is when it isn't there and user sets his own PATH without sbin dirs (/sbin and /usr/sbin) in it and calls sudo pacman -S glibc (just for example) this happens:

(1/1) upgrading glibc [######################] 100%
/tmp/alpm_NjqEZT/.INSTALL: line 6: ldconfig: command not found
/tmp/alpm_NjqEZT/.INSTALL: line 7: init: command not found

I don't think that user should have sbin dirs in his PATH. We (users) should be able to decide.


Additional info:
* package version(s): recent pacman 3.4.0-2

Steps to reproduce:

export PATH="~/bin:/usr/local/bin:/bin:/usr/bin"
sudo pacman -S glibc
This task depends upon

Closed by  Allan McRae (Allan)
Tuesday, 29 June 2010, 05:44 GMT
Reason for closing:  Not a bug
Additional comments about closing:  This is a packaging and not a pacman one.
Comment by Allan McRae (Allan) - Saturday, 26 June 2010, 05:36 GMT
This is not a pacman bug. If anything it is a packaging error in the glibc install script.

It could also be argued that if you are installing packages or updating a system then you are not a "user" but and "administrator" and would be expected to have /sbin in your path.
Comment by David Watzke (dwatzke) - Saturday, 26 June 2010, 09:15 GMT
The question is: do we want to support sudo? If we do, the easiest way (I can think of) would be to check the PATH for sbin dirs and add them if they're not already there, because glibc is probably far from being the only affected package.
Comment by Allan McRae (Allan) - Monday, 28 June 2010, 12:24 GMT
pacman does explicitly call sbin/ldconfig so this is not a pacman bug. Any error in assuming sbin is in the PATH is a packaging error.
Comment by David Watzke (dwatzke) - Monday, 28 June 2010, 13:02 GMT
okay, good, so in the next release of glibc, could anyone please fix this issue? thanks
Comment by Allan McRae (Allan) - Tuesday, 29 June 2010, 05:43 GMT
glibc fixed on trunk: http://repos.archlinux.org/wsvn/packages?op=comp&compare[]=%2Fglibc%2Ftrunk@83855&compare[]=%2Fglibc%2Ftrunk@84320

Please open bug reports in the Arch section for any other packages you find issues with.

Loading...