Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 63106 - portage does not detect insufficient privileges
Summary: portage does not detect insufficient privileges
Status: VERIFIED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: osx porters
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-07 02:52 UTC by Michal Suchanek
Modified: 2005-02-06 13:33 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Suchanek 2004-09-07 02:52:48 UTC
Emerge used to use sudo to perform requested operations but now it fails with an error. I am not aware of any setting I changed.
Also when it was using sudo it would request the password and succeed on some operations and just fail on others. ie emerge -s would fail
The error message when sudo is not used is quite misleading. The stable portage on GNU/Linux/ppc detects it does not have sufficient privileges and says so.

To make it clear: i would expect portage to use sudo whenever needed.
And I would expect emerge info to work without sudo.

$ emerge info



!!! Failed to complete portage imports. There are internal modules for
!!! portage and failure here indicates that you have a problem with your
!!! installation of portage. Please try a rescue portage located in the
!!! portage tree under '/usr/portage/sys-apps/portage/files/' (default).
!!! There is a README.rescue file that details the steps required to perform
!!! a recovery of portage.
    name 'red' is not defined


$ sudo emerge info
!!! Relying on the shell to locate gcc, this may break
!!! DISTCC, installing gcc-config and setting your current gcc
!!! profile will fix this
Portage 2.0.51_pre20 (default-macos-10.3, gcc-3.3, libsystem-7.1-r0, 7.5.0 Power Macintosh powerpc)
=================================================================
System uname: 7.5.0 Power Macintosh powerpc
macos-20040726
distcc 2.0.1-zeroconf powerpc-apple-darwin7.0 (protocol 1) (default port 3632) [disabled]
ccache version 2.2 [enabled]
Autoconf: sys-devel/autoconf-2.57
Automake: sys-devel/automake-1.6.3
Binutils: 
Headers:  
Libtools: 
ACCEPT_KEYWORDS="macos ~macos"
AUTOCLEAN="yes"
CFLAGS="-O2 -pipe"
CHOST="powerpc-apple-darwin"
COMPILER=""
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs buildpkg ccache collision-protect cvs fixpackages keepwork strict userpriv"
GENTOO_MIRRORS="http://gentoo.osuosl.org/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="macos perl linguas_C linguas_POSIX linguas_en_US linguas_en_US.UTF-8 linguas_cs_CZ linguas_cs_CZ.UTF-8"
Comment 1 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-09-07 23:44:49 UTC
Are you in portage group? I can't remember whether I added myself to it or not,
but if you want to run emerge with user privilege you need to be in portage group.
Comment 2 Brian Harring (RETIRED) gentoo-dev 2004-09-08 13:21:37 UTC
Check the permissions on /usr/lib/portage/pym please.

Sidenote, portage has _never_ used sudo calls.  It expects to be started w/ the appropriate permissions, and will complain if it lacks them (or if the user isn't part of the portage group)...
Comment 3 Nick Dimiduk (RETIRED) gentoo-dev 2004-09-09 15:25:49 UTC
The effect of portage calling sudo when the emerge command is issued is the result of an alias added to /etc/profile; there is no code in portage to detect the permissions of the calling user.  Portage is an administrative tool and thus intened to be used by system administrators.  The alias is simply a convienence.  I'm marking this bug as invalid because there is nothing broken.
Comment 4 Brian Harring (RETIRED) gentoo-dev 2004-09-10 00:06:40 UTC
Err... alias?  care to elaborate, since I've yet to see/here of it?
Just curious since the reporter didn't mention anything of it, and I haven't seen it so far in my osx adventures...
Comment 5 Michal Suchanek 2004-09-10 04:55:09 UTC
There is still the messsage the says that your portage is broken, not that your id  is invalid.
Comment 6 Nick Dimiduk (RETIRED) gentoo-dev 2004-10-20 13:45:53 UTC
Sorry for the delay.  The 2004-07 installer adds "alias emerge='sudo emerge'" to /etc/profile.  This is found in the post-install script.

My understanding is that the next installer will not need to make any additions to /etc/profile.
Comment 7 Hasan Khalil (RETIRED) gentoo-dev 2005-01-19 18:48:15 UTC
This is not a bug.

Emerge must be run as a superuser, which is done on mac os x via 'sudo'.
Adding `alias emerge="sudo emerge"` to /etc/profile may be an acceptable solution to some.
Comment 8 Hasan Khalil (RETIRED) gentoo-dev 2005-02-06 13:33:33 UTC
Closing out bugs that've been resolved for a while now...