$ groups tty wheel cron audio games users portage $ ebuild /usr/portage/mail-filter/maildrop/maildrop-1.7.0.20040907.ebuild unpack Traceback (most recent call last): File "/usr/bin/ebuild", line 49, in ? a=portage.doebuild(pargs[0],x,getroot(),tmpsettings,debug=debug,cleanup=cleanup) File "/usr/lib/portage/pym/portage.py", line 2330, in doebuild os.chown(mysettings["BUILD_PREFIX"],portage_uid,portage_gid) OSError: [Errno 1] Operation not permitted: '/var/tmp/portage' $ emerge info Portage 2.0.51-r3 (default-linux/x86/2004.2/gcc34/2.6, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.10-rc1 i686) ================================================================= System uname: 2.6.10-rc1 i686 Intel(R) Pentium(R) 4 CPU 1.80GHz Gentoo Base System version 1.6.6 distcc 2.18.2 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.92.0.2-r1 Headers: sys-kernel/linux26-headers-2.6.8.1-r1 Libtools: sys-devel/libtool-1.5.2-r7 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache collision-protect cvs distcc distlocks parallel-fetch prelink sandbox sfperms sign strict userpriv usersandbox verify-rdepend" GENTOO_MIRRORS="http://gentoo.osuosl.org" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage/overlay" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="X apm arts avi berkdb bitmap-fonts crypt dba encode f77 fam foomaticdb fortran gd gd-external gdbm gif guile hal imlib java jpeg junit kde ldap libg++ libwww mikmod mmx mpeg ncurses nls pam pdflib perl png postgres python qt readline real samba sdl session slang spell sse ssl tcpd tiff truetype unicode x86 xml2 xmms xv zlib"
Still a problem?
yes. tvan@localhost /usr/portage/mail-mta/postfix $ ebuild postfix-2.2_beta20050218.ebuild unpack Traceback (most recent call last): File "/usr/bin/ebuild", line 49, in ? a=portage.doebuild(pargs[0],x,getroot(),tmpsettings,debug=debug,cleanup=cleanup) File "/usr/lib/portage/pym/portage.py", line 2407, in doebuild os.chown(mysettings["BUILD_PREFIX"],portage_uid,portage_gid) OSError: [Errno 1] Operation not permitted: '/var/tmp/portage'
interestingly it works great via the command line, but my little test script fails. skyfw@kyoto skyfw $ ./test.py Traceback (most recent call last): File "./test.py", line 4, in ? os.chown( "/var/tmp/portage",250,250) OSError: [Errno 1] Operation not permitted: '/var/tmp/portage' skyfw@kyoto skyfw $ chown portage:portage /var/tmp/portage skyfw@kyoto skyfw $ ./test.py Traceback (most recent call last): File "./test.py", line 4, in ? os.chown( "/var/tmp/portage",250,250) OSError: [Errno 1] Operation not permitted: '/var/tmp/portage' skyfw@kyoto skyfw $ cat test.py #!/usr/bin/python import os os.chown( "/var/tmp/portage",250,250)
Ah, found my mistake the chown from the shell was failing silently. a quickie C program turns up a OPERATION NOT PERMITTED return code.
Alec, you need to wrap the os.chown around something. if os.getuid() == 0 should be fine.
Hmm.. Unsure if solar had a bug for this as well or not, so I won't bother searching for a dupe. This is working in 2.0.51.22 though.
Regression? it doesn't work in 2.0.51.22-r1 skyfw@kyoto skyfw $ cd /usr/portage/net-misc/zssh skyfw@kyoto zssh $ ebuild zssh-1.5a.ebuild unpack Traceback (most recent call last): File "/usr/bin/ebuild", line 50, in ? a=portage.doebuild(pargs[0],x,getroot(),tmpsettings,debug=debug, cleanup=cleanup) File "/usr/lib/portage/pym/portage.py", line 2586, in doebuild os.chown(mysettings["BUILD_PREFIX"],portage_uid,portage_gid) OSError: [Errno 1] Operation not permitted: '/var/tmp/portage' skyfw@kyoto zssh $ groups wheel cron audio video games users slocate portage skyfw@kyoto zssh $ emerge info find: /etc/lprng: Permission denied ________________________________________________________________________________ cfg-update 1.7.1 : Building checksum index... failed! Permission denied : root only! ________________________________________________________________________________ Portage 2.0.51.22-r1 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.4. 20041102-r1, 2.6.10-gentoo-r6 i686) ================================================================= System uname: 2.6.10-gentoo-r6 i686 AMD Athlon(tm) XP 1800+ Gentoo Base System version 1.4.16 distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] dev-lang/python: 2.3.4-r1 sys-apps/sandbox: 1.1 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.4 sys-devel/binutils: 2.15.92.0.2-r7 sys-devel/libtool: 1.5.16 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="no" CBUILD="i686-pc-linux-gnu" CFLAGS="-mcpu=athlon-xp -march=athlon-xp -O3 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/ share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb / usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-mcpu=athlon-xp -march=athlon-xp -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig buildpkg confcache digest distlocks parallel-fetch sandbox sfperms strict userpriv usersandbox" GENTOO_MIRRORS="http://gentoo.chem.wisc.edu/gentoo ftp://gentoo.chem.wisc.edu/ gentoo" MAKEOPTS="-j2" PKGDIR="/home/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow X acpi alsa apm avi bash-completion berkdb bitmap-fonts bmp canna caps cdr cjk crypt curl dvd dvdr dvdread emboss encode esd ethereal fam foomaticdb fortran gdbm gif gpm gtk gtk2 imagemagick imap imlib ipv6 jpeg kde libg++ libwww lm_sensors mad maildir matroska mikmod mmx mono motif mp3 mpeg mysql ncurses nis nls nptl offensive ogg oggvorbis openal opengl pam pdflib perl png posix python qt quicktime readline real sdl spell sse ssl svg svga tcltk tcpd threads tiff truetype truetype-fonts type1-fonts vorbis wxwindows xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS skyfw@kyoto zssh $
That shouldn't have caused a traceback. It is wrapped in a try/except. It would be nice if you could debug why it did. The code at that was attempting to change permissions on the wrong directory however, so I've fixed that.
The try/except only catches ValueError. Fixing the incorrect directory reference fixed the bug.
Fixed on or before 2.0.51.22-r1
Looking through the batch of bugs, I'm not sure that some of these are actually fixed in stable. Others, the requirements have possibly changed after the initial fix was committed. If you think this bug has been closed incorrectly, please reopen or ask that it be reopened.