Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 486734 - emerge always fails with "<sourcefile> does not exist"
Summary: emerge always fails with "<sourcefile> does not exist"
Status: RESOLVED INVALID
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-02 00:31 UTC by Michael Hill
Modified: 2014-08-03 09:48 UTC (History)
0 users

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 Michael Hill 2013-10-02 00:31:46 UTC
This problem happens every time I upgrade to portage 2.2+.  I tried again today and got 2.2.7.  When I try to emerge *anything* (without the -p flag), it fails like this:

>>> Emerging (1 of 3) app-portage/gentoolkit-0.3.0.8-r1
 * gentoolkit-0.3.0.8.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...        [ ok ]
>>> Unpacking source...
>>> Unpacking gentoolkit-0.3.0.8.tar.gz to /var/tmp/portage/app-portage/gentoolkit-0.3.0.8-r1/work
DEBUG: lrwxrwxrwx 1 root root 43 Oct  1 18:18 /var/tmp/portage/app-portage/gentoolkit-0.3.0.8-r1/distdir/gentoolkit-0.3.0.8.tar.gz -> /export/distfiles/gentoolkit-0.3.0.8.tar.gz
 * ERROR: app-portage/gentoolkit-0.3.0.8-r1::gentoo failed (unpack phase):
 *   gentoolkit-0.3.0.8.tar.gz does not exist
 * 
 * Call stack:
 *          ebuild.sh, line   93:  Called src_unpack
 *        environment, line 3577:  Called __eapi0_src_unpack
 *   phase-helpers.sh, line  643:  Called unpack 'gentoolkit-0.3.0.8.tar.gz'
 *   phase-helpers.sh, line  288:  Called die
 * The specific snippet of code:
 *              [[ ! -s ${srcdir}${x} ]] && die "${x} does not exist"
 * 
 * If you need support, post the output of `emerge --info '=app-portage/gentoolkit-0.3.0.8-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-portage/gentoolkit-0.3.0.8-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/app-portage/gentoolkit-0.3.0.8-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-portage/gentoolkit-0.3.0.8-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/app-portage/gentoolkit-0.3.0.8-r1/work'
 * S: '/var/tmp/portage/app-portage/gentoolkit-0.3.0.8-r1/work/gentoolkit-0.3.0.8'

>>> Failed to emerge app-portage/gentoolkit-0.3.0.8-r1, Log file:

>>>  '/var/tmp/portage/app-portage/gentoolkit-0.3.0.8-r1/temp/build.log'

Noticing the line: [[ ! -s ${srcdir}${x} ]] && die "${x} does not exist"
I inserted a couple lines in /usr/lib64/portage/bin/phase-helpers.sh :

285a286,287
>               echo "DEBUG: `ls -ld ${srcdir}${x}`"
>               [[ -s ${srcdir}${x} ]] && echo "DEBUG: ${srcdir}${x} exists"

And in the build.log file I get one line:

DEBUG: lrwxrwxrwx 1 root root 43 Oct  1 18:18 /var/tmp/portage/app-portage/gentoolkit-0.3.0.8-r1/distdir/gentoolkit-0.3.0.8.tar.gz -> /export/distfiles/gentoolkit-0.3.0.8.tar.gz

Running the lines from the command prompt:

$ test -s /var/tmp/portage/app-portage/gentoolkit-0.3.0.8-r1/distdir/gentoolkit-0.3.0.8.tar.gz && echo yes
yes
$ [[ -s /var/tmp/portage/app-portage/gentoolkit-0.3.0.8-r1/distdir/gentoolkit-0.3.0.8.tar.gz ]] && echo yes
yes

So the -s test (file exists and is larger than 0 bytes) succeeds on the command line, but fails when run by emerge(1).

# emerge --info
Portage 2.2.7 (default/linux/amd64/13.0, gcc-4.7.3, glibc-2.17, 3.9.11-gentoo-r1 x86_64)
=================================================================
System uname: Linux-3.9.11-gentoo-r1-x86_64-Intel-R-_Core-TM-_i7-3930K_CPU_@_3.20GHz-with-gentoo-2.2
KiB Mem:    16363556 total,   3637384 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Tue, 01 Oct 2013 12:00:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/ccache:          3.1.9
dev-util/cmake:           2.8.9-r1
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6, 1.12.6, 1.13.1
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.5.4, 4.7.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=core2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg ccache collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.usu.edu/mirrors/gentoo/ http://distfiles.gentoo.org/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j12"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-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=""
USE="X a52 aac acl additions aiglx alsa amd64 ao apache2 audacious audiofile bash-completion bcmath berkdb branding bzip2 bzlib calendar cdinstall cli cracklib crypt curl cxx dbase dbx dedicated device-mapper dga divx doc dot dovecot-sasl dri dv efiemu expat faac fame fbcon ffmpeg fftw flac flatfile fluidsynth font-server fontconfig fontforge gd gecko-sdk gif gimpprint ginac glitz glut gnuplot gnutls gpgme gs gstreamer gtk guidexml hardenedphp hddtemp highlight hou iconv id3tag imagemagick imlib inifile inotify jack jpeg jpeg2k keyscrub lame lastfmradio latin1 lcms libmms libsamplerate lm_sensors logrotate logwatch lzma mbox memlimit mikmod mime mmap mmx modplug modules mount mp3 mp4 mpm-prefork mudflap multilib mysql ncurses no-suexec nocardbus nocd nodrm nomotif nowin nptl nsplugin ofx ogg opengl pam pcntl pcre pda php pie plotutils png posix ppds quotes readline realmedia rtsp sasl server session shared sharedmem simplexml skins smpeg smtp sndfile sockets sou sse sse2 ssl ssse3 startup-notification subtitles system-sqlite sysvipc tagwriting tcl tcpd theora threads tidy tiff timidity tk truetype ups usb usbhost userlocales vhosts videos vim-syntax vorbis wma wmp wv wxgtk1 wxwidgets wxwindows xcb xine xml xpm xprint xscreensaver xvid zlib" ABI_X86="64" ALSA_CARDS="ice1712" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_core authn_dbd authn_dbm authn_default authn_file authz_core authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid 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 socache_shmcb speling status unique_id unixd userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" 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="efi-64 pc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" QEMU_SOFTMMU_TARGETS="i386" QEMU_USER_TARGETS="i386" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="vga nvidia" 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, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
Comment 1 Rafał Mużyło 2013-10-02 04:47:23 UTC
Did you check the permissions along the path ?
With FEATURES="userpriv usersandbox usersync" it might matter.
Comment 2 Michael Hill 2013-10-02 08:35:44 UTC
"Did you check the permissions along the path ?"

The build runs as root.  The only non-root execution I'm aware of is fetching the file, but it is already downloaded.  Also, the path permissions have not changed in years, and have worked for all versions of portage prior to 2.2.  And I ran those "test -s" statements as myself, not as root.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2013-10-03 15:29:42 UTC
What does `ls -ld /export/distfiles' tell you?
Comment 4 Michael Hill 2013-10-04 08:02:41 UTC
(In reply to Jeroen Roovers from comment #3)
> What does `ls -ld /export/distfiles' tell you?

$ ls -ld /export/distfiles
drwxrwsr-x 6 portage portage 49152 Oct  1 18:18 /export/distfiles/
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2013-10-04 13:48:38 UTC
So symlink handling has gone bad, maybe?
Comment 6 Michael Hill 2014-08-03 09:04:38 UTC
Nearly a year later, and nothing has changed.  :^(

After having upgraded to 2.2.8-r1 on some x86 machines (and 2.2.10 on a ~x86 laptop) with good results, I tried again on my ~amd64 main system, which shares /export/distfiles to the other three via NFS.  Here are the results from my attempt to "emerge -u libgpg-error":

$ cat /var/tmp/portage/dev-libs/libgpg-error-1.13/temp/build.log
 * Package:    dev-libs/libgpg-error-1.13
 * Repository: gentoo
 * Maintainer: crypto@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
 * FEATURES:   ccache preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking libgpg-error-1.13.tar.bz2 to /var/tmp/portage/dev-libs/libgpg-error-1.13/work
 * ERROR: dev-libs/libgpg-error-1.13::gentoo failed (unpack phase):
 *   libgpg-error-1.13.tar.bz2 does not exist
 * 
 * Call stack:
 *          ebuild.sh, line   93:  Called src_unpack
 *        environment, line 2868:  Called __eapi0_src_unpack
 *   phase-helpers.sh, line  648:  Called unpack 'libgpg-error-1.13.tar.bz2'
 *   phase-helpers.sh, line  288:  Called die
 * The specific snippet of code:
 *              [[ ! -s ${srcdir}${x} ]] && die "${x} does not exist"
 * 
 * If you need support, post the output of `emerge --info '=dev-libs/libgpg-error-1.13::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-libs/libgpg-error-1.13::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-libs/libgpg-error-1.13/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/libgpg-error-1.13/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-libs/libgpg-error-1.13/work'
 * S: '/var/tmp/portage/dev-libs/libgpg-error-1.13/work/libgpg-error-1.13'

# emerge --info '=dev-libs/libgpg-error-1.13::gentoo'
Portage 2.2.10 (default/linux/amd64/13.0, gcc-4.7.3, glibc-2.17, 3.12.13-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.12.13-gentoo-x86_64-Intel-R-_Core-TM-_i7-3930K_CPU_@_3.20GHz-with-gentoo-2.2
KiB Mem:    16363252 total,   1251724 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Sat, 02 Aug 2014 12:00:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.5-r4, 3.2.5-r3, 3.3.2-r2
dev-util/ccache:          3.1.9-r3
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.5.4, 4.7.3-r1
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=core2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg ccache collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.usu.edu/mirrors/gentoo/ http://distfiles.gentoo.org/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j12"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-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=""
USE="X a52 aac acl additions aiglx alsa amd64 ao apache2 audacious audiofile bash-completion bcmath berkdb branding bzip2 bzlib calendar cdinstall cli cracklib crypt curl cxx dbase dbx dedicated device-mapper dga divx doc dot dovecot-sasl dri dv efiemu expat faac fame fbcon ffmpeg fftw flac flatfile fluidsynth font-server fontconfig fontforge gd gecko-sdk gflags gif gimpprint ginac glitz glut gnuplot gnutls gpgme gs gstreamer gtk guidexml hardenedphp hddtemp highlight hou iconv id3tag imagemagick imlib inifile inotify jack jpeg jpeg2k keyscrub lame lastfmradio latin1 lcms libmms libsamplerate lm_sensors logrotate logwatch lzma mbox memlimit mikmod mime mmap mmx modplug modules mount mp3 mp4 mpm-prefork multilib mysql mysqli ncurses no-suexec nocardbus nocd nodrm nomotif nowin nptl nsplugin ofx ogg opengl pam pcntl pcre pda pdo php pie plotutils png posix ppds quotes readline realmedia rtsp sasl server session shared sharedmem simplexml skins smp smpeg smtp sndfile sockets sou sse sse2 ssl ssse3 startup-notification subtitles system-sqlite sysvipc tagwriting tcl tcpd theora threads tidy tiff timidity tk truetype ups usb usbhost userlocales vhosts videos vim-syntax vorbis wma wmp wv wxgtk1 wxwidgets wxwindows x264 xcb xine xml xpm xprint xscreensaver xvid zlib" ABI_X86="64" ALSA_CARDS="ice1712" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_core authn_dbd authn_dbm authn_default authn_file authz_core authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid 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 socache_shmcb speling status unique_id unixd userdir usertrack vhost_alias" APACHE2_MPMS="worker" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" 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 ublox ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2 python3_3" QEMU_SOFTMMU_TARGETS="i386" QEMU_USER_TARGETS="i386" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="vga nvidia" 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"
USE_PYTHON="2.7 3.2 3.3"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC

# emerge -pqv '=dev-libs/libgpg-error-1.13::gentoo'
[ebuild     U ] dev-libs/libgpg-error-1.13 [1.10-r1] USE="-common-lisp -nls -static-libs" ABI_X86="(64%*) -32% (-x32)" 

Just in case it's not clear from the above that the file did not need downloading on this attempt (because it already exists):

$ ls -l /usr/portage/distfiles/libgpg-error-1.13.tar.bz2
-rw-rw-r-- 1 root portage 489948 Apr 15 06:22 /usr/portage/distfiles/libgpg-error-1.13.tar.bz2

(That's running as a non-root user, so there's nothing wrong with the permissions.)

Please help; when the tool that arguably makes Gentoo Gentoo doesn't work, it shakes my confidence in running it (which I have been doing since November 2003).  :^(
Comment 7 Michael Hill 2014-08-03 09:48:35 UTC
Again, modifying /usr/lib64/portage/bin/phase-helpers.sh with a debug statement, I see that it is starting out by looking in the build directory.  So at line 288 (the die "does not exist" error), I insert:

    echo DEBUG: "${srcdir}${x}"

In the output:

DEBUG: /var/tmp/portage/dev-libs/libgpg-error-1.13/distdir/libgpg-error-1.13.tar.bz2

Again, non-root user:

$ ls -l /var/tmp/portage/dev-libs/libgpg-error-1.13/distdir/libgpg-error-1.13.tar.bz2
lrwxrwxrwx 1 root root 43 Aug  3 03:34 /var/tmp/portage/dev-libs/libgpg-error-1.13/distdir/libgpg-error-1.13.tar.bz2 -> /export/distfiles/libgpg-error-1.13.tar.bz2

$ ls -lL /var/tmp/portage/dev-libs/libgpg-error-1.13/distdir/libgpg-error-1.13.tar.bz2
-rw-rw-r-- 1 root portage 489948 Apr 15 06:22 /var/tmp/portage/dev-libs/libgpg-error-1.13/distdir/libgpg-error-1.13.tar.bz2

Hmmm...  it's linking directly to /export/distfiles/ ...  Checking perms (which I thought I'd done last year), I see:

$ ls -ld /export
drwxr-x--- 3 root    root      4096 Apr 29  2013 /export/

(Security for an NFS export directory.)  My user account is in group root, which explains why I had no trouble traversing it.  The portage account is not.  I figured the lesser evil was to open execute perms to other so I changed it like so:

$ ls -ld /export
drwxr-x--x 3 root root 4096 Apr 29  2013 /export/

And emerge now works!  I'm sorry, I thought I had checked the full path the last time I inserted debug code into the portage scripts, but I missed the base of the path.  :^(  This bug can be closed.