etc-update utility doesn't work properly on Mac OS X. This is because /etc on Mac OS X is a symbolic link to /private/etc and find doesn't follow it (other CONFIG_PROTECTed directories are fine). I will attach a patch to fix the problem. (Simply add / to CONFIG_PROTECTed directories for find to follow symbolic links and remove the / afterwards.)
Created attachment 37634 [details, diff] etc-update-macos.diff
Thanks Mamoru; it'll pop up in the next release after .51_pre20
portage-2.0.51_pre23 seems to include the patch, but it needs another patch to include (etc-update in _pre23 depends on GNU sed, so I added a function to wrap sed to use gsed).
Created attachment 39400 [details, diff] a simple diff to use GNU sed if USERLAND is BSD alias didn't work
I don't know if there are other changes from _pre20, but in _pre23 etc-update is still having trouble. The bug is in get_config(), I didn't understand what exactly do the regexp, but this patch for me works(probably it's a dirty fix): --- etc-update.orig Sat Sep 11 17:38:49 2004 +++ etc-update Sat Sep 11 17:47:25 2004 @@ -19,7 +19,7 @@ # item. If there's more than one of the same configuration item, # then allow the last setting to take precedence. cut -d'#' -f1-1 /etc/etc-update.conf | \ - sed -ne "s/^ *$item *= *\([\"']\{0,1\}\)\(.*\)\1/\2/p" |sed -e '$p;d' + sed -ne "s/^ *$item *= *\([\"']\{0,1\}\)\(.*\)\1/\2/p" |sed -e '$p;d'|sed -e "s/[\"\']$//" } function scan() {
too late, sorry ;)
What's the current status on this bug?
Is/will *BSD be using the same method for handling sed/gsed et al?
Jason, yes. We'll use the same thing to handle sed/gsed. I tested the second patch (to test if the userland is BSD) and it worked without any problems in my Gentoo/FBSD system.
Thanks, it's fixed in _rc7. However, stacked profile (default-macos/ppc/10.3/make.defaults) set USERLAND="macos", and my make.conf set it to BSD (this comes from Gentoo for Mac OS X installer). Which is correct? (pvdabeel sent a mail to macos@g.o that we use USERLAND="macos", which would break this patch in the future)
USERLAND is set to BSD, as is hardcoded in portage, no matter what you set it to in make.conf. Do a grep on USERLAND and BSD on the portage code, or just throw an echo in an ebuild. This is definately a problem if it's supposed to be 'macos' as pvdabeel said. I opened a bug about it but it was closed (and misunderstood?) - bug 64510.
USERLAND is an internal portage variable. Profile's shouldn't be defining it and ebuilds should not need to ever make use of it. GLEP22 does not require it to be set at all.
Um, I believe that drobbins added the USERLAND variable long ago for macos, and I co-opted it for *BSD. That said, I agree that nobody should be using it. Ideally, we should be abstracting those calls that have different semantics between platforms so that ebuild authors can ignore the details as much as possible.
Removed USERLAND="macos" from stacked profiles. All fixed in CVS. Thanks!