Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 130120 - missing function in default-linux/amd64/profile.bashrc causes multiple bash errors
Summary: missing function in default-linux/amd64/profile.bashrc causes multiple bash e...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-15 20:23 UTC by Carl Anderson
Modified: 2006-04-16 08:33 UTC (History)
2 users (show)

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


Attachments
profile.bashrc-fix-undefined-command.patch (profile.bashrc-fix-undefined-command.patch,889 bytes, patch)
2006-04-16 08:26 UTC, Patrick McLean
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carl Anderson 2006-04-15 20:23:57 UTC
I just started seeing bash errors while emerging any package:
/usr/portage/profiles/default-linux/amd64/profile.bashrc: line 70: has: command not found
/usr/portage/profiles/default-linux/amd64/profile.bashrc: line 74: has: command not found
/usr/portage/profiles/default-linux/amd64/profile.bashrc: line 70: has: command not found
/usr/portage/profiles/default-linux/amd64/profile.bashrc: line 74: has: command not found
/usr/portage/profiles/default-linux/amd64/profile.bashrc: line 70: has: command not found
/usr/portage/profiles/default-linux/amd64/profile.bashrc: line 74: has: command not found
 ... 

It looks like there is a missing function in: /usr/portage/profiles/default-linux/amd64/profile.bashrc

Here is a patch that fixes it:
--- profile.bashrc      2006-04-15 22:20:05.000000000 -0500
+++ /usr/portage/profiles/default-linux/amd64/profile.bashrc    2006-04-15 21:56:58.000000000 -0500
@@ -60,6 +60,12 @@
        done
 }

+function has() {
+       local TARGET="${1}" && shift
+       while [ -n "${1}" ]; do [ "${1}" == "${TARGET}" ] && return 0 || shift; done
+       return 1
+}
+
 if [[ ${EBUILD_PHASE} == "setup" ]]; then

        filter_invalid_flags
Comment 1 Zac Medico gentoo-dev 2006-04-15 20:29:42 UTC
That function should already be defined elsewhere.  Please post the output of 'emerge --info'.
Comment 2 Mike Doty (RETIRED) gentoo-dev 2006-04-15 20:35:47 UTC
emerge --info please
Comment 3 Carl Anderson 2006-04-15 20:47:00 UTC
Portage 2.0.54 (default-linux/amd64/2006.0, gcc-3.4.5, glibc-2.3.5-r2, 2.6.15-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.15-gentoo-r7 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.6.14
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
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/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=k8"
CHOST="x86_64-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/lib64/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -march=k8"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://gentoo.seren.com/gentoo http://gentoo.chem.wisc.edu/gentoo/ http://cudlug.cudenver.edu/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="amd64 X acpi alsa apache2 audiofile avi berkdb bitmap-fonts bzip2 cdr cli crypt ctype cups curl dba dbx doc dri dvdr eds emboss encode esd ethereal exif expat fam fastbuild foomaticdb force-cgi-redirect fortran ftp gd gdbm gif glut gmp gnome gpm gstreamer gtk gtk2 howl idn imlib isdnlog java jikes jpeg junit kde lcms lzw lzw-tiff mad memlimit mng mozilla mp3 mpeg ncurses nls nptl nsplugin odbc opengl pam pcre pdflib perl png posix pppd python qt quicktime readline ruby samba sdl session simplexml soap sockets source spell spl ssl tcpd tiff tokenizer truetype truetype-fonts type1-fonts udev unicode usb xml xml2 xmms xpm xsl xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 4 Chris Trawick 2006-04-15 21:55:16 UTC
Same thing here during a 2006.0 stage3 install.  Is it safe to ignore the error so I can finish the install?


Portage 2.0.54 (default-linux/amd64/2006.0, gcc-3.4.5, glibc-2.3.5-r2, 2.6.15-ge
ntoo-r5 x86_64)
=================================================================
System uname: 2.6.15-gentoo-r5 x86_64 Dual Core AMD Opteron(tm) Processor 265
Gentoo Base System version 1.6.14
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
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/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=opteron"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X1
1/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -march=opteron"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/
distributions/gentoo"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X alsa apache2 avi berkdb bitmap-fonts bzip2 cli crypt ctype cups dba
 dri eds emboss encode expat fastbuild foomaticdb force-cgi-redirect fortran ftp
 gd gif gnome gpm gstreamer gtk gtk2 imlib ipv6 isdnlog jpeg kde lzw lzw-tiff me
mlimit mp3 mpeg ncurses nls nptl nptlonly opengl pam pcre pdflib perl png posix
pppd python qt quicktime readline sdl session simplexml soap sockets spell spl s
sl tcpd tiff tokenizer truetype truetype-fonts type1-fonts udev usb xml xpm xsl
xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_
OVERLAY
Comment 5 Mike Doty (RETIRED) gentoo-dev 2006-04-15 22:42:47 UTC
Ther was a update to profile.bashrc a couple of hours ago.  I tried with rev 1.15 of the file with portage 2.0.54 and the same error occurs.  error isn't present in portage-2.1.
Comment 6 Thomas Cort (RETIRED) gentoo-dev 2006-04-16 08:02:55 UTC
(In reply to comment #5)
> Ther was a update to profile.bashrc a couple of hours ago.  I tried with rev
> 1.15 of the file with portage 2.0.54 and the same error occurs.  error isn't
> present in portage-2.1.

Using the latest cvs profile.bashrc I get the following errors too:

bobcat ~ # emerge cowsay 
Calculating dependencies ...done!
>>> emerge (1 of 1) games-misc/cowsay-3.03 to /
>>> md5 files   ;-) cowsay-3.03.ebuild
>>> md5 files   ;-) files/cowsay.bashcomp
>>> md5 files   ;-) files/digest-cowsay-3.03
>>> md5 src_uri ;-) cowsay-3.03.tar.gz
/usr/portage/profiles/default-linux/amd64/profile.bashrc: line 70: has: command not found
/usr/portage/profiles/default-linux/amd64/profile.bashrc: line 74: has: command not found
/usr/portage/profiles/default-linux/amd64/profile.bashrc: line 70: has: command not found
/usr/portage/profiles/default-linux/amd64/profile.bashrc: line 74: has: command not found
/usr/portage/profiles/default-linux/amd64/profile.bashrc: line 70: has: command not found
/usr/portage/profiles/default-linux/amd64/profile.bashrc: line 74: has: command not found
/usr/portage/profiles/default-linux/amd64/profile.bashrc: line 70: has: command not found
/usr/portage/profiles/default-linux/amd64/profile.bashrc: line 74: has: command not found
/usr/portage/profiles/default-linux/amd64/profile.bashrc: line 70: has: command not found
/usr/portage/profiles/default-linux/amd64/profile.bashrc: line 74: has: command not found
/usr/portage/profiles/default-linux/amd64/profile.bashrc: line 70: has: command not found
/usr/portage/profiles/default-linux/amd64/profile.bashrc: line 74: has: command not found
/usr/portage/profiles/default-linux/amd64/profile.bashrc: line 70: has: command not found
/usr/portage/profiles/default-linux/amd64/profile.bashrc: line 74: has: command not found
/usr/portage/profiles/default-linux/amd64/profile.bashrc: line 70: has: command not found
/usr/portage/profiles/default-linux/amd64/profile.bashrc: line 74: has: command not found
/usr/portage/profiles/default-linux/amd64/profile.bashrc: line 70: has: command not found
/usr/portage/profiles/default-linux/amd64/profile.bashrc: line 74: has: command not found
>>> Unpacking source...
>>> Unpacking cowsay-3.03.tar.gz to /var/tmp/portage/cowsay-3.03/work
>>> Source unpacked.

...

# emerge --info
Portage 2.0.54 (default-linux/amd64/2006.0, gcc-3.4.5, glibc-2.3.5-r2, 2.6.16-gentoo-r1 x86_64)
=================================================================
System uname: 2.6.16-gentoo-r1 x86_64 AMD Turion(tm) 64 Mobile Technology ML-32
Gentoo Base System version 1.6.14
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
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/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib64/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/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon64 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig cvs distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://adelie.polymtl.ca/ http://gentoo.arcticnetwork.ca/ http://gentoo.mirrored.ca/ http://gentoo.osuosl.org/ "
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /home/tcort/cvs/overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X aac aim alsa apache2 audacious audiofile avi berkdb bitmap-fonts browserplugin bzip2 cdr cli crypt ctype cups curl dba dri eds emboss encode esd ethereal exif expat fam fastbuild flac foomaticdb force-cgi-redirect ftp gd gif glut gmp gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml icq idn imagemagick imlib ipv6 isdnlog jabber java jpeg kde lcms libwww lua lzw lzw-tiff mad memlimit mikmod mng mono motif mozilla moznocompose moznoirc moznomail mp3 mpeg msn ncurses nls nocd nptl nptlonly nsplugin offensive ogg oggvorbis openal opengl oscar pam pcre pdflib perl png posix pppd python qt quicktime readline sdl session shorten simplexml sndfile soap sockets speex spell spl ssl symlink tcpd tetex tiff tokenizer truetype truetype-fonts type1-fonts udev usb userlocales vorbis wxgtk1 xml xml2 xmms xpm xsl xv xvid yahoo zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 7 Patrick McLean gentoo-dev 2006-04-16 08:26:56 UTC
Created attachment 84780 [details, diff]
profile.bashrc-fix-undefined-command.patch

Here's a patch that should fix the problem.
Comment 8 Patrick McLean gentoo-dev 2006-04-16 08:33:35 UTC
Fix in CVS, should show up on the esync mirrors in an hour or so.