# ll /etc/portage lrwxrwxrwx 1 root root 24 Dec 3 13:23 /etc/portage -> ../var/cache/portage/etc # ll /etc/portage/make.profile lrwxrwxrwx 1 root root 61 Dec 3 13:25 /etc/portage/make.profile -> ../gentoo/profiles/hardened/linux/ia64/server -> portage does not complain about make.profile being broken, but it will silently assume no keywords are set. When I change the setup to: lrwxrwxrwx 1 root root 61 Dec 3 13:25 /etc/portage/make.profile -> /var/cache/portage/gentoo/profiles/hardened/linux/ia64/server (no relative symlink anymore), portage will start working again. Reproducible: Always
It seems to work correctly for me, if I create a similar configuration for the default/linux/x86/10.0/desktop profile. I guess there's something different about your system. Did you create that hardened/linux/ia64/server profile yourself? If the parent files refer to symlinked locations, then you might have issues because of that. Portage's profile traversal code uses python's os.path.normpath() when resolving parents, and this function can do things like collapse '/foo/../bar' to '/bar', which yields invalid results for cases such as when '/foo' is a symlink.
(In reply to comment #1) > Portage's profile traversal code uses python's > os.path.normpath() when resolving parents, and this function can do things like > collapse '/foo/../bar' to '/bar', which yields invalid results for cases such > as when '/foo' is a symlink. That is probably what happened to me, since /etc/portage is a symlink. 1) Is this a situation you would want to fix? 2) Will I have more luck with a hardlink?
(In reply to comment #2) > That is probably what happened to me, since /etc/portage is a symlink. The portage code calls os.path.realpath() on make.profile, so that should resolve the /etc/portage symlink. Since I wasn't able to reproduce the problem with a similar configuration, I still need more information. Please reproduce the problem, and then post the output of this command: python -c 'import portage ; print portage.settings.profiles' That might give us a clue if there is a problem in the traversal of the profile parents.
# ll /etc/portage/make.profile lrwxrwxrwx 1 root root 45 Dec 4 10:13 /etc/portage/make.profile -> ../gentoo/profiles/hardened/linux/ia64/server # python -c 'import portage ; print portage.settings.profiles' (u'/etc/gentoo/profiles/hardened/linux/ia64/server', u'/etc/portage/profile') So it seems to get the dir wrong, but does not complain about it.
Try this too please: python -c 'import os; print os.path.realpath("/etc/portage/make.profile")'
# ll /etc/portage/make.profile lrwxrwxrwx 1 root root 45 Dec 4 10:32 /etc/portage/make.profile -> ../gentoo/profiles/hardened/linux/ia64/server # python -c 'import os; print os.path.realpath("/etc/portage/make.profile")' /var/cache/portage/gentoo/profiles/hardened/linux/ia64/server