Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 130553 - emerge --sync cache rebuild reports ghc-package.eclass related error
Summary: emerge --sync cache rebuild reports ghc-package.eclass related error
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: x86 Linux
: Highest normal (vote)
Assignee: Gentoo's Haskell Language team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-19 22:56 UTC by Dan Foster
Modified: 2006-04-20 05:36 UTC (History)
1 user (show)

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 Dan Foster 2006-04-19 22:56:34 UTC
Portage 2.0.54 (default-linux/x86/2006.0, gcc-3.3.6, glibc-2.3.5-r3, 2.6.14-gentoo-r5 i686)
=================================================================
System uname: 2.6.14-gentoo-r5 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz
Gentoo Base System version 1.6.14
ccache version 2.3 [disabled]
dev-lang/python:     2.3.5-r2, 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.8.1-r1, 2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/grass60/etc /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /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/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/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://gentoo.chem.wisc.edu/gentoo/ http://gentoo.chem.wisc.edu/gentoo/ http://ftp.twaren.net/Linux/Gentoo/"
LANG="en_US.utf8"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X aac aalib acl aim alsa apache2 apm arts asf asterisk audiofile avi berkdb bitmap-fonts bzip2 cdb cdr cli crypt cups curl dri dts dvb dvd eds emboss encode esd ethereal exif expat fam fbcon ffmpeg flac foomaticdb fortran gd gdbm ggi gif glut gmp gpm gstreamer gtk2 guile idn imagemagick imap imlib ipv6 isdnlog jack java jpeg junit lcd lcms ldap lesstif libg++ libwww lirc mad maildir mhash mikmod mmx mng motif mozilla mp3 mpeg msn ncurses nls nptl nvidia objc ogg openal opengl oss pam pcre pdflib perl php png pppd python quicktime readline recode reflection samba sasl scanner sdl session slang smime snmp softmmu spell spl sqlite sse sse2 ssl subtitles svga tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts udev unicode usb utf8 v4l vorbis win32codecs xine xml xml2 xmms xv xvid yahoo zlib video_cards_nvidia userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LC_ALL, LDFLAGS, LINGUAS

System: 3 GHz Pentium 4 (Socket 478), 3 GB RAM, 300 GB SATA drive, Asus P4C800 Deluxe motherboard, running Gentoo Linux 2006.0 and has the latest ebuild updates installed for the x86 tree.

Whenever I do 'emerge --sync', this message appears when Portage builds the cache:

>>> Updating Portage cache:   19%/usr/portage/eclass/ghc-package.eclass: line 45: ghc: command not found

This is NOT a fatal error; emerge keeps on building, but the eclass should be fixed. Not an urgent bug, but should be trivial to fix.

I believe this is a bug because I do not have any ebuilds installed that inherits ghc-package.eclass.

Line 45 mentioned above corresponds to this line in the ebuild:

        _GHC_VERSION_CACHE="$($(ghc-getghc) --numeric-version)"

So it is clearly trying to call ghc, even though I do not have it installed. It needs to have a check for ghc's presence added before it tries to execute that command.

A proposed fix might be:

# returns the version of ghc
_GHC_VERSION_CACHE=""
ghc-version() {
    if [[ -z "${_GHC_VERSION_CACHE}" -a -f /usr/bin/ghc ]]; then
        _GHC_VERSION_CACHE="$($(ghc-getghc) --numeric-version)"
    fi
    echo "${_GHC_VERSION_CACHE}"
}

Untested, as I do not have ghc installed. :)

If the fix works, there will be no output.

I am not sure when this problem appeared; perhaps within the past two months? On my system, it indicates there was an update to the eclass around 1 Mar 2006 or before.
Comment 1 Lennart Kolmodin (RETIRED) gentoo-dev 2006-04-20 02:40:08 UTC
I belive it's due to that dev-haskell/hsshellscript-2.6.0 uses ghc-version on the top level.
This behavior is new since the 7th April.
Comment 2 Andres Loeh (RETIRED) gentoo-dev 2006-04-20 03:54:45 UTC
I also think that hsshellscript's call is to blame, not the eclass itself.
This should be fixed now in CVS. Closing the bug, please re-open if the problem
persists after the next sync.
Comment 3 Dan Foster 2006-04-20 05:36:39 UTC
Makes sense, thank you for the explanations from both persons.

I am confirming that yes, the change did fix the problem, after I did another sync just now.

Thanks!