Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 146412 - emerge and env-update bug
Summary: emerge and env-update bug
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
: 146413 (view as bug list)
Depends on:
Blocks: 136244
  Show dependency tree
 
Reported: 2006-09-05 09:17 UTC by Kamil Neczaj
Modified: 2006-09-06 14:20 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 Kamil Neczaj 2006-09-05 09:17:58 UTC
Sorry, for my english

When I emerge something, after merging operation I get this bug instead of
"env-update && source /etc/profile" operation:

----------------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/bin/emerge", line 3545, in ?
    mydepgraph.merge(pkglist)
  File "/usr/bin/emerge", line 2075, in merge
    retval=portage.doebuild(y,"merge",myroot,self.pkgsettings,edebug,tree="porttree")
  File "/usr/lib/portage/pym/portage.py", line 3060, in doebuild
    vartree=vartree, prev_mtimes=prev_mtimes)
  File "/usr/lib/portage/pym/portage.py", line 3269, in merge
    mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib/portage/pym/portage.py", line 6744, in merge
    cleanup=cleanup, mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib/portage/pym/portage.py", line 6432, in treewalk
    target_root=self.settings["ROOT"], prev_mtimes=prev_mtimes)
  File "/usr/lib/portage/pym/portage.py", line 570, in env_update
    if myconfig.has_key(myspec):
AttributeError: 'NoneType' object has no attribute 'has_key'
-------------------------------------------------------------------------------

Also when I do "env-update" I get bug:
-------------------------------------------------------------------------------
kamiln kamil # env-update
Traceback (most recent call last):
  File "/usr/sbin/env-update", line 29, in ?
    portage.env_update(makelinks)
  File "/usr/lib/portage/pym/portage.py", line 570, in env_update
    if myconfig.has_key(myspec):
AttributeError: 'NoneType' object has no attribute 'has_key'
-------------------------------------------------------------------------------

I got those bugs first time when I installed sun-jdk-1.4.2.12 and sun-jdk-1.5.0.08.

It's my /etc/env.d/java/20sun-jdk-1.4.2.12 file maybe it will be useful: 
-------------------------------------------------------------------------------
Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/sun-jdk/files/sun-jdk-1.4.env,v 1.1$

VERSION="Sun JDK 1.4.2.12"
JAVA_HOME=/opt/sun-jdk-1.4.2.12
JDK_HOME=/opt/sun-jdk-1.4.2.12
JAVAC=${JAVA_HOME}/bin/javac
PATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin:${JAVA_HOME}/jre/javaws"
ROOTPATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin:${JAVA_HOME}/jre/javaws"
LDPATH="${JAVA_HOME}/jre/lib/i386/:${JAVA_HOME}/jre/lib/i386/native_threads/:${$
MANPATH="/opt/sun-jdk-1.4.2.12/man"



GENERATION="2"
ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH"
VMHANDLE="sun-jdk-1.4"
-------------------------------------------------------------------------------


# emerge --info
Portage 2.1-r2 (default-linux/x86/2006.0, gcc-3.4.4, glibc-2.3.5-r2, 2.6.16-suspend2-r8 i686)
=================================================================
System uname: 2.6.16-suspend2-r8 i686 Intel(R) Celeron(R) CPU 2.00GHz
Gentoo Base System version 1.6.14
ccache version 2.3 [enabled]
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.4.2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.12
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.6-r1
sys-devel/binutils:  2.16.1
sys-devel/gcc-config: 1.3.12-r6
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=pentium4 -mfpmath=sse -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O3 -march=pentium4 -mfpmath=sse -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer sfperms strict"
GENTOO_MIRRORS="http://gentoo.prz.rzeszow.pl http://gentoo.po.opole.pl http://ftp.ucsb.edu/pub/mirrors/linux/gentoo"
LANG="pl_PL"
LC_ALL="pl_PL"
LINGUAS="pl en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 X acpi alsa apache2 apm arts automount avahi avi bash-completion beagle berkdb bitmap-fonts bluetooth browserplugin bzip2 cdr cli crypt cups dbus dlloader dri dvd eds emboss encode esd f77 firefox foomaticdb fortran gd gdbm gif gnome gpm gstreamer gtk gtk2 hal imlib ipv6 isdnlog java jpeg kde kerberos krb4 lcms libclamav libg++ libwww mad mikmod mmx mono motif mp3 mpeg ncurses nls nptl nsplugin nvidia ogg oggvorbis openal opengl pam pcre pdf pdflib perl png pppd python qt qt3 qt4 quicktime readline reflection samba sdl session spell spl sse sse2 ssl svga symlink tcpd tiff truetype truetype-fonts type1-fonts udev unicode usb vcd videos vorbis win32codecs wmf xml xml2 xmms xorg xpm xprint xv xvid zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux linguas_pl linguas_en userland_GNU video_cards_nvidia video_cards_vesa video_cards_fbdev"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Carsten Lohrke (RETIRED) gentoo-dev 2006-09-05 09:32:12 UTC
*** Bug 146413 has been marked as a duplicate of this bug. ***
Comment 2 Zac Medico gentoo-dev 2006-09-05 11:20:48 UTC
It seems that portage is getting an IOError when it tries to read one of the files in /etc/env.d/.  See if you get any interesting output from the following command:

for x in /etc/env.d/*; do [ -f "${x}" ] && cat "${x}" >/dev/null; done
Comment 3 Zac Medico gentoo-dev 2006-09-05 12:00:42 UTC
This was fixed to raise the IOError in svn r4052 (about a month ago) and has been released prior to 2.1.1_rc*.
Comment 4 Kamil Neczaj 2006-09-06 09:22:30 UTC
I just have fixed this bug by myself. In /etc/env.d/ was symbolic link, called 20sun-jdk-1.4.2.10, to /etc/env.d/java/20sun-jdk-1.4.2.10, which doesn't exist. 

Before this bug started showing I had installed sun-jdk-1.4.2.10. Next I installed sun-jdk-1.4.2.12 and unmerged sun-jdk-1.4.2.10, but the symbolic link wasn't deleted.

I delated this link and made new correct link. I think this action should be exectute automaticaly by portage.
Comment 5 Zac Medico gentoo-dev 2006-09-06 09:41:30 UTC
(In reply to comment #4)
> Before this bug started showing I had installed sun-jdk-1.4.2.10. Next I
> installed sun-jdk-1.4.2.12 and unmerged sun-jdk-1.4.2.10, but the symbolic link
> wasn't deleted.

Portage doesn't (and shouldn't) manage the files in /etc/env.d/ any differently from any other files that are installed by packages or tools (such as java-config).

Portage should handle broken symlinks better though...
Comment 6 Zac Medico gentoo-dev 2006-09-06 10:06:05 UTC
In svn r4416, broken symlinks cause a message to be printed to stderr.
Comment 7 Zac Medico gentoo-dev 2006-09-06 14:20:19 UTC
This has been released in 2.1.1_rc1-r6.