After completing code listing 1.6 for "Gentoo Prefix Bootstrap Process for Mac OS X", emerge --oneshot sed fails (as does any other emerge). Reproducible: Always Steps to Reproduce: 1. emerge --oneshot sed Actual Results: raceback (most recent call last): File "/Users/msears/Gentoo/usr/bin/emerge", line 36, in <module> import _emerge File "/Users/msears/Gentoo/usr/lib/portage/pym/_emerge/__init__.py", line 43, in <module> import portage File "/Users/msears/Gentoo/usr/lib/portage/pym/portage/__init__.py", line 97, in <module> from portage.data import ostype, lchown, userland, secpass, uid, wheelgid, \ File "/Users/msears/Gentoo/usr/lib/portage/pym/portage/data.py", line 89, in <module> writemsg( red("portage: "+portageuser+" user or "+portagegroup+" group missing.\n")) NameError: name 'red' is not defined Expected Results: sed emerged
Tried starting from scratch. Got the same results again.
Hi Mike, thanks for the report, this is definitely a problem in the Portage sources. However, the cause is some other problem that Portage is trying to tell you about. In this case actually that the portage user or portage group are missing. Can you tell a bit more on how you bootstrap portage (which/what user) and what's in your $EPREFIX/usr/lib/portage/const_autotool.py?
I am bootstrapping as a normal user (msears). const_autotool.py is found in /Users/msears/Gentoo/lib/portage/pym/portage/ Here is its contents: # Copyright: 2005-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id: const_autotool.py 13398 2009-04-26 11:15:05Z grobian $ # all vars that are to wind up in portage_const must have their name listed in __all__ __all__ = ["EPREFIX", "SYSCONFDIR", "DATADIR", "PORTAGE_BASE", "portageuser", "portagegroup", "rootuser", "rootuid", "rootgid", "PORTAGE_BASH", "PORTAGE_MV"] from os import path EPREFIX = "/Users/msears/Gentoo" SYSCONFDIR = "/Users/msears/Gentoo/etc" DATADIR = "/Users/msears/Gentoo/usr/share" PORTAGE_BASE = "/Users/msears/Gentoo/usr/lib/portage" portagegroup = "BRYNMAWRdomain users" portageuser = "msears" rootuser = "msears" rootuid = 273009453 rootgid = 1612776775 PORTAGE_BASH = "/Users/msears/Gentoo/tmp/usr/bin/bash" PORTAGE_MV = "/Users/msears/Gentoo/tmp/usr/bin/mv"
How do rootuid and rootgid relate to the output of `id`? Are they the same?
wireless240-dhcp240:map64 msears$ id uid=273009453(msears) gid=1612776775(BRYNMAWR\domain users) groups=1612776775(BRYNMAWR\domain users),98(_lpadmin),81(_appserveradm),101(com.apple.sharepoint.group.1),102(com.apple.sharepoint.group.2),79(_appserverusr),80(admin),20(staff)
aha, the '\' is not stored properly in the const_autotool.py file. Does portage work if you fix the entry for portagegroup?
Mike, I need the config.log of portage from ./bootstrap-prefix.sh $EPREFIX portage. In particular the head of this file which reports how configure was called. You should be able to find it in /Users/msears/Gentoo/var/tmp/prefix-portage-*/config.log
Fixing the '\' allowed emerge to work properly. Because of this, unfortunately, the config.log file doesn't exist. I can undo the fix and get you that file though. Thanks for the help. Mike
Ehm, no, you better continue. You will probably hit the same problem after you emerged portage. Let's first see if that's the case.
OK. I'll upload that log when I hit it.
Created attachment 199913 [details] stll fails Yup, portage did fail again. Here is the config.log. Seemd that fixing the const_autotol.py doesn't help. Here's the end of the emerge info: Making install in bin make[1]: Entering directory `/Users/msears/Gentoo/var/tmp/portage/sys-apps/portage-2.2.00.13683/work/prefix-portage-2.2.00.13683/bin' /Users/msears/Gentoo/usr/bin/install -c -d -m 755 -o "msears" -g "BRYNMAWRdomain users" /Users/msears/Gentoo/var/tmp/portage/sys-apps/portage-2.2.00.13683/image//Users/msears/Gentoo/usr/lib/portage/bin /Users/msears/Gentoo/usr/bin/install: invalid group `BRYNMAWRdomain users' make[1]: *** [install] Error 1 make[1]: Leaving directory `/Users/msears/Gentoo/var/tmp/portage/sys-apps/portage-2.2.00.13683/work/prefix-portage-2.2.00.13683/bin' make: *** [install-recursive] Error 1 * ERROR: sys-apps/portage-2.2.00.13683 failed: * make install failed. * * Call stack: * ebuild.sh: 42: <call src_install> * environment:2602: emake DESTDIR="${D}" install || die "make install failed."; * * If you need support, post the topmost build error, and the call stack if relevant. >>> Failed to emerge sys-apps/portage-2.2.00.13683, Log file: >>> '/Users/msears/Gentoo/var/tmp/portage/sys-apps/portage-2.2.00.13683/temp/build.log' * Messages for package sys-apps/portage-2.2.00.13683: * ERROR: sys-apps/portage-2.2.00.13683 failed: * make install failed. * * Call stack: * ebuild.sh: 42: <call src_install> * environment:2602: emake DESTDIR="${D}" install || die "make install failed."; * * If you need support, post the topmost build error, and the call stack if relevant.
Created attachment 199914 [details] here's the build log
thanks, I think I found at least one problem that might cause the rest
heh, I cannot commit any fix at the moment, because we have an expired certificate, sorry about that.
any quick fix I can implement here on the user side?
I figured out how to get around this for now
disregard that last comment...it is untrue.
no, actually, you'll have to rebootstrap if you don't mind. I'm creating the updated snapshot and bootstrap-prefix.sh script as I'm typing now
ok, done, please make sure to refetch bootstrap-prefix.sh (you need revision 49284)
portage now emerges fine in the bootstrap. Now fails in code listing 1.6: emerge --oneshot sed Traceback (most recent call last): File "/Users/msears/Gentoo/usr/bin/emerge", line 42, in <module> retval = emerge_main() File "/Users/msears/Gentoo/usr/lib/portage/pym/_emerge/main.py", line 1036, in emerge_main settings, trees, mtimedb = load_emerge_config() File "/Users/msears/Gentoo/usr/lib/portage/pym/_emerge/actions.py", line 2646, in load_emerge_config settings = root_trees["vartree"].settings File "/Users/msears/Gentoo/usr/lib/portage/pym/portage/util.py", line 1066, in __getitem__ result = lazy_item.func(*pargs, **kwargs) File "/Users/msears/Gentoo/usr/lib/portage/pym/portage/dbapi/vartree.py", line 2280, in __init__ settings=settings, vartree=self) File "/Users/msears/Gentoo/usr/lib/portage/pym/portage/dbapi/vartree.py", line 1456, in __init__ if self.settings.get('CHOST').find('darwin') >= 0: AttributeError: 'NoneType' object has no attribute 'find'
It appears there was a wrongly named file on the server which isn't noticed by the bootstrap script. Can you check if you have any usr/portage/profiles?
No usr/portage profiles.
right, sorry. Can you try the following: rm ${EPREFIX}/usr/portage/.unpacked refetch bootstrap-prefix.sh ./bootstrap-prefix.sh ${EPREFIX} tree
seems to be working...working on code listing 1.8. Will update with any successes/failures.
make install in flex failed: >>> Install flex-2.5.35 into /Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image/Users/msears/Gentoo/ category sys-devel make install DESTDIR=/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image/ make install-recursive make[1]: Entering directory `/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/work/flex-2.5.35' Making install in . make[2]: Entering directory `/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/work/flex-2.5.35' make[3]: Entering directory `/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/work/flex-2.5.35' test -z "/Users/msears/Gentoo/usr/bin" || mkdir -p -- "/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/bin" /Users/msears/Gentoo/tmp/usr/bin/install -c 'flex' '/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/bin/flex' test -z "/Users/msears/Gentoo/usr/lib" || mkdir -p -- "/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/lib" /Users/msears/Gentoo/tmp/usr/bin/install -c -m 644 'libfl.a' '/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/lib/libfl.a' /Users/msears/Gentoo/tmp/usr/bin/install -c -m 644 'libfl_pic.a' '/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/lib/libfl_pic.a' ranlib '/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/lib/libfl.a' ranlib '/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/lib/libfl_pic.a' test -z "/Users/msears/Gentoo/usr/include" || mkdir -p -- "/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/include" /Users/msears/Gentoo/tmp/usr/bin/install -c -m 644 'FlexLexer.h' '/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/include/FlexLexer.h' make[3]: Leaving directory `/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/work/flex-2.5.35' make[2]: Leaving directory `/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/work/flex-2.5.35' Making install in doc make[2]: Entering directory `/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/work/flex-2.5.35/doc' for i in flex.1 ; do \ help2man --name='the fast lexical analyser generator' \ --section=`echo $i | sed -e 's/.*\.\([^.]*\)$/\1/'` \ ../flex > $i || rm -f $i ; \ done /Users/msears/Gentoo/tmp/usr/bin/bash: line 1: help2man: command not found make[3]: Entering directory `/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/work/flex-2.5.35/doc' make[3]: Nothing to be done for `install-exec-am'. test -z "/Users/msears/Gentoo/usr/share/info" || mkdir -p -- "/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/share/info" /Users/msears/Gentoo/tmp/usr/bin/install -c -m 644 './flex.info' '/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/share/info/flex.info' /Users/msears/Gentoo/tmp/usr/bin/install -c -m 644 './flex.info-1' '/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/share/info/flex.info-1' /Users/msears/Gentoo/tmp/usr/bin/install -c -m 644 './flex.info-2' '/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/share/info/flex.info-2' install-info --info-dir='/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/share/info' '/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/share/info/flex.info' test -z "/Users/msears/Gentoo/usr/share/man/man1" || mkdir -p -- "/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/share/man/man1" /Users/msears/Gentoo/tmp/usr/bin/install -c -m 644 'flex.1' '/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/image//Users/msears/Gentoo/usr/share/man/man1/flex.1' /Users/msears/Gentoo/tmp/usr/bin/install: cannot stat `flex.1': No such file or directory make[3]: *** [install-man1] Error 1 make[3]: Leaving directory `/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/work/flex-2.5.35/doc' make[2]: *** [install-am] Error 2 make[2]: Leaving directory `/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/work/flex-2.5.35/doc' make[1]: *** [install-recursive] Error 1 make[1]: Leaving directory `/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/work/flex-2.5.35' make: *** [install] Error 2 * ERROR: sys-devel/flex-2.5.35 failed: * make install failed * * Call stack: * ebuild.sh: 64: <call src_install> * environment:2597: emake install DESTDIR="${D}" || die "make install failed"; * * If you need support, post the topmost build error, and the call stack if relevant. * QA Notice: command not found: * * /Users/msears/Gentoo/tmp/usr/bin/bash: line 1: help2man: command not found * /Users/msears/Gentoo/tmp/usr/bin/bash: line 1: help2man: command not found >>> Failed to emerge sys-devel/flex-2.5.35, Log file: >>> '/Users/msears/Gentoo/var/tmp/portage/sys-devel/flex-2.5.35/temp/build.log' * Messages for package sys-devel/flex-2.5.35: * ERROR: sys-devel/flex-2.5.35 failed: * make install failed * * Call stack: * ebuild.sh: 64: <call src_install> * environment:2597: emake install DESTDIR="${D}" || die "make install failed"; * * If you need support, post the topmost build error, and the call stack if relevant.
problem appears to be this: /Users/msears/Gentoo/tmp/usr/bin/bash: line 1: help2man: command not found However, that is unrelated to portage, so I think we can close this bug assuming we fixed the original issue.