Forking An Ebuild
Often, a Funtoo developer needs to fork an upstream ebuild. This is necessary when we want to apply fixes to it. This page will explain the concepts of forking and how this works in the context of Funtoo.
Portage Tree Generation
Funtoo Linux generates its Portage tree using a special script that essentially takes a gentoo tree as its starting point, and then applies various modifications to it. The modifications involve adding packages from various overlays, including our Overlay:Funtoo-overlay. Some packages added are brand new, while other packages are our special forked versions that replace existing packages.
In the vast majority of cases, when we fork a package, we take full responsibility for all ebuilds associated with that package, meaning that we have a full copy of the sys-foo/bar directory in one of our overlays.
If you're interested in seeing the actual script that does all these things, take a look at the following files:
- http://git.funtoo.org/funtoo-overlay/tree/funtoo/scripts/current-update.sh
- cronned script that calls merge.py.
- http://git.funtoo.org/funtoo-overlay/tree/funtoo/scripts/merge.py
- python script that does the heavy lifting of combining Gentoo tree with various overlays, including our flora and funtoo-overlay. When we want to change what overlays we merge, what packages we exclude as a matter of policy (such as stale packages in some overlays), we make changes to this file.
- http://git.funtoo.org/funtoo-overlay/tree/funtoo/scripts/merge_utils.py
- python module that contains classes and methods that implement the merging functionality.