Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 328763

Summary: In install chroot ping and wget work from command line but wget gets temporary dns failure in emerge
Product: Gentoo Linux Reporter: R. David Murray <rdmurray>
Component: [OLD] UnspecifiedAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED INVALID    
Severity: major    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description R. David Murray 2010-07-17 23:38:19 UTC
I'm attempting to create a new gentoo system image.  I unpacked stage3-i686-20100622.tar.bz and the portage snapshot current on the OSU mirror (dated july 16 21:45).  After copying /etc/resolv.conf from my main system and chrooting, I can ping things from the command line, and wget works, but when I try to 'emerge -v gentoo-sources' I get:

  Resolving distfiles.gentoo.org... failed: Temporary failure in name resolution.

and emerge fails.  I have tried using just a public name server IP in the chroot resolv.conf, as I found a forum post where that solved a similar problem for other people, but for me the symptoms do not change.

Reproducible: Always
Comment 1 R. David Murray 2010-07-18 14:39:33 UTC
OK, after some debugging, I've figured out what my problem was.  I operate with a default umask that does not make files world readable, and so when I copied /etc/resolv.conf from the main system into the chroot directory, it ended up not world readable.  This isn't a problem for most things, since the file is owned by root and I'm operating as root in the chroot.  But portage drops privileges before doing the fetch, so at that point it loses access to /etc/resolv.conf and thus the internet.  It would be nice if glibc produced a more useful error message in this circumstance, but it's not Gentoo's problem.