Summary
chicken-install -s should not use sudo if it is not necessary
Metadata
- Id: 53998a5b5ca6a45bf686fce64129fc04b7286dff
- Trac id: 1113
- Type: defect
- Reporter: ckeen
- Owner:
- Cc:
- Status: closed
- Component: unknown
- Estimated difficulty: hard
- Resolution: wontfix
- Priority: major
- Milestone: someday
- Version: 4.8.x
- Changetime: 2023-11-06 23:46:02 UTC
- Created: 2014-04-17 14:21:13 UTC
- Keywords: chicken-install, sudo
Description
Currently chicken-install -s unconditionally invokes sudo which installs eggs with root permissions even in the case of local installs, i.e. in your own home directory.
I would expect it to be smarter and use only sudo if the current permissions aren't enough to install an egg.
Changes and comments
[2014-06-25 15:26:37 UTC] ckeen changed description
[2014-06-25 15:32:13 UTC] ecloud wrote:
That would be a nice feature. Or maybe chicken-install could automatically do that even without the -s parameter, only if current permissions are not enough. It could ask first, but sudo already involves asking first unless sudo was run recently.
The issue is that a regular Linux user getting chicken from distro packages will have chicken in /usr/bin, but (s)he will not necessarily have all the eggs from distro packages. It's nice to be able to run chicken-install as a normal user. As an egg developer, I do chmod a+w /usr/lib/chicken/7 so that I can install my own eggs frequently. So I don't want to have a pattern of requiring root permission to install every egg, but there are a few that install tools in /usr/bin (chicken-doc and chicken-wrap for example), and that is the only case when I would like chicken-install to use sudo.