SUMMARY:
I'm dealing with the following error:
!!! Directory initialization failed: '/Volumes/GENTOO/var/lib/portage'
As usual, I imagine the answer is staring me in the face....but here goes.
BACKGROUND:
I have a Quicksilver G4 with a drive partition dedicated to Gentoo/Prefix and
Portage.
Everything runs swimmingly until I have to for whatever reason re-install the
main OS, at which point my Gentoo/Prefix breaks.
The last time this happened, which I posted about, I ended up rebuilding
Gentoo/Prefix/Portage from scratch on its own partition.
I now realize that the issue comes down to user/group permissions, and how
Apple messed this up basically in the migration path through the various cat
OSes (Panther->Tiger->Leopard). This time I have re-installed Leopard, migrated
back my files (Gentoo is on a separate volume) but I wanted to make sure the
former problems were solved before continuing. After a week of research on the
upgrade bug (in which the change in user, even if migrating, brings about a
phantom "unknown" group in file listings) and have managed to bring all the
permissions up to fresh-install "Leopard" standards; meaning, user name/#UID
(502) as owner, and staff/#GID (20) as group. Everything is working as it
should.
When I came back to test the Prefix/Portage, I got the following error:
[code]danielibnzayd@boojum /Volumes/GENTOO $ emerge --update
!!! Directory initialization failed: '/Volumes/GENTOO/var/lib/portage'
!!! chown('/Volumes/GENTOO/var/lib/portage', -1, [b]502[/b])
!!! Directory initialization failed: '/Volumes/GENTOO/var/cache/edb'
!!! chown('/Volumes/GENTOO/var/cache/edb', -1, [b]502[/b])
[Errno 1] Operation not permitted:
'/Volumes/GENTOO/var/lib/gentoo/news/.news-gentoo_prefix.unread.portage_lockfile':
chown('/Volumes/GENTOO/var/lib/gentoo/news/.news-gentoo_prefix.unread.portage_lockfile',
-1, [b]502[/b])
Cannot chown a lockfile:
'/Volumes/GENTOO/var/lib/gentoo/news/.news-gentoo_prefix.unread.portage_lockfile'
[b]Group IDs of current user: 20 98 80[/b]
These are the packages that would be merged, in order:
Calculating dependencies [Errno 1] Operation not permitted:
'/Volumes/GENTOO/var/db/.pkg.portage_lockfile':
chown('/Volumes/GENTOO/var/db/.pkg.portage_lockfile', -1, 502)
Cannot chown a lockfile: '/Volumes/GENTOO/var/db/.pkg.portage_lockfile'
Group IDs of current user: 20 98 80
\... done!
Exiting on signal 2[/code]
I'm assuming the error regarding "502" concerns the former erroneous
[b]group[/b] ID number (which formerly was "501" or "502", and which I have
changed to 20, per Leopard standards. When I grepped on "502" as a group ID on
the Gentoo partition, I found the [u]etc/make.globals[/u] file which it says
not to edit. I changed the group ID to 20 (I left the user ID as 502, which is
correct) and the group name to "staff":
[code]# Default portage user/group
PORTAGE_USER='danielibnzayd'
PORTAGE_GROUP='staff' [b]#was danielibnzayd[/b]
PORTAGE_ROOT_USER='danielibnzayd'
# Default ownership of installed files.
PORTAGE_INST_UID="502"
PORTAGE_INST_GID="20"[/code] [b]#was 502[/b]
...and the error persists. I imagine there is a config file I am overlooking?
The problem seems to be with Python? I tried python-updater, and got this error
message:
Total: 6 packages (1 upgrade, 2 new, 1 in new slot, 2 reinstalls), Size of
downloads: 0 kB
Traceback (most recent call last):
File "/Volumes/GENTOO/usr/lib/portage/pym/portage/util/__init__.py", line
1054, in apply_permissions
os.chown(filename, uid, gid)
File "/Volumes/GENTOO/usr/lib/portage/pym/portage/__init__.py", line 260, in
__call__
rval = self._func(*wrapped_args, **wrapped_kwargs)
PermissionError: [Errno 1] Operation not permitted:
'/Volumes/GENTOO/var/cache/edb/mtimedb'
During handling of the above exception, another exception occurred:
[code]Traceback (most recent call last):
File "/Volumes/GENTOO/usr/bin/emerge", line 50, in <module>
retval = emerge_main()
File "/Volumes/GENTOO/usr/lib/portage/pym/_emerge/main.py", line 1032, in
emerge_main
return run_action(emerge_config)
File "/Volumes/GENTOO/usr/lib/portage/pym/_emerge/actions.py", line 4063, in
run_action
emerge_config.args, spinner)
File "/Volumes/GENTOO/usr/lib/portage/pym/_emerge/actions.py", line 440, in
action_build
mtimedb.commit()
File "/Volumes/GENTOO/usr/lib/portage/pym/portage/util/mtimedb.py", line 127,
in commit
uid=uid, gid=portage_gid, mode=0o644)
File "/Volumes/GENTOO/usr/lib/portage/pym/portage/util/__init__.py", line
1224, in apply_secpass_permissions
stat_cached=stat_cached, follow_links=follow_links)
File "/Volumes/GENTOO/usr/lib/portage/pym/portage/util/__init__.py", line
1061, in apply_permissions
raise OperationNotPermitted(func_call)
portage.exception.OperationNotPermitted:
chown('/Volumes/GENTOO/var/cache/edb/mtimedb', 502, 502)
danielibnzayd@boojum /Volumes/GENTOO $[/code]
Where do I tell Python to change its idea of group privileges?
Any leads/ideas? Thanks in advance.