Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 83817 - env-update crashes when a bad PRELINK_PATH_MASK is given
Summary: env-update crashes when a bad PRELINK_PATH_MASK is given
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2005-03-02 07:38 UTC by Matt T. Proud
Modified: 2005-07-14 06:58 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 Matt T. Proud 2005-03-02 07:38:12 UTC
By accident, I had my PRELINK_PATH_MASK set to (PRELINK_PATH_MASK=/usr/lib/wine:/usr/lib/valgrind:/opt:); and when I ran env-update, env-update crashed.

It produced the following error:

Traceback (most recent call last):
  File "/usr/sbin/env-update", line 11, in ?
    portage.env_update()
  File "/usr/lib/portage/pym/portage.py", line 551, in env_update
    if y[-1]!='/':
IndexError: string index out of range

While the correct PRELINK_PATH_MASK should be (PRELINK_PATH_MASK=/usr/lib/wine:/usr/lib/valgrind:/opt), I still think that this is a bug, because env-update does not handle the problem very gracefully.




Reproducible: Always
Steps to Reproduce:
1. Set PRELINK_PATH_MASK to (PRELINK_PATH_MASK=/usr/lib/wine:/usr/lib/valgrind:/opt:) in /etc/env.d/60prelink.
2. Run env-update.
3. Observe env-update crash.

Actual Results:  
Traceback (most recent call last):
  File "/usr/sbin/env-update", line 11, in ?
    portage.env_update()
  File "/usr/lib/portage/pym/portage.py", line 551, in env_update
    if y[-1]!='/':
IndexError: string index out of range


Expected Results:  
env-update should handle the error in the string gracefully, doing something
better than just crashing.

stalin x11-themes # emerge info
Portage 2.0.51-r15 (default-linux/x86/2004.3, gcc-3.3.5,
glibc-2.3.4.20040808-r1, 2.6.10 i686)
=================================================================
System uname: 2.6.10 i686 AMD Athlon(tm) XP 3000+
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb 26 2005, 18:02:53)]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.5, 1.7.9-r1, 1.9.4, 1.6.3, 1.4_p6, 1.8.5-r3
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /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/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig candy ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/usr/src"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X a52 aac acpi aim alsa apm arts audiofile avi bash-completion berkdb
bitmap-fonts bluetooth bmp bonobo bzlib calendar cdparanoia cdr crypt cups curl
divx4linux dv dvd dvdr dvdread eds emacs emboss encode esd evo exif f77 fam
ffmpeg flac font-server foomaticdb fortran freetype ftp gcj gdbm ggi gif glut
gmail gnome gnustep gnutls gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile hal howl
iconv icq imagemagick imap imlib inifile ipv6 jabber javascript jpeg kde ldap
lesstif libg++ libwww mad maildir mbox mcal mikmod mime mmap mmx mng mono motif
mozdevelop mozilla mozsvg mp3 mpeg msession msn mysql nas ncurses neXt nls
nocardbus nptl objc offensive ogg oggvorbis openal opengl oscar oss pam pcre pda
pdflib perl pic png pnp portaudio ppds python qt quicktime readline real samba
sasl sdl session silc spell sse ssl svg svga svgalib szip tcpd tetex theora
threads tidy tiff truetype truetype-fonts type1-fonts unicode usb v4l v4l2 vcd
wxwindows x86 xine xml xml2 xmms xpm xprint xv zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
Comment 1 Jason Stubbs (RETIRED) gentoo-dev 2005-07-14 05:48:02 UTC
Fixed on or before 2.0.51.22-r1 
Comment 2 Jason Stubbs (RETIRED) gentoo-dev 2005-07-14 06:58:45 UTC
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.