Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 211833 - provide an option to use current eclasses on unmerge, instead of cached VDB environment
Summary: provide an option to use current eclasses on unmerge, instead of cached VDB e...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal with 1 vote (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
: 215340 215421 215551 215771 217732 218255 219267 220627 221953 231264 232092 (view as bug list)
Depends on:
Blocks: 216231
  Show dependency tree
 
Reported: 2008-02-28 20:26 UTC by Martin von Gagern
Modified: 2008-09-08 04:33 UTC (History)
11 users (show)

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


Attachments
Patch to ghc-bin-6.4.2 saved environment (ghc-bin-6.4.2.environment.diff,327 bytes, patch)
2008-02-28 20:59 UTC, Martin von Gagern
Details | Diff
Environment file (environment,482.01 KB, text/plain)
2008-08-03 18:34 UTC, junkmail
Details
Build log (build.log,841 bytes, text/plain)
2008-08-03 18:34 UTC, junkmail
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2008-02-28 20:26:58 UTC
ghc-bin is masked and scheduled for removal, so I tried to remove it. I got till this message:

>>> Unmerging dev-lang/ghc-bin-6.4.2...

After that, portage loops silently. Adding "set -x" to appropriate places in ebuild.sh, I got this trace:

+ ebuild_phase_with_hooks pkg_prerm
+ local x phase_name=pkg_prerm
+ for x in '{pre_,,post_}${phase_name}'
+ ebuild_phase pre_pkg_prerm
++ type -t pre_pkg_prerm
+ '[' '' == function ']'
+ for x in '{pre_,,post_}${phase_name}'
+ ebuild_phase pkg_prerm
++ type -t pkg_prerm
+ '[' function == function ']'
+ qa_call pkg_prerm
++ shopt
+ local 'shopts=cdable_vars     off
cdspell         off
checkhash       off
checkwinsize    off
cmdhist         on
dotglob         off
execfail        off
expand_aliases  on
extdebug        on
extglob         off
extquote        on
failglob        off
force_fignore   on
gnu_errfmt      off
histappend      off
histreedit      off
histverify      off
hostcomplete    on
huponexit       off
interactive_comments    on
lithist         off
login_shell     off
mailwarn        off
no_empty_cmd_completion off
nocaseglob      off
nocasematch     off
nullglob        off
progcomp        on
promptvars      on
restricted_shell        off
shift_verbose   off
sourcepath      on
xpg_echo        off' 'OLDIFS=   
'
+ local retval
+ pkg_prerm
+ ghc-package_pkg_prerm
++ ghc-localpkgconf
++ echo ghc-bin-6.4.2.conf
+ ghc-unregister-pkg ghc-bin-6.4.2.conf
+ local localpkgconf
+ local i
+ local pkg
+ local protected
++ ghc-confdir
+++ ghc-libdir
+++ [[ -z '' ]]
+++++ ghc-getghc
+++++ echo ghc
++++ ghc --print-libdir
+++ _GHC_LIBDIR_CACHE=/opt/ghc/lib/ghc-6.4.2
+++ echo /opt/ghc/lib/ghc-6.4.2
++ echo /opt/ghc/lib/ghc-6.4.2/gentoo
+ localpkgconf=/opt/ghc/lib/ghc-6.4.2/gentoo/ghc-bin-6.4.2.conf
++ ghc-confdir
+++ ghc-libdir
+++ [[ -z '' ]]
+++++ ghc-getghc
+++++ echo ghc
++++ ghc --print-libdir
+++ _GHC_LIBDIR_CACHE=/opt/ghc/lib/ghc-6.4.2
+++ echo /opt/ghc/lib/ghc-6.4.2
++ echo /opt/ghc/lib/ghc-6.4.2/gentoo
+ for i in '$(ghc-confdir)/*.conf'
+ [[ /opt/ghc/lib/ghc-6.4.2/gentoo/*.conf != \/\o\p\t\/\g\h\c\/\l\i\b\/\g\h\c\-\6\.\4\.\2\/\g\e\n\t\o\o\/\g\h\c\-\b\i\n\-\6\.\4\.\2\.\c\o\n\f ]]
++ ghc-listpkg '/opt/ghc/lib/ghc-6.4.2/gentoo/*.conf'
++ local ghcpkgcall
++ local i
++ for i in '$*'
++ ghc-cabal
+++ ghc-version
+++ [[ -z '' ]]
+++++ ghc-getghc
+++++ echo ghc
++++ ghc --numeric-version
+++ _GHC_VERSION_CACHE=6.4.2
+++ echo 6.4.2
++ version_is_at_least 6.4 6.4.2
++ local want_s=6.4 have_s=6.4.2 r
++ version_compare 6.4 6.4.2
++ local ver_a=6.4 ver_b=6.4.2 parts_a parts_b cur_idx_a=0 cur_idx_b=0
++ parts_a=($(get_all_version_components "${ver_a}" ))
+++ get_all_version_components 6.4
+++ local ver_str=6.4 result result_idx=0
+++ result=()
+++ [[ '' == \6\.\4 ]]
+++ export VERSIONATOR_CACHE_VER_STR=6.4
+++ VERSIONATOR_CACHE_VER_STR=6.4
+++ [[ -n 6.4 ]]
+++ case "${ver_str:0:1}" in
+++ result[$result_idx]=6
+++ ver_str=6.4
+++ result_idx=1
+++ [[ -n 6.4 ]]
+++ case "${ver_str:0:1}" in
+++ result[$result_idx]=6
+++ ver_str=6.4
+++ result_idx=2

This is obviously a loop, as ver_str is not shortened.

So far I haven't understood why the trace stated above doesn't list __versionator_shopt_toggle although a call to that function is clearly part of the eclass. I assume some advanced bash magic that I haven't been aware of.
I'm not even sure whether this is an eclass issue or a portage issue.

I'll try to leave my ghc-bin package around for a while, so that I can provide further information when needed.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2008-02-28 20:48:03 UTC
As discussed on #gentoo-portage, there's nothing to be fixed in the eclass, since it's portage recycling a buggy thing fixed years ago. :/

http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/versionator.eclass?r1=1.11&r2=1.12

People should have an option to disable this behaviour on unmerge to prevent unsolvable situations.
Comment 2 Martin von Gagern 2008-02-28 20:59:52 UTC
Created attachment 144899 [details, diff]
Patch to ghc-bin-6.4.2 saved environment

Here is a workaround to get ghc-bin unmerged:
1. download attached patch to environment.diff (or any othe name you want)
2. bunzip2 /var/db/pkg/dev-lang/ghc-bin-6.4.2/environment.bz2
3. patch /var/db/pkg/dev-lang/ghc-bin-6.4.2/environment < environment.diff
4. bzip2 /var/db/pkg/dev-lang/ghc-bin-6.4.2/environment
5. emerge -C ghc-bin
Comment 3 Zac Medico gentoo-dev 2008-02-28 22:48:39 UTC
If you remove environment.bz2 then portage will try to make-do without it. Perhaps we just need to document that?
Comment 4 Zac Medico gentoo-dev 2008-03-29 21:05:19 UTC
*** Bug 215340 has been marked as a duplicate of this bug. ***
Comment 5 Carsten Lohrke (RETIRED) gentoo-dev 2008-03-30 09:31:24 UTC
*** Bug 215421 has been marked as a duplicate of this bug. ***
Comment 6 Carsten Lohrke (RETIRED) gentoo-dev 2008-03-31 19:28:38 UTC
*** Bug 215551 has been marked as a duplicate of this bug. ***
Comment 7 Carsten Lohrke (RETIRED) gentoo-dev 2008-04-01 21:25:34 UTC
*** Bug 215771 has been marked as a duplicate of this bug. ***
Comment 8 SpanKY gentoo-dev 2008-04-15 00:22:07 UTC
*** Bug 217732 has been marked as a duplicate of this bug. ***
Comment 9 Zac Medico gentoo-dev 2008-04-18 16:19:20 UTC
*** Bug 218255 has been marked as a duplicate of this bug. ***
Comment 10 Albert Zeyer 2008-04-18 19:31:22 UTC
Thanks Zac, removing environment.bz for my specific package (sys-apps/texinfo-4.8-r5) solved the problem.
Comment 11 Danny 2008-04-20 18:32:22 UTC
This bug hit me also.  I have this happening for sys-apps/texinfo-4.8-r5.  More specifically, the bug that hit me is the duplicate-marked bug 215551.

The suggested workaround is:
rm /var/db/pkg/sys-apps/texinfo-4.8-r5/environment.bz2

Which worked, but I have no idea if this just leaves loose files lying around or what.  If a bad environment.bz2 causes portage to abort, it must be important! Right?  Otherwise, portage could just catch the error and uninstall without the file.
Comment 12 Farrel Lifson 2008-04-24 11:41:43 UTC
This bug seems to have reappeared on the blackdown-jdk ebuild:


>>> Auto-cleaning packaes...

 dev-java/blackdown-jdk
    selected: 1.4.2.03-r12 
   protected: 1.4.2.03-r15 
     omitted: none 

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

>>> Unmerging dev-java/blackdown-jdk-1.4.2.03-r12...
/var/tmp/binpkgs/dev-java/blackdown-jdk-1.4.2.03-r12/temp/environment: line 368: syntax error near unexpected token `('
/var/tmp/binpkgs/dev-java/blackdown-jdk-1.4.2.03-r12/temp/environment: line 368: `            done <<(get_mounts);'
 * 
 * ERROR: dev-java/blackdown-jdk-1.4.2.03-r12 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/tmp/binpkgs/dev-java/blackdown-jdk-1.4.2.03-r12/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/binpkgs/dev-java/blackdown-jdk-1.4.2.03-r12/temp/environment'.
 * 
!!! FAILED prerm: 1
 * The 'prerm' phase of the 'dev-java/blackdown-jdk-1.4.2.03-r12' package
 * has failed with exit value 1. The problem occurred while executing the
 * ebuild located at '/var/db/pkg/dev-java/blackdown-jdk-1.4.2.03-r12
 * /blackdown-jdk-1.4.2.03-r12.ebuild'. If necessary, manually remove the
 * ebuild in order to skip the execution of removal phases.

 * Messages for package dev-java/blackdown-jdk-1.4.2.03-r12:

 * 
 * ERROR: dev-java/blackdown-jdk-1.4.2.03-r12 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/tmp/binpkgs/dev-java/blackdown-jdk-1.4.2.03-r12/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/binpkgs/dev-java/blackdown-jdk-1.4.2.03-r12/temp/environment'.
 * 
 * The 'prerm' phase of the 'dev-java/blackdown-jdk-1.4.2.03-r12' package
 * has failed with exit value 1. The problem occurred while executing the
 * ebuild located at '/var/db/pkg/dev-java/blackdown-jdk-1.4.2.03-r12
 * /blackdown-jdk-1.4.2.03-r12.ebuild'. If necessary, manually remove the
 * ebuild in order to skip the execution of removal phases.
Comment 13 Zac Medico gentoo-dev 2008-04-25 18:24:12 UTC
*** Bug 219267 has been marked as a duplicate of this bug. ***
Comment 14 Zac Medico gentoo-dev 2008-04-28 03:43:56 UTC
Here's what the new message looks like (in current svn):

 * The 'postrm' phase of the 'app-portage/removal-error-test-1' package has
 * failed with exit value 1.
 *
 * The problem occurred while executing the ebuild file named 'removal-
 * error-test-1.ebuild' located in the '/var/db/pkg/app-portage/removal-
 * error-test-1' directory. If necessary, manually remove the ebuild file
 * and/or the environment.bz2 file located in that directory.
 *
 * Removal of the environment.bz2 file will cause the ebuild to be sourced
 * and the eclasses from the current portage tree will be used when
 * necessary. Removal of the ebuild file will cause the removal phases to
 * be skipped entirely.
Comment 15 Chr. Schaefer 2008-04-28 06:17:06 UTC
(In reply to comment #14)
> Here's what the new message looks like (in current svn):

I was hit by this bug because of texinfo. While I don't like the idea of manually removing anything from /var/db/pkg (was never needed for me in the last five years of Gentoo) I understand that this issue is hard if not impossible to fix cleanly.

Zac, I think your error message is understandable. To make it even more useful an advise should be included which of the two options is preferred, e. g. append another sentence like "Try removing environment.bz2 first."

If I understand right the other option means that a package would not actually be removed from the filesystem. Couldn't this be a potential security problem if one just wants to remove a package completely? 
Comment 16 Marius Mauch (RETIRED) gentoo-dev 2008-04-28 06:30:54 UTC
(In reply to comment #15)
> If I understand right the other option means that a package would not actually
> be removed from the filesystem.

Nope, the ebuild in /var/db/pkg has nothing to do with removing the package from the filesystem, for that you'd have to remove other files as well.

Comment 17 Zac Medico gentoo-dev 2008-04-28 17:41:14 UTC
> (In reply to comment #14)
> If I understand right the other option means that a package would not actually
> be removed from the filesystem.

It's only the pkg_prerm() and pkg_postrm() phases that are skipped. Here's what it looks like now:

 * The 'postrm' phase of the 'app-portage/removal-error-test-1' package has
 * failed with exit value 1.
 *
 * The problem occurred while executing the ebuild file named 'removal-
 * error-test-1.ebuild' located in the '/var/db/pkg/app-portage/removal-
 * error-test-1' directory. If necessary, manually remove the
 * environment.bz2 file and/or the ebuild file located in that directory.
 *
 * Removal of the environment.bz2 file is preferred since it may allow the
 * removal phases to execute successfully. The ebuild will be sourced and
 * the eclasses from the current portage tree will be used when necessary.
 * Removal of the ebuild file will cause the pkg_prerm() and pkg_postrm()
 * removal phases to be skipped entirely.(In reply to comment #15)
Comment 18 Zac Medico gentoo-dev 2008-05-06 08:37:01 UTC
This is fixed in 2.1.5_rc7.
Comment 19 Jeroen Roovers (RETIRED) gentoo-dev 2008-05-06 18:30:42 UTC
*** Bug 220627 has been marked as a duplicate of this bug. ***
Comment 20 Jeroen Roovers (RETIRED) gentoo-dev 2008-05-13 15:12:52 UTC
*** Bug 221953 has been marked as a duplicate of this bug. ***
Comment 21 Zac Medico gentoo-dev 2008-07-09 21:58:05 UTC
*** Bug 231264 has been marked as a duplicate of this bug. ***
Comment 22 Zac Medico gentoo-dev 2008-07-18 00:28:36 UTC
*** Bug 232092 has been marked as a duplicate of this bug. ***
Comment 23 junkmail 2008-08-03 13:22:32 UTC
I'm coming across this issue a *lot* on my new amd64 install, whereas on an older, though otherwise much the same installation I never get it.

For example:

Messages for package sys-apps/file-4.23: 
 
  * 
  * ERROR: sys-apps/file-4.23 failed. 
  * Call stack: 
  *               ebuild.sh, line 1637:  Called die 
  * The specific snippet of code: 
  *      preprocess_ebuild_env || \n 
  *              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/tmp/binpkgs/sys-apps/file-4.23/temp/build.log'. 
  * The ebuild environment file is located at '/var/tmp/binpkgs/sys-apps/file-4.23/temp/environment'. 
  * 
  * The 'postrm' phase of the 'sys-apps/file-4.23' package has failed with 
  * exit value 1. 
  * 
  * The problem occurred while executing the ebuild file named 
  * 'file-4.23.ebuild' located in the '/var/db/pkg/sys-apps/file-4.23' 
  * directory. If necessary, manually remove the environment.bz2 file and/or 
  * the ebuild file located in that directory. 
  * 
  * Removal of the environment.bz2 file is preferred since it may allow the 
  * removal phases to execute successfully. The ebuild will be sourced and 
  * the eclasses from the current portage tree will be used when necessary. 
  * Removal of the ebuild file will cause the pkg_prerm() and pkg_postrm() 
  * removal phases to be skipped entirely. 

I've had this same error on:

gnome-base/librsvg-2.20.0
dev-libs/libxslt-1.1.24
dev-python/pygobject-2.14.1
app-emulation/emul-linux-x86-soundlibs-20080418
app-admin/python-updater-0.5
sys-apps/file-4.23
dev-libs/libxml2-2.6.31
sys-libs/cracklib-2.8.12
dev-lang/python-2.5.2-r5
sys-devel/binutils-2.18-r3
dev-db/mysql-5.0.54
sys-apps/portage-2.1.5.6
sys-apps/portage-2.1.4.4
net-misc/curl-7.17.1
dev-python/pygtk-2.12.0
gnome-extra/libgsf-1.14.7
dev-python/pygobject-2.14.1
dev-python/pyopengl-2.0.0.44
dev-python/numeric-24.2-r6
dev-python/pycairo-1.4.0
dev-lang/php-5.2.6_rc4

Deleting the environment.bz2 file works, but frankly, it's stopped being funny now having to keep doing this after every emerge -u world.

emerge --info
Portage 2.1.5.6 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.25-gentoo-r7 x86_64 AMD Athlon(tm) Dual Core Processor 4850e
Timestamp of tree: Sat, 02 Aug 2008 00:45:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-lang/python:     2.4.4-r13, 2.5.2-r6
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-r2
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ABI="amd64"
ACCEPT_KEYWORDS="amd64"
ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 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 authn_alias authn_anon 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 deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias"
ARCH="amd64"
ASFLAGS_x86="--32"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CCACHE_DIR="/var/tmp/ccache/"
CCACHE_SIZE="2G"
CDEFINE_amd64="__x86_64__"
CDEFINE_x86="__i386__"
CFLAGS="-march=k8 -pipe -O2"
CFLAGS_x86="-m32"
CHOST="x86_64-pc-linux-gnu"
CHOST_amd64="x86_64-pc-linux-gnu"
CHOST_x86="i686-pc-linux-gnu"
CLEAN_DELAY="5"
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"
CVS_RSH="ssh"
CXXFLAGS="-march=k8 -pipe -O2"
DCCC_PATH="/usr/lib/distcc/bin"
DEFAULT_ABI="amd64"
DISTCC_LOG=""
DISTCC_VERBOSE="0"
DISTDIR="/usr/portage/distfiles"
EDITOR="/bin/nano"
ELIBC="glibc"
EMERGE_DEFAULT_OPTS="--verbose"
EMERGE_WARNING_DELAY="10"
FEATURES="ccache distlocks fixpackages parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
FETCHCOMMAND="/usr/bin/wget -t 5 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}""
GCC_SPECS=""
GDK_USE_XFT="1"
GENTOO_MIRRORS="http://gentoo.virginmedia.com http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
HOME="/home/admin"
INFOPATH="/usr/share/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.18/info:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.2/info"
INPUT_DEVICES="keyboard mouse"
KDEDIRS="/usr:/usr/local:/usr/kde/3.5"
KERNEL="linux"
KRB5CCNAME="c4"
LANG="en_GB"
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text"
LC_ALL="en_GB"
LDFLAGS="-Wl,-O1"
LDFLAGS_x86="-m elf_i386"
LESS="-R -M --shift 5"
LESSOPEN="|lesspipe.sh %s"
LIBDIR_amd64="lib64"
LIBDIR_ppc="lib32"
LIBDIR_ppc64="lib64"
LIBDIR_x86="lib32"
LIBGL_DRIVERS_PATH="/usr/lib64/dri:/usr/lib32/dri"
LINGUAS="en_GB"
LOGNAME="admin"
LS_COLORS="no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.pdf=00;32:*.ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=00;32:*.doc=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:"
MAIL="/var/mail/admin"
MAKEOPTS="-j5"
MANPATH="/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.18/man:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.2/man:/usr/lib64/php5/man/:/usr/kde/3.5/share/man:/usr/qt/3/doc/man:/opt/vmware/server/man"
MULTILIB_ABIS="amd64 x86"
MULTILIB_STRICT_DENY="64-bit.*shared object"
MULTILIB_STRICT_DIRS="/lib32 /lib /usr/lib32 /usr/lib /usr/kde/*/lib32 /usr/kde/*/lib /usr/qt/*/lib32 /usr/qt/*/lib /usr/X11R6/lib32 /usr/X11R6/lib"
MULTILIB_STRICT_EXEMPT="(perl5|gcc|gcc-lib|binutils|eclipse-3|debug|portage)"
OPENGL_PROFILE="ati"
PAGER="/usr/bin/less"
PATH="/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.2:/usr/kde/3.5/bin:/usr/qt/3/bin:/opt/vmware/server/bin"
PKGDIR="/usr/portage/packages"
PKG_CONFIG_PATH="/usr/qt/3/lib64/pkgconfig"
PORTAGE_ARCHLIST="ppc s390 amd64 x86 ppc64 x86-fbsd m68k arm sparc sh mips ia64 alpha hppa sparc-fbsd"
PORTAGE_BINHOST_CHUNKSIZE="3000"
PORTAGE_BIN_PATH="/usr/lib64/portage/bin"
PORTAGE_CONFIGROOT="/"
PORTAGE_DEBUG="0"
PORTAGE_DEPCACHEDIR="/var/cache/edb/dep"
PORTAGE_ELOG_CLASSES="log warn error"
PORTAGE_ELOG_MAILFROM="portage@localhost"
PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for ${PACKAGE} on ${HOST}"
PORTAGE_ELOG_MAILURI="root"
PORTAGE_ELOG_SYSTEM="save_summary echo"
PORTAGE_FETCH_CHECKSUM_TRY_MIRRORS="5"
PORTAGE_FETCH_RESUME_MIN_SIZE="350K"
PORTAGE_GID="250"
PORTAGE_INST_GID="0"
PORTAGE_INST_UID="0"
PORTAGE_PYM_PATH="/usr/lib64/portage/pym"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_RSYNC_RETRIES="3"
PORTAGE_TMPDIR="/var/tmp"
PORTAGE_WORKDIR_MODE="0700"
PORTDIR="/usr/portage"
PWD="/home/admin"
PYTHONPATH="/usr/lib64/portage/pym"
QMAKESPEC="linux-g++"
QTDIR="/usr/qt/3"
RESUMECOMMAND="/usr/bin/wget -c -t 5 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}""
ROOT="/"
ROOTPATH="/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.2:/usr/kde/3.5/sbin:/usr/kde/3.5/bin:/usr/qt/3/bin:/opt/vmware/server/bin"
RPMDIR="/usr/portage/rpm"
SHELL="/bin/bash"
SHLVL="1"
SSH_CLIENT="80.45.10.10 49680 70"
SSH_CONNECTION="80.45.10.10 49680 192.168.0.5 70"
SSH_TTY="/dev/pts/1"
STAGE1_USE="multilib nptl nptlonly unicode"
SYMLINK_LIB="yes"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
TERM="xterm"
USE="X acl acpi alsa amd64 arts berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo fam ffmpeg foomaticdb fortran gdbm gif gpm hal iconv isdnlog jpeg kde kdeenablefinal kerberos ldap libnotify mad midi mikmod mmx mp3 mpeg mudflap multilib ncurses nls nptl nptlonly nsplugin ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3 qt3support quicktime readline reflection samba sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype unicode usb vorbis xml xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 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 authn_alias authn_anon 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 deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB" USERLAND="GNU" VIDEO_CARDS="fglrx vesa"
USER="admin"
USERLAND="GNU"
USE_EXPAND="ALSA_CARDS ALSA_PCM_PLUGINS APACHE2_MODULES APACHE2_MPMS CAMERAS CROSSCOMPILE_OPTS DVB_CARDS ELIBC FCDSL_CARDS FOO2ZJS_DEVICES FRITZCAPI_CARDS INPUT_DEVICES KERNEL LCD_DEVICES LINGUAS LIRC_DEVICES MISDN_CARDS USERLAND VIDEO_CARDS"
USE_EXPAND_HIDDEN="CROSSCOMPILE_OPTS ELIBC KERNEL USERLAND"
USE_ORDER="env:pkg:conf:defaults:pkginternal:env.d"
VIDEO_CARDS="fglrx vesa"
XDG_DATA_DIRS="/usr/share:/usr/kde/3.5/share:/usr/local/share"
_="/usr/bin/emerge"
_PMT_DEBUG_LEVEL="0"
Comment 24 Zac Medico gentoo-dev 2008-08-03 13:56:15 UTC
You need to examine the environment file to see what's triggering it. Normally, bash will dump a message telling you the line number of the environment file where the error occurred. By looking at that line in the environment file it should give you some clue about what went wrong and what should be done to avoid it in the future.
Comment 25 junkmail 2008-08-03 18:34:13 UTC
Created attachment 162141 [details]
Environment file
Comment 26 junkmail 2008-08-03 18:34:39 UTC
Created attachment 162142 [details]
Build log
Comment 27 junkmail 2008-08-03 18:37:25 UTC
Sorry, I didn't realise those attahchments would go separately from this note ;)

In the build log it quotes lines 1496 & 1637

Line 1496 is:     get_abi_var FAKE_TARGETS "$@"

Line 1637 is:        *)

Still not sure what to do to sort it though.
Comment 28 Zac Medico gentoo-dev 2008-08-03 20:32:09 UTC
(In reply to comment #26)
> Created an attachment (id=162142) [edit]
> Build log

Note that the message refers to ebuild.sh rather than the environment file:

/var/tmp/._portage_reinstall_.Lu7vvR/bin/ebuild.sh: line 1496: /bin/touch: Argument list too long

In portage-2.1.5.6, the line of code it's referring to is this:

   touch "${T}/environment.success" || exit $?

I don't see any reason for that command to fail, so it seems like your /bin/touch binary (from coreutils) might be broken.

You might be able to replace the touch binary with a symlink to busybox as a temporary workaround until you can get coreutils reinstalled. Assuming that /bin/busybox exists, the following command will replace the touch binary with a symlink to busybox:

ln -sf busybox /bin/touch
Comment 29 junkmail 2008-08-03 22:23:27 UTC
Thanks for investigating this for me.

On my system, touch is located at: /usr/bin/touch rather than /bin/touch, and I re-installed coreutils as part of an emerge -e system that I did when I was trying to sort the issue myself.

I'll try the busybox symlink and report back if I still run into problems, though it might take a week or too because I'm pretty up to date now :)
Comment 30 junkmail 2008-08-16 11:44:43 UTC
(In reply to comment #29)

I ran the command ln -sf busybox /bin/touch

Unfortunately, it hasn't helped:

Messages for package net-nds/openldap-2.3.43:

 *
 * ERROR: net-nds/openldap-2.3.43 failed.
 * Call stack:
 *               ebuild.sh, line 1637:  Called die
 * The specific snippet of code:
 *      preprocess_ebuild_env || \n
 *              die "error processing environment"
 *  The die message:
 *   error processing environment
 *
 * If you need support, post the topmost build error, and the call stack if rele
vant.
 * A complete build log is located at '/var/tmp/binpkgs/net-nds/openldap-2.3.43/
temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/binpkgs/net-nds/openldap-
2.3.43/temp/environment'.
 *
 * The 'postrm' phase of the 'net-nds/openldap-2.3.43' package has failed
 * with exit value 1.
 *
 * The problem occurred while executing the ebuild file named
 * 'openldap-2.3.43.ebuild' located in the '/var/db/pkg/net-
 * nds/openldap-2.3.43' directory. If necessary, manually remove the
 * environment.bz2 file and/or the ebuild file located in that directory.

Comment 31 Martin von Gagern 2008-08-16 13:26:20 UTC
Everything since comment #23 seems to me to be a different bug. As I'm the original reporter, I can't unsubscribe from the bug messages, even as that bug doesn't concern me at all.

First it was about ebuilds not being removable due to cached eclass functions, and workarounds for that issue are in comment #2 and comment #3. After that we had a lot of duplicates, all fixed in the same way. Then since comment #23 there seems to be a single instance with a problem in ebuild.sh, which seems to be only accidentially fixed by removing the environment. This sure sounds like a bug, but it's not the same one. I suggest you open a new one for that.
Comment 32 junkmail 2008-08-16 17:27:20 UTC
(In reply to comment #31)

I'm by no means an expert on this stuff, but to me it appears that the errors are superficially the same, and the workaround is the same. I know how much hassle the bug-wranglers have sorting out duplicates so I posted it here.

If the dev responsible would prefer I opened a new bug, I'll be happy to
Comment 33 Zac Medico gentoo-dev 2008-08-16 19:01:03 UTC
(In reply to comment #32)
> If the dev responsible would prefer I opened a new bug, I'll be happy to

Yes, please open a new bug because the "Argument list too long" error from touch has nothing to do with sys-apps/portage. You've got some sort of breakage in the sys-apps/coreutils package which has a separate maintainer.
Comment 34 marc 2008-09-08 03:32:55 UTC
(In reply to comment #18)
> This is fixed in 2.1.5_rc7.
> 

I belive so, but all newer versions on portage are masked by keyword AMD64, I have unmasked them with package.keywords, but if there are masked by AMD64, I suppose it's an x86 build only, would it be safe to try? or should I just mask 2.1.4.4 and stick with 2.1.2.2 untill a new final version of portage comes out?
Comment 35 Zac Medico gentoo-dev 2008-09-08 03:38:50 UTC
(In reply to comment #34)
You'll have to be more specific about the type of problem that you are experiencing. The only difference between 2.1.4.4 and 2.1.5 is that the error message is more informative (see comment #17).
Comment 36 marc 2008-09-08 03:58:23 UTC
(In reply to comment #35)
> (In reply to comment #34)
> You'll have to be more specific about the type of problem that you are
> experiencing. The only difference between 2.1.4.4 and 2.1.5 is that the error
> message is more informative (see comment #17).
> 

Okay, so right now i'm getting through with portage >2.1.2.2 masked, but I don't know if a blocked package error will come later... so here is the specific error i get with 2.1.4.4:

>>> Emerging (1 of 63) dev-util/pkgconfig-0.23 to /
 * pkg-config-0.23.tar.gz RMD160 SHA1 SHA256 size ;-) ...                 [ ok ]
 * checking ebuild checksums ;-) ...                                      [ ok ]
 * checking auxfile checksums ;-) ...                                     [ ok ]
 * checking miscfile checksums ;-) ...                                    [ ok ]
 * checking pkg-config-0.23.tar.gz ;-) ...                                [ ok ]
/var/tmp/portage/dev-util/pkgconfig-0.23/temp/environment: line 1: syntax error near unexpected token `)'
/var/tmp/portage/dev-util/pkgconfig-0.23/temp/environment: line 1: `1Óµ	Þûu'ø]1厰Mj£ôW#øšU‰ú™ÅéÊLÝåe[H,žöé"|„ö5ZŽÂ=$'\335\272q\326f\205\322u\031\037\344\251\335\003R\327\rN\327km^\330\200BH\334\221\324m\024M\204MlE\220\371\265\331\245}\341\003bZ\345\005B\310U\336\3575\031\306\341\225\3439\377\035\3251\E\2161\324\327\370\332#\360N\243\314\0061\231 \326\f\233}\371N\177u\020\367\005\317YQU\265qZ\006R\335P\021\242\020~\236\240)\236\a\232\306\3725\224FY\325\342\005b\353\245\032\027\262\336\353T\240\332\031\326\374E\334\2229]#\212\202k\035\340\3274TYi\237\v:b\fV\235\3231X\233e\312a9^\004\271\232\031\375\331\374Y\336\002\312_\225\311\026/\222\241\331Y\034\f\226\002\017\032\340j\365\235\005\035\243\036\342a\036\222\bW\361\027WuMC}P\001&b\E\232\234/\032\241\266\221\234\272\304\236\355E#\3600T\016\246\021\001\246Q\216\211\235\330\001 \346-X\241\310\242\321U\027\271\345\036<\272\332B\231\037\356\235c\330h\237\243I#\337\345c\216a\225\330\265\313.I\335\'\372\313\232}X\323\034$\304)S\004\301#=\272\242\272\255c\271\341\242D&d=2\377\230\206\020\343\330\305!Y\231@\245\330a\211pBK(\343\355''
 [31;01m*[0m 
 [31;01m*[0m ERROR: dev-util/pkgconfig-0.23 failed.
 [31;01m*[0m Call stack:
 [31;01m*[0m               ebuild.sh, line 1641:  Called die
 [31;01m*[0m The specific snippet of code:
 [31;01m*[0m   	preprocess_ebuild_env || \
 [31;01m*[0m   		die "error processing environment"
 [31;01m*[0m  The die message:
 [31;01m*[0m   error processing environment
 [31;01m*[0m 
 [31;01m*[0m If you need support, post the topmost build error, and the call stack if relevant.
 [31;01m*[0m A complete build log is located at '/var/tmp/portage/dev-util/pkgconfig-0.23/temp/build.log'.
 [31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/dev-util/pkgconfig-0.23/temp/environment'.
 [31;01m*[0m 

 * Messages for package dev-util/pkgconfig-0.23:

 * 
 * ERROR: dev-util/pkgconfig-0.23 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/tmp/portage/dev-util/pkgconfig-0.23/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-util/pkgconfig-0.23/temp/environment'.
 * 


I get this error with any package I want to emerge, and I really don't feel like deleting the environment.bz2 file for all of the 300 something packages I have to install to get gnome running! I'm sure you would feel the same way... ;-)
Comment 37 Zac Medico gentoo-dev 2008-09-08 04:33:33 UTC
(In reply to comment #36)
That particular error does not look familiar. Please file a new bug with that error message and attach the environment file located at
/var/tmp/portage/dev-util/pkgconfig-0.23/temp/environment