As the title. Reproducible: Always Steps to Reproduce: % /usr/bin/R -e 'quit()' Actual Results: % /usr/bin/R -e 'quit()' /usr/bin/R: line 191: /var/tmp/portage/._portage_reinstall_.q59Bhf/bin/ebuild-helpers/sed: No such file or directory ERROR: option '-e' requires an argument % Expected Results: % /usr/bin/R -e 'quit()' > quit() % Seems to be because of some incorrect configuration for expansion of @SED@ during the installation. Output of `emerge --info dev-lang/R': Portage 2.1.11.55 (default/linux/amd64/13.0/desktop, gcc-4.7.2, glibc-2.16.0, 3.8.2-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-3.8.2-gentoo-x86_64-Intel-R-_Pentium-R-_Dual_CPU_T2370_@_1.73GHz-with-gentoo-2.2 KiB Mem: 2045180 total, 294232 free KiB Swap: 2095452 total, 2094976 free Timestamp of tree: Fri, 15 Mar 2013 12:45:01 +0000 ld GNU ld (GNU Binutils) 2.23.1 app-shells/bash: 4.2_p45 dev-java/java-config: 2.1.12-r1 dev-lang/python: 2.7.3-r3, 3.2.3-r2 dev-util/cmake: 2.8.10.2-r1 dev-util/pkgconfig: 0.28 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.11.8 sys-apps/sandbox: 2.6 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.6, 1.13.1 sys-devel/binutils: 2.23.1 sys-devel/gcc: 4.7.2-r1 sys-devel/gcc-config: 1.8 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.8 (virtual/os-headers) sys-libs/glibc: 2.16.0::caspervector Repositories: gentoo gentoo-zh gentoo-haskell caspervector ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=nocona -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=nocona -O2 -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps=y --keep-going=y" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fakeroot fixlafiles merge-sync metadata-transfer news parallel-fetch parallel-install protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch usersync" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://mirrors.ustc.edu.cn/gentoo/ http://debian.bjtu.edu.cn/gentoo/" LANG="en_GB.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_COMPRESS="xz" PORTAGE_COMPRESS_FLAGS="" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS="--human-readable --timeout 15" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/var/lib/layman/gentoo-zh /var/lib/layman/haskell /usr/local/portage" SYNC="rsync://rsync.cn.gentoo.org/gentoo-portage" USE="X a52 aac acl acpi alsa amd64 bash-completion berkdb branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cxx dbus dri dts dvd dvdr emboss encode exif fam ffmpeg firefox flac fontconfig fortran gif gnutls gpg gpm gtk gtk3 iconv ipv6 jack jpeg lcms libedit libnotify mad maildir mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds qt3support qt4 readline sdl session smp socks5 spell sse sse2 sse3 ssl ssse3 startup-notification svg system-sqlite tcpd threads tiff truetype udev udisks unicode upower usb vaapi vorbis wxwidgets x264 xcb xft xinerama xml xv xvid zlib zsh-completion" ABI_X86="64" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_GB" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, USE_PYTHON ================================================================= Package Settings ================================================================= dev-lang/R-2.15.3 was built with the following: USE="X bash-completion cairo jpeg nls openmp png readline tiff -doc -icu -java -lapack -minimal -perl (-prefix) -profile -static-libs -tk" CFLAGS="-march=nocona -O2 -pipe -fno-ipa-cp-clone" CXXFLAGS="-march=nocona -O2 -pipe -fno-ipa-cp-clone"
This seems to be a wider problem of temporary filenames generated by '/usr/lib64/portage/pym/portage/package/ebuild/doebuild.py' (in method '_prepare_self_update') leaking into installed scripts. Pretty much all cases I've seen relate to 'sed'… In my case, I noticed this due to random breakage with 'libtool'. The weird thing is that I've tried tracking down (grep -r) all instances of this leakage. Manually corrected all of them. Rebuilt the system (emerge -eqv --keep-going system) and the problem keeps coming back *in the same places* (only the 6 random characters picked by 'tempfile.mkdtemp' keep changing). Here's the grep output on a broken system: ----- KO ----- # grep -r _portage_reinstall_ /etc /var {/usr,}/{*bin,lib*} /usr/bin/libtoolize:: ${SED="/var/tmp/portage/._portage_reinstall_.3FJgBO/bin/ebuild-helpers/sed"} /usr/bin/libtool:SED="/var/tmp/portage/._portage_reinstall_.3FJgBO/bin/ebuild-helpers/sed" Binary file /usr/bin/emacs-24 matches /usr/bin/mk_cmds:SED=/var/tmp/portage/._portage_reinstall_.3FJgBO/bin/ebuild-helpers/sed /usr/lib/portage/pym/portage/package/ebuild/doebuild.py: "", "._portage_reinstall_.", build_prefix) Binary file /usr/lib/portage/pym/portage/package/ebuild/doebuild.pyo matches Binary file /usr/lib/portage/pym/portage/package/ebuild/doebuild.pyc matches /usr/lib/perl5/5.12.4/x86_64-linux/CORE/config.h:#define LOC_SED "/var/tmp/portage/._portage_reinstall_.3FJgBO/bin/ebuild-helpers/sed" /**/ /usr/lib/perl5/5.12.4/x86_64-linux/Config_heavy.pl:full_sed='/var/tmp/portage/._portage_reinstall_.3FJgBO/bin/ebuild-helpers/sed' /usr/lib64/portage/pym/portage/package/ebuild/doebuild.py: "", "._portage_reinstall_.", build_prefix) Binary file /usr/lib64/portage/pym/portage/package/ebuild/doebuild.pyo matches Binary file /usr/lib64/portage/pym/portage/package/ebuild/doebuild.pyc matches /usr/lib64/perl5/5.12.4/x86_64-linux/CORE/config.h:#define LOC_SED "/var/tmp/portage/._portage_reinstall_.3FJgBO/bin/ebuild-helpers/sed" /**/ /usr/lib64/perl5/5.12.4/x86_64-linux/Config_heavy.pl:full_sed='/var/tmp/portage/._portage_reinstall_.3FJgBO/bin/ebuild-helpers/sed' ----- KO ----- The same command on a sane machine gives the following output: ----- OK ----- # grep -r _portage_reinstall_ /etc /var {/usr,}/{*bin,lib*} Binary file /usr/bin/emacs-24 matches /usr/lib/portage/pym/portage/package/ebuild/doebuild.py: "", "._portage_reinstall_.", build_prefix) Binary file /usr/lib/portage/pym/portage/package/ebuild/doebuild.pyo matches Binary file /usr/lib/portage/pym/portage/package/ebuild/doebuild.pyc matches Binary file /usr/lib/python3.2/site-packages/portage/package/ebuild/__pycache__/doebuild.cpython-32.pyo matches Binary file /usr/lib/python3.2/site-packages/portage/package/ebuild/__pycache__/doebuild.cpython-32.pyc matches Binary file /usr/lib/python2.7/site-packages/portage/package/ebuild/doebuild.pyo matches Binary file /usr/lib/python2.7/site-packages/portage/package/ebuild/doebuild.pyc matches /usr/lib64/portage/pym/portage/package/ebuild/doebuild.py: "", "._portage_reinstall_.", build_prefix) Binary file /usr/lib64/portage/pym/portage/package/ebuild/doebuild.pyo matches Binary file /usr/lib64/portage/pym/portage/package/ebuild/doebuild.pyc matches Binary file /usr/lib64/python3.2/site-packages/portage/package/ebuild/__pycache__/doebuild.cpython-32.pyo matches Binary file /usr/lib64/python3.2/site-packages/portage/package/ebuild/__pycache__/doebuild.cpython-32.pyc matches Binary file /usr/lib64/python2.7/site-packages/portage/package/ebuild/doebuild.pyo matches Binary file /usr/lib64/python2.7/site-packages/portage/package/ebuild/doebuild.pyc matches ----- OK ----- Unfortunately, I don't quite have the time (or the portage chops) to find the root cause, but it's a pretty annoying issue… (-;
I'm not sure if this is due to changes in portage, or if this may have worked even with the older versions, but doing "emerge <EFFECTED PKG>" seems to resolve the issue. [For good measure, I also deleted all the cached python code for portage (.pyc and .pyo files) before trying this to make sure any old cruft is gone…]
Same issue, portage 2.2.1 and 2.2.7: this is a major issue for me, it's killing my autobuilds. Somewhere, we are losing a race, badly. Nu portage-2.2.7 # grep -r _portage_reinstall_ /etc {/usr,}/{*bin,lib*} Binary file /usr/bin/lynx matches /usr/bin/prxs:my $installer = q(/var/tmp/portage/._portage_reinstall_.iobh1y/bin/ebuild-helpers/xattr/install -c); /usr/lib/icu/51.1/pkgdata.inc:INSTALL_CMD=/var/tmp/portage/._portage_reinstall_.cde5yw/bin/ebuild-helpers/xattr/install -c /usr/lib/ruby/1.9.1/i686-linux/rbconfig.rb: CONFIG["INSTALL"] = '/var/tmp/portage/._portage_reinstall_.cde5yw/bin/ebuild-helpers/xattr/install -c' /usr/lib/python3.2/config-3.2/Makefile:INSTALL= /var/tmp/portage/._portage_reinstall_.weov16/bin/ebuild-helpers/xattr/install -c Binary file /usr/lib/python3.2/site-packages/portage/package/ebuild/__pycache__/doebuild.cpython-32.pyc matches Binary file /usr/lib/python3.2/site-packages/portage/package/ebuild/__pycache__/doebuild.cpython-32.pyo matches Binary file /usr/lib/python2.7/_sysconfigdata.pyo matches Binary file /usr/lib/python2.7/site-packages/portage/package/ebuild/doebuild.pyo matches Binary file /usr/lib/python2.7/site-packages/portage/package/ebuild/doebuild.pyc matches /usr/lib/python2.7/config/Makefile:INSTALL= /var/tmp/portage/._portage_reinstall_.weov16/bin/ebuild-helpers/xattr/install -c Binary file /usr/lib/python2.7/_sysconfigdata.pyc matches /usr/lib/python2.7/_sysconfigdata.py: 'INSTALL': '/var/tmp/portage/._portage_reinstall_.weov16/bin/ebuild-helpers/xattr/install -c', /usr/lib/python2.7/_sysconfigdata.py: 'INSTALL_DATA': '/var/tmp/portage/._portage_reinstall_.weov16/bin/ebuild-helpers/xattr/install -c -m 644', /usr/lib/python2.7/_sysconfigdata.py: 'INSTALL_PROGRAM': '/var/tmp/portage/._portage_reinstall_.weov16/bin/ebuild-helpers/xattr/install -c', /usr/lib/python2.7/_sysconfigdata.py: 'INSTALL_SCRIPT': '/var/tmp/portage/._portage_reinstall_.weov16/bin/ebuild-helpers/xattr/install -c', /usr/lib/python2.7/_sysconfigdata.py: 'INSTALL_SHARED': '/var/tmp/portage/._portage_reinstall_.weov16/bin/ebuild-helpers/xattr/install -c -m 555', Binary file /usr/lib/portage/pym/portage/package/ebuild/__pycache__/doebuild.cpython-32.pyo matches Binary file /usr/lib/portage/pym/portage/package/ebuild/__pycache__/doebuild.cpython-32.pyc matches /usr/lib/portage/pym/portage/package/ebuild/doebuild.py: "", "._portage_reinstall_.", build_prefix) Nu portage-2.2.7 #
possible candidates for revert: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=458ce208ed25f2d17666926585e14da6166eb9d7 http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d3f704a425a50b5cfa997a25866929b30f1b7d0f
Any progress ? Emerging dev-db/postgis is failing consistently for me : /var/tmp/portage/._portage_reinstall_.zru70k/bin/ebuild-helpers/xattr/install: Command not found Tried portage-2.2.8-r1 and 2.2.14, as well as reemerging coreutils.
I would consider these issues as defects of the packages that hardcode paths to things like 'install' and 'sed' at build time. They should be using PATH at runtime.
(In reply to Vincent de Phily from comment #5) > Any progress ? Emerging dev-db/postgis is failing consistently for me : You can mitigate these kinds of issues in the future if you upgrade sys-apps/portage by itself, since the helpers are only in a temporary location when portage is upgrading itself. However, I suggest that you file bugs for the defective packages that fail to use PATH to locate binaries.
looks like we need bugs for at least: net-ftp/proftpd www-client/lynx dev-lang/python (both 2.7 and 3.2 definitely have this issue) dev-lang/R sys-devel/libtool dev-lang/perl app-editors/emacs Is there any chance you would consider letting portage upgrade itself separately like it used to? We will be fixing these kinds of things forever if not, and it appears very widespread to me...
For some reason, I just got this on an arm system during the install phase of sys-devel/binutils-2.25.1-r1 with the latter trying to use /var/tmp/portage/._portage_reinstall_.$RANDOM/bin/ebuild-helpers/xattr/install . Temporarily symlinked this to /usr/bin/install to work around the issue.
(In reply to Jaak Ristioja from comment #9) File a new bug please (see bug 574710 for example).
(In reply to Rick Farina (Zero_Chaos) from comment #8) > Is there any chance you would consider letting portage upgrade itself > separately like it used to? No, because the self re-exec shenanigans are too error prone. > We will be fixing these kinds of things forever > if not, and it appears very widespread to me... They're valid bugs. Consider when something moves from /usr/bin to /bin or /sbin or something. They should use PATH at runtime.