Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 117186

Summary: portage 2.1: ebegin/eend messed up output
Product: Portage Development Reporter: Harald van Dijk (RETIRED) <truedfx>
Component: CoreAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS, REGRESSION
Priority: High    
Version: 2.1   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=920327
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 115839    

Description Harald van Dijk (RETIRED) gentoo-dev 2005-12-30 04:57:14 UTC
Maybe this is a known issue, but I can't find any bug describing this... Sorry if I missed something.

$ cat test-1.0.ebuild 
KEYWORDS="~x86"
pkg_setup() {
        ebegin 'Hello, world!'
        eend 0
        ebegin 'Die!'
        eend 1
        die
}

$ sudo emerge test/test
Calculating dependencies ...done!
>>> emerge (1 of 1) test/test-1.0 to /
>>> checksums files   ;-) test-1.0.ebuild
>>> checksums files   ;-) files/digest-test-1.0                                                          [ !! ]
 * Die!...world!...

!!! ERROR: test/test-1.0 failed.
!!! Function pkg_setup, Line 7, Exitcode 1
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.

$ emerge --info
Portage 2.1_pre2 (default-linux/x86/2005.1, gcc-4.0.2, glibc-2.3.6-r1, 2.6.14-gentoo-r5 i686)
=================================================================
System uname: 2.6.14-gentoo-r5 i686 AMD Duron(tm) Processor
Gentoo Base System version 1.12.0_pre12
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.17
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-r1
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="-march=athlon-tbird -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-march=athlon-tbird -O2 -pipe"
DISTDIR="/var/dist"
FEATURES="autoconfig collision-protect cvs distlocks noauto notitles sandbox sfperms sign strict"
GENTOO_MIRRORS="                http://ftp.easynet.nl/mirror/gentoo             http://distfiles.gentoo.org   "
LANG="en_GB.UTF-8"
LINGUAS="en en_GB ja nl"
PKGDIR="/var/pkg"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/var/cvs/gentoo-x86"
PORTDIR_OVERLAY="/etc/portage/overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowext X acl apm asf audiofile avi bidi bitmap-fonts bzip2 cdparanoia cdr cjk crypt css cups dlloader dri dvdread emboss encode exif expat fam ffmpeg firefox ftp gif gpgme gtk gtk2 idn imagemagick imlib immqt ipv6 ithreads jpeg kde kdeenablefinal lcms libg++ libwww linuxthreads-tls lynxkeymap mbox mmx mng mozdevelop mpeg mplayer ncurses nethack nls noamazon nocxx nopie nossp nowebdav nptl offensive ogg oggvorbis openal opengl oss pcre pdflib pic png ppds quicktime readline real reiser4 rtc sdl slang spell ssl tetex threads tiff truetype truetype-fonts type1-fonts udev unicode userlocales vorbis win32codecs xine xml2 xmms xv xvid zlib elibc elibc_glibc kernel kernel_linux linguas linguas_en linguas_en_GB linguas_ja linguas_nl userland userland_GNU video_cards video_cards_radeon"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS, MAKEOPTS

For reference, with the baselayout versions:

$ . /sbin/functions.sh
$ ebegin 'Hello, world!'; eend 0; ebegin 'Die!'; eend 1
 * Hello, world! ...                                                                                     [ ok ]
 * Die! ...
[1] 26369                                                                                                [ !! ]

(The [1] 26369 is only shown in interactive shells. That isn't a problem.)
Comment 1 Jason Stubbs (RETIRED) gentoo-dev 2005-12-30 06:43:42 UTC
baselayout issue (I think). ebegin/eend are defined in /sbin/functions.sh. They really shouldn't be used from ebuilds though.
Comment 2 Harald van Dijk (RETIRED) gentoo-dev 2005-12-30 07:30:29 UTC
> ebegin/eend are defined in /sbin/functions.sh

For ebuilds, they're defined in /usr/lib/portage/bin/isolated-functions.sh, actually, which is why it only fails from ebuilds/eclasses.
Comment 3 Jason Stubbs (RETIRED) gentoo-dev 2005-12-30 07:37:00 UTC
True..
Comment 4 SpanKY gentoo-dev 2005-12-30 18:49:26 UTC
using ebegin/eend in ebuilds/eclasses is fine, and noted here, they are broken in portage, not baselayout
Comment 5 SpanKY gentoo-dev 2006-01-02 21:01:16 UTC
fixed by punting the current versions and re-importing the ones from baselayout
Comment 6 Jason Stubbs (RETIRED) gentoo-dev 2006-01-27 19:25:38 UTC
Released in 2.1_pre4