Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 130395 - sys-apps/portage-2.1_pre7-r5 does not work with PORTAGE_TMPDIR set to anything but /var/tmp
Summary: sys-apps/portage-2.1_pre7-r5 does not work with PORTAGE_TMPDIR set to anythin...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, REGRESSION
Depends on:
Blocks: 115839
  Show dependency tree
 
Reported: 2006-04-18 11:52 UTC by Thomas Raschbacher
Modified: 2006-05-07 23:08 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 Thomas Raschbacher gentoo-dev 2006-04-18 11:52:48 UTC
Cannot emerge any packages with PORTAGE_TMPDIR set to anything but /var/tmp
2.1_pre3-r1 works fine. (hope it is not a dup. bug but i couldn't find anything like this)

command + output:

desktop ~ # PORTAGE_TMPDIR=/mnt/space/Portage/tmp emerge portage
Calculating dependencies... done!
>>> Emerging (1 of 1) sys-apps/portage-2.1_pre7-r5 to /
Traceback (most recent call last):
  File "/usr/bin/emerge", line 3385, in ?
    mydepgraph.merge(pkglist)
  File "/usr/bin/emerge", line 2018, in merge
    retval=portage.doebuild(y,"clean",myroot,self.pkgsettings,edebug,cleanup=1,tree="porttree")
  File "/usr/lib/portage/pym/portage.py", line 2734, in doebuild
    mystatus = prepare_build_dirs(myroot, mysettings, cleanup)
  File "/usr/lib/portage/pym/portage.py", line 2529, in prepare_build_dirs
    shutil.rmtree(clean_dir)
  File "/usr/lib/python2.4/shutil.py", line 172, in rmtree
    onerror(os.rmdir, path, sys.exc_info())
  File "/usr/lib/python2.4/shutil.py", line 170, in rmtree
    os.rmdir(path)
OSError: [Errno 20] Not a directory: '/mnt/space/Portage/tmp/portage/homedir'


emerge info output:

distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.2.3-r5, 2.3.5, 2.4.2-r1
sys-apps/sandbox:    1.2.9
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.15.92.0.2-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-mtune=athlon-xp -O3 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-mtune=athlon-xp -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache cvs distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/mnt/space/Portage/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/mnt/space/Portage/cvs-tree/gentoo-x86"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 16bit 3dnow 3dnowext 3ds 7zip X X509 Xaw3d a52 aac aalib acpi aim allegro alsa amarok amd anthy ao aotuv apache2 apm applet aqua_theme ares asf asm asterisk async atlas atm authdaemond automount avahi avi bash-completion bcmath bdf beep berkdb bidi bigpatch bitmap-fonts bl blas blender-game boo browserplugin buffysize buttons c++ cairo capi caps carbone_theme ccache cdda cddb cdf cdinstall cdio cdparanoia cdr cdrom cegui cg chipcard chroot cid cjk clamav clamd clanJavaScript clanVoice cle266 cln clock-screen command-args corba cpdflib cpudetection cpulimit crypt css csv ctype cups curlwrappers customlog cvsgraph daap dbus dga divx4linux dri dts dv dvb dvd dvdr dvdread dvi edl eds emacs emboss encode esd estraier fbcon ffmpeg flac foomaticdb fortran fping fpx gdbm ggi gif glibc-compat20 glitz gnome gnutls gpm graphviz gstreamer gtk gtk2 gzip hal httpd imap imlib ipv6 isdnlog jbig joystick jpeg krb4 leim lesstif libcaca libg++ libwww lirc live lzo mad maildir matroska mbox migemo mikmod mmx mod motif mozcalendar mozdevelop mozsvg mozxmlterm mp3 mpeg mplayer ncurses nethack network neural new-login nfs nls nptl nsplugin nvidia ogg oggvorbis opengl oss pam pdflib perl png pppd python qt quicktime rar readline real rtc samba screen sdl shout silc skins speex spell sse ssl stream subtitles svg svga tcpd tga theora thumbnail truetype truetype-fonts type1-fonts unicode userlocales v4l v4l2 vcd vidix vlm vorbis win32codecs wxwindows x11vnc xanim xatrix xattr xbase xchattext xemacs xface xforms xfs xim xinetd xlockrc xml2 xmlrpc xmms xosd xpm xrandr xscreensaver xsl xslt xv xvmc yahoo yv12 zip zlib zvbi elibc_glibc kernel_linux userland_GNU"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 1 Zac Medico gentoo-dev 2006-04-18 12:14:28 UTC
(In reply to comment #0)
>   File "/usr/lib/portage/pym/portage.py", line 2529, in prepare_build_dirs
>     shutil.rmtree(clean_dir)
>   File "/usr/lib/python2.4/shutil.py", line 172, in rmtree
>     onerror(os.rmdir, path, sys.exc_info())
>   File "/usr/lib/python2.4/shutil.py", line 170, in rmtree
>     os.rmdir(path)
> OSError: [Errno 20] Not a directory: '/mnt/space/Portage/tmp/portage/homedir'

From the exception, it looks like '/mnt/space/Portage/tmp/portage/homedir' exists but isn't a directory.  That seems like an odd case (it should work if you remove that file).  Anyway, I'll fix it so that exception is handled properly...
Comment 2 Thomas Raschbacher gentoo-dev 2006-04-23 12:49:53 UTC
actually that is a directory (it is used by the older portage version i'm currently using)
for some reason it dosn't think it is a directory in the latest one. (unfortunately i didn't have time yet to look at that code and it's been a while since I read portage.py  anyway ;))
Comment 3 Thomas Raschbacher gentoo-dev 2006-05-07 09:14:32 UTC
actually I just noticed that in fact homedir is NOT a directory but a symlink to a directory. IMHO portage should check if it is a symlink and if so check if the target is a directory.
Comment 4 Zac Medico gentoo-dev 2006-05-07 15:35:07 UTC
(In reply to comment #3)
> actually I just noticed that in fact homedir is NOT a directory but a symlink
> to a directory. IMHO portage should check if it is a symlink and if so check if
> the target is a directory.

Well, portage was trying to recursively remove the directory in order to ensure a clean state.  Why do you have a symlink there?  I'd like to move homedir one level deeper, into $PORTAGE_BUILDDIR, so that each build gets it's own unique homedir.
Comment 5 Zac Medico gentoo-dev 2006-05-07 18:36:10 UTC
(In reply to comment #4)
> I'd like to move homedir one level deeper, into $PORTAGE_BUILDDIR, so that each 
> build gets it's own unique homedir.

I went ahead and moved it to $PORTAGE_BUILDDIR/homedir in svn r3330 so now you now you can do whatever you like with $PORTAGE_TMPDIR/portage/homedir because it's no longer used by portage. :)
Comment 6 Zac Medico gentoo-dev 2006-05-07 23:08:30 UTC
This has been release in 2.1_pre10-r4.