Neil Bothwick wrote: > On Fri, 22 Dec 2006 20:09:55 +0100, Benno Schulenberg wrote: > > mkdir -p /usr/local/portage/category/package > > ## Dont't copy all ebuilds, just the one to be tweaked: > > Unless you are really short of disk space, what's wrong with > copying the complete package directory - it makes life much > simpler. There's nothing wrong with it, but it makes life harder: now I must remember which of the ebuilds in /usr/local/portage/*/* I have patched and which not. It's much easier to have only ebuilds in there that I've actually changed. > If you just want to add a patch, you can do it with bashrc, no > need to mess with overlays: > http://forums.gentoo.org/viewtopic-t-339019.html (Or http://dev.gentoo.org/~solar/portage_misc/bashrc.autopatch for the original.) Well, yes, that is one way. But mostly I do not want things to be autopatched: I just want to change this one version and not any newer one. And I do not want to have to remember to remove /usr/portage/local/patches/category/package afterwards; patch, emerge and forget is easier. Also, when using overlays 'emerge -pev world' will immediately show which packages have been patched (because coming from my overlay). When autopatching, one has to check /usr/portage/local/patches/ separately. > There's a script floating around that will copy an ebuild to your > overlay and bump its version. Found it here: http://forums.gentoo.org/viewtopic.php?p=445501 Since this script is a bit too verbose for my taste, I've continued working on my own. Using the post_src_unpack() function mentioned by Bo, the inserting of patches becomes pretty easy. See the attached file. Suggestions and improvements are welcome. > But neither of these are related to the original > question, which was about preserving old versions. Yes, sorry for changing focus; I was reacting to this: > > > Overlays are there specifically for people who need > > > something different from the standard portage tree. Benno