Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 215340 - unmerging failed when environment has old eutils.eclass cached
Summary: unmerging failed when environment has old eutils.eclass cached
Status: RESOLVED DUPLICATE of bug 211833
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:
Depends on:
Blocks:
 
Reported: 2008-03-29 15:44 UTC by Toralf Förster
Modified: 2008-03-30 10:07 UTC (History)
4 users (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 Toralf Förster gentoo-dev 2008-03-29 15:44:17 UTC
To update my user mode linux image I chrooted into the UML image and did an "emerge -auD world". This is the result:

...
sys-apps/texinfo
    selected: 4.8-r5
   protected: 4.11-r1
     omitted: none

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

>>> Unmerging sys-apps/texinfo-4.8-r5...
/var/tmp/binpkgs/sys-apps/texinfo-4.8-r5/temp/environment: line 258: syntax error near unexpected token `('
/var/tmp/binpkgs/sys-apps/texinfo-4.8-r5/temp/environment: line 258: `            done <<(get_mounts);'
 *
 * ERROR: sys-apps/texinfo-4.8-r5 failed.
 * Call stack:
 *               ebuild.sh, line 1641:  Called die
 * The specific snippet of code:
 *      preprocess_ebuild_env || \
 *              die "error processing environment"
 *  The die message:
 *   error processing environment
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/log/portage/sys-apps:texinfo-4.8-r5:20080329-153555.log'.
 * The ebuild environment file is located at '/var/tmp/binpkgs/sys-apps/texinfo-4.8-r5/temp/environment'.
 *
!!! FAILED prerm: 1
 * The 'prerm' phase of the 'sys-apps/texinfo-4.8-r5' package has failed
 * with exit value 1. The problem occurred while executing the ebuild
 * located at '/var/db/pkg/sys-apps/texinfo-4.8-r5/texinfo-4.8-r5.ebuild'.
 * If necessary, manually remove the ebuild in order to skip the execution
 * of removal phases.

 

Reproducible: Always




n22 / # emerge --info
Portage 2.1.4.4 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r3 i686)
=================================================================
System uname: 2.6.24-gentoo-r3 i686 Intel(R) Pentium(R) M processor 1700MHz
Timestamp of tree: Sat, 29 Mar 2008 14:15:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium-m -fomit-frame-pointer -pipe"
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/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=pentium-m -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache collision-protect distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LINGUAS="de en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl apache2 berkdb bzip2 cli cracklib crypt cups dri fam fastbuild fortran gdbm gpm iconv ipv6 isdnlog javascript logrotate midi mmx mmxext mudflap mysql ncurses nls nptl nptlonly openmp pam pcre perl ppds pppd python readline reflection session spl sse sse2 ssl tcpd unicode userlocales x86 xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" USERLAND="GNU"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

n2
Comment 1 Michael Mauch 2008-03-29 18:32:03 UTC
Same thing here. This seems to be coming from  /var/db/pkg/sys-apps/texinfo-4.8-r5/environment.bz2, which was created when the ebuild was installed (November 2006 here).

bunzip2 /var/db/pkg/sys-apps/texinfo-4.8-r5/environment.bz2
sed -i 's-<<(get_mounts)-< <(get_mounts)-' /var/db/pkg/sys-apps/texinfo-4.8-r5/environment
bzip2 /var/db/pkg/sys-apps/texinfo-4.8-r5/environment

fixed it for me. bash-3.2_p17-r1 here.

bzgrep -F '<<(get_mounts)' /var/db/pkg/*/*/environment.bz2
finds a few other ebuilds which have this bad '<<(get_mounts)', all from 2006-11-11.

The current ebuild.eclass uses '<<< "$(get_mounts)"', so maybe that should be used instead of '< <(get_mounts)'.
Comment 2 Carsten Lohrke (RETIRED) gentoo-dev 2008-03-29 20:43:32 UTC
Portage team may be interested in such issues...
Comment 3 SpanKY gentoo-dev 2008-03-29 20:58:00 UTC
what exactly is the expected resolution here ?  it obviously isnt a bug in texinfo, nor is it a bug in current eutils.eclass, so there is nothing for base-system to look at.

portage itself cant assume it can safely continue after failing to source the environment as the ebuild may try to rm directories based on variables that are now empty because the env sourcing failed ...

the resolution for anyone hitting this issue is to manually fix the environment file and move on

the only thing portage can do (assuming it doesnt do it today) is to verify the environment can be safely sourced before finishing package installation.  that way, moving forward, this issue wont (hopefully) retroactively appear again.
Comment 4 Zac Medico gentoo-dev 2008-03-29 21:05:19 UTC

*** This bug has been marked as a duplicate of bug 211833 ***
Comment 5 Zac Medico gentoo-dev 2008-03-29 21:10:25 UTC
(In reply to comment #3)
> the resolution for anyone hitting this issue is to manually fix the environment
> file and move on

As mentioned in bug 211833 comment #3, portage will try to make-do without environment.bz2 if you simply remove it.

> the only thing portage can do (assuming it doesnt do it today) is to verify the
> environment can be safely sourced before finishing package installation.  that
> way, moving forward, this issue wont (hopefully) retroactively appear again.

Well, it already does that because ebuild.sh has to source the environment for each phase of the ebuild. However, there's nothing we can do if there are compatibility issues between different versions of bash.
Comment 6 Toralf Förster gentoo-dev 2008-03-30 07:57:22 UTC
I'm wondering why it happened only with the UML Gentoo. I update my UML always after updating the host system (Gentoo stable too) and at the host system this problem did not occur.
The difference is that my UML contains much less packages (no X11 ...) b/c I used the UML mainly to test & play with some things like courier, nfs4 etc.
But anyway, this might rather be a topic for the forum ?
Comment 7 Michael Mauch 2008-03-30 10:07:41 UTC
See the comment to revision 1.262 on http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/eutils.eclass?view=log - the '< <(get_mount)' (which was wrongly written by the old Bash as '<<(get_mount)') was only used for less than a half day.

Only systems where something was emerged during that time are affected (+ a little lag depending on which mirror was used).