Ok, update:

!!! Cannot write to '/Library'.
!!! Please check permissions and directories for broken symlinks.
!!! You may start the merge process again by using ebuild:
!!! ebuild
/private/var/automount/nfs/poseidon/export/home/gentoo/gentoo-x86/sys-devel/patch/patch-2.5.9-r1.ebuild
merge
!!! And finish by running this: env-update

Above is the output of my OSX installation (which worked) when I execute
emerge not as root.  In order to get this, I first had to chmod 755
/Library as it is per default writable to users from the admin group
(which I am of course).  Before I did this chmod, I found a hint as of
why this happens:

>>> Merging sys-devel/patch-2.5.9-r1 to /
!!!   EBUILD_PHASE=preinst
!!!   D=/Library/Gentoo/var/tmp/portage/patch-2.5.9-r1/image/Library/Gentoo///
!!!   DEST=/Library/Gentoo/var/tmp/portage/patch-2.5.9-r1/image
!!!   PREFIX=/Library/Gentoo///
!!!   ROOT=/Library/Gentoo///
--- /Library/
--- /Library/Gentoo/
--- /Library/Gentoo/usr/

!!! Cannot write to '/Library/Gentoo/usr/bin'.
!!! Please check permissions and directories for broken symlinks.
!!! You may start the merge process again by using ebuild:
!!! ebuild 
/private/var/automount/nfs/poseidon/export/home/gentoo/gentoo-x86/sys-devel/patch/patch-2.5.9-r1.ebuild
 merge
!!! And finish by running this: env-update

The directory bin is the first I can't write to as user from the admin
group.  During the merge phase portage merges the prefix paths from the
image too.  When being run as root, this is no problem, because root can
usually write everywhere on the local system, including the prefix.  On
my Fedora Core system at work, however, I can't.

So... (drums) ...I made it work!  (w00t!)

I patched the portage code not to check whether it can write on
directories that are from the root till the prefix path.  See attached
patch.  I guess it sucks big time, but the idea should be clear.  It
works for me at least...

Now I finally got 'patch' emerged, I'm going to see how far I can get :D 


On 06-01-2006 01:17:18 +0100, Grobian wrote:
> Well... I installed the older portage snapshot thing from Kito, and it
> gives the same problem of wanting to write to /net.  I'm getting affraid
> portage wants to make sure that it can write in each and every directory
> from the root till the base dir, which is not going to work in any
> way...

-- 
Fabian Groffen
Gentoo for Mac OS X Project -- Interim Lead
--- pym/portage.py
+++ pym/portage.py
@@ -6410,7 +6410,12 @@
                                                if(bsd_chflags.lchflags(mydest, 
0)<0):
                                                        writemsg("!!! Couldn't 
clear flags on '"+mydest+"'.\n")
 
-                                       if not os.access(mydest, os.W_OK):
+                                       # Don't try to write to the directories 
from the root
+                                       # to the prefix location.  If mydest 
matches the
+                                       # start if prefix, we know it's a dir 
and that it
+                                       # should not contain any files to 
merge, since
+                                       # portage should not write outside the 
prefix
+                                       if not prefix.startswith(mydest) and 
not os.access(mydest, os.W_OK):
                                                pkgstuff = pkgsplit(self.pkg)
                                                writemsg("\n!!! Cannot write to 
'"+mydest+"'.\n")
                                                writemsg("!!! Please check 
permissions and directories for broken symlinks.\n")

Reply via email to