A small patch to support multiple overlay dirs. The PORTDIR_OVERLAY should be a colon seperated list. Like this : PORTDIR_OVERLAY=/usr/portage.local:/home/user/portdir . Hm not much to it. The only thing i'm slightly worried about is the usage of PORTDIR_OVERLAY in ebuild.sh which breaks right now i suppose if used with more then 1 overly entry, i'm not sure of it's importance.
Created attachment 5709 [details, diff] portage-2.0.44.multioverlay.patch multi overlay patch , diff to portage-2.0.44/pym/portage.py
reassigning to carpaski, per seemant's irc instruction Also, it would be nice for the system to report which ebuild is being used if PORTDIR_OVERLAY is in effect. I just spent my evening chasing another bug that would have been obvious if emerge would just have told me. If I actually had several overlay dirs, the nightmare would have been worse.
sorry for that last unwrapped comment. :( Also, it would be nice for the system to report which ebuild is being used if PORTDIR_OVERLAY is in effect. I just spent my evening chasing another bug that would have been obvious if emerge would just have told me. If I actually had several overlay dirs, the nightmare would have been worse
I think that's a task for emerge, not portage.py .
carpaski, any progress here ? It's really an easy feature (i use it all the time) and the patch still applies to my portage (2.0.46-r4) almost perfectly.
It would be nice to have multiple sources for DISTDIR and PKGDIR as well. This would enable networks of gentoo machines to share nicely. A vision: DISTDIR=/usr/portage/distfiles:/mnt/portage/distfiles use the first file available in the listed paths, if not available, download it and put it in the first path. /mnt/portage/distfiles for example could come from an NFS mount. PKGDIR=/usr/portage/packages:/mnt/portage/packages-pentium3:/mnt/portage/packages-pentium2 Again, check the current directory first, (assuming this machine is a pentium3) but then check a network mounted directory of pentium3 binaries, then a directory of pentium2 binaries. It would also have some use for those people with laptops. In the above, have a check if a directory in the list exists before trying to use it. If it doesn't exist, just display a warning, but no error. But when they are plugged into a network where those paths exist (with files in them), things suddenly become much faster for them.
Created attachment 11506 [details, diff] Fixed the patch so it applies against 2.0.48_pre5
I'm improving this patch to add the same functionality for DISTDIR/PKGDIR now. I now have a very good reason. For cvs ebuilds, portage tries to checkout to $DISTDIR/cvs-src/ if $DISTDIR is a read-only NFS mount, then it fails. Having multiple DISTDIR allows CVS checkouts to a local distdir, while still having access to large NFS distdirs.
i suppose this one can be closed now ?
Yup. For multiple distfiles, see Kurt Hindenburg's ongoing work here: http://www.cherrynebula.net/projects/portage-kvh/portage-kvh.html I suggested a new approach to him that would avoid breakage in any of the current ebuilds.