An attempt to emerge bogofilter fails repeatedly because the tarball cannot be unpacked. The download is strange - it fails on one mirror, then 'resumes" on another. The result is a file with inadequate permissions to allow unpacking. Reproducible: Always Steps to Reproduce: 1. rm /usr/portage/distfiles/bogofilter-0.8.0.tar.gz #if there is a broken file there. 2. emerge rsync - succeeds 3. emerge bogofilter Actual Results: root@triffid etc # emerge bogofilter Calculating dependencies ...done! >>> emerge (1 of 1) net-mail/bogofilter-0.8.0 to / >>> Downloading ftp://ftp.oregonstate.edu/pub/gentoo/distfiles/bogofilter-0.8.0.tar.gz --11:51:45-- ftp://ftp.oregonstate.edu/pub/gentoo/distfiles/bogofilter-0.8.0.tar.gz => `/usr/portage/distfiles/bogofilter-0.8.0.tar.gz' Resolving ftp.oregonstate.edu... done. Connecting to ftp.oregonstate.edu[128.193.0.3]:21... connected. Logging in as anonymous ... Logged in! ==> SYST ... done. ==> PWD ... done. ==> TYPE I ... done. ==> CWD /pub/gentoo/distfiles ... done. ==> PASV ... done. ==> RETR bogofilter-0.8.0.tar.gz ... done. Length: 178,000 (unauthoritative) 0% [ ] 0 --.--K/s ETA --:-- 11:51:47 (0.00 B/s) - `/usr/portage/distfiles/bogofilter-0.8.0.tar.gz' saved [0] >>> Resuming download... >>> Downloading ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo/distfiles/bogofilter-0.8.0.tar.gz --11:51:47-- ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo/distfiles/bogofilter-0.8.0.tar.gz => `/usr/portage/distfiles/bogofilter-0.8.0.tar.gz' Resolving ftp.gtlib.cc.gatech.edu... done. Connecting to ftp.gtlib.cc.gatech.edu[130.207.108.134]:21... connected. Logging in as anonymous ... Logged in! ==> SYST ... done. ==> PWD ... done. ==> TYPE I ... done. ==> CWD /pub/gentoo/distfiles ... done. ==> PASV ... done. ==> RETR bogofilter-0.8.0.tar.gz ... done. [ <=> ] 178,000 134.86K/s 11:51:51 (134.86 KB/s) - `/usr/portage/distfiles/bogofilter-0.8.0.tar.gz' saved [178000] >>> md5 src_uri ;-) bogofilter-0.8.0.tar.gz >>> Unpacking source... >>> Unpacking bogofilter-0.8.0.tar.gz to /home/portage_tmp/portage/bogofilter-0.8.0/work tar (child): /usr/portage/distfiles/bogofilter-0.8.0.tar.gz: Cannot open: Permission denied tar (child): Error is not recoverable: exiting now tar: Child returned status 2 tar: Error exit delayed from previous errors !!! ERROR: net-mail/bogofilter-0.8.0 failed. !!! Function unpack, Line 270, Exitcode 2 !!! failure unpacking bogofilter-0.8.0.tar.gz root@triffid etc # ls -l /usr/portage/distfiles/bogofilter-0.8.0.tar.gz -rw------- 1 root root 174K May 23 11:51 /usr/portage/distfiles/bogofilter-0.8.0.tar.gz root@triffid etc # emerge info Portage 2.0.48 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r4) ================================================================= System uname: 2.4.20 i686 AMD Athlon(tm) Processor GENTOO_MIRRORS="ftp://ftp.oregonstate.edu/pub/gentoo ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo http://gentoo.oregonstate.edu http://distro.ibiblio.org/gentoo" CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/home/portage_tmp" PORTDIR_OVERLAY="" USE="tetex java guile esd imlib scanner x86 oss 3dfx 3dnow acpi alsa apm arts avi berkdb cdr crypt cups encode gdbm gif gpm gtk imlibjava jpeg kde -gnome libg++ libwww mikmod mmx motif mpeg mozilla ncurses nls oggvorbis opengl pam perl pdflib png python qt qtmt quicktime readline sdl slang spell sse ssl svga tcltk tcpd truetype usb X xml2 xmms xv zlib" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon -O3 -pipe" CXXFLAGS="-march=athlon -O3 -pipe" ACCEPT_KEYWORDS="x86" MAKEOPTS="-j2" AUTOCLEAN="yes" SYNC="rsync://rsync.ca.gentoo.org/gentoo-portage/" FEATURES="sandbox buildpkg ccache userpriv usersandbox"
I experience the same permissions problem in every emerge where the distfile download gets interrupted. I suspect that the reasons are these: 1. wget stores the partly-downloaded file with "600" permissions. 2. When the download completes, the permissions remain the same. 3. Rick and I both have "userpriv usersandbox" in our FEATURES, so running-with-user-privileges portage cannot read - and, therefore, uncompress - the distfile.
should be fixed, reopen if not
Yes, works well now. Many thanks.