Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 305067 - Darwin 10: dev-lang/python-2.6: os.getgroups() fails as root
Summary: Darwin 10: dev-lang/python-2.6: os.getgroups() fails as root
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: AMD64 OS X
: High normal (vote)
Assignee: Gentoo Prefix
URL: http://bugs.python.org/issue7900
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-14 15:34 UTC by Artur Maciag
Modified: 2010-12-02 19:05 UTC (History)
0 users

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


Attachments
posixmodule patch (python-2.6-posixmodule.patch,4.78 KB, patch)
2010-02-14 15:56 UTC, Artur Maciag
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Artur Maciag 2010-02-14 15:34:19 UTC
With python-2.6.x, os.getgroups() causes an OSError exception

Reproducible: Always

Steps to Reproduce:
1.sudo su
2.startprefix
3.python -c 'import os; os.getgroups()'

Actual Results:  
Returns:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
OSError: [Errno 22] Invalid argument


Expected Results:  
Exit with no exception
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-02-14 15:51:14 UTC
(In reply to comment #0)
> 1.sudo su

Uh oh, Did you bootstrap as root? We generally don't recommend it and it is not very well tested. Anyway, does emerge --info work, please post that.
Comment 2 Artur Maciag 2010-02-14 15:56:20 UTC
Created attachment 219647 [details, diff]
posixmodule patch

Patch based on http://trac.macports.org/changeset/58151/trunk/dports/lang/python26/Portfile
Comment 3 Artur Maciag 2010-02-14 16:05:34 UTC
> Did you bootstrap as root? 
No, but I use python sometimes as root. 

$ emerge --info
Portage 2.2.00.15335-prefix (prefix/darwin/macos/10.6/x64, gcc-4.2.1, unavailable, 10.2.0 x86_64)
=================================================================
System uname: Darwin-10.2.0-x86_64-i386-64bit
Timestamp of tree: Sun, 14 Feb 2010 14:05:35 +0000
distcc 2.18.5-Apple.1 i386-apple-darwin10.0 (protocols 1 and 2) (default port 3632) [disabled]
app-shells/bash:     4.0_p37
dev-lang/python:     2.6.4
sys-devel/autoconf:  2.63-r01.1
sys-devel/automake:  1.10.2-r00.1, 1.11.1
sys-devel/gcc-config: 1.4.1-r00.2
sys-devel/libtool:   2.2.6b
ACCEPT_KEYWORDS="~x64-macos"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-apple-darwin10"
CFLAGS="-march=core2 -O2 -pipe"
CHOST="x86_64-apple-darwin10"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=core2 -O2 -pipe"
DISTDIR="/Gentoo/usr/portage/distfiles"
FEATURES="assume-digests collision-protect distlocks fixpackages news nostrip parallel-fetch preserve-libs protect-owned sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="pl_PL.UTF-8"
LDFLAGS=""
LINGUAS="pl en"
PKGDIR="/Gentoo/usr/portage/packages"
PORTAGE_CONFIGROOT="/Gentoo/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/Gentoo/var/tmp"
PORTDIR="/Gentoo/usr/portage"
PORTDIR_OVERLAY="/Gentoo/usr/local/portage"
SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"
USE="aqua berkdb coreaudio cracklib cxx gif ipv6 jpeg mmx mmxext modules mysql ncurses nls objc objc++ png prefix python readline sse sse2 ssl unicode x64-macos zlib" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="Darwin" INPUT_DEVICES="keyboard mouse" KERNEL="Darwin" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl en" RUBY_TARGETS="ruby18" USERLAND="GNU" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 4 Fabian Groffen gentoo-dev 2010-02-14 21:02:10 UTC
Snow Leopard problem
Comment 5 Fabian Groffen gentoo-dev 2010-02-26 17:23:22 UTC
is there an upstream bug for this problem?
Comment 6 Artur Maciag 2010-03-04 18:05:59 UTC
http://bugs.python.org/issue7900 still open
Comment 7 Fabian Groffen gentoo-dev 2010-12-02 19:05:30 UTC
should be in 2.7.1 the least