注意:

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

Kit-fixups/FAQ

From Funtoo
Jump to navigation Jump to search

This section answers frequent questions related to how to use kit-fixups for development, in a "question and answer" format.

I want to move a catpkg sys-apps/blah from core-kit to foobar-kit.
To do this, first we'll note that core-kit comes before foobar-kit in kit_groups. This means that core-kit's package set rules will run first. So we will want to make sure that sys-apps/blah does not match any rules in the core-kit package-set. This can be done by possibly removing a package-set rule, or using a wildcard with exclusion like sys-apps/* -sys-apps/blah. If this doesn't work, a file can be created called core-kit-packages-skip which contains exclusions, and sys-apps/blah can be added to a line in this file. Then, you will want to make sure that sys-apps/blah does match a package set rule for foobar-kit.
I want to move a catpkg sys-apps/blah from foobar-kit to core-kit.
To do this, first we'll note that foobar-kit comes after core-kit in kit-groups, so core-kit's package set rules will run first. We can thus simply add something that will match 'sys-apps/blah' to core-kit's package-set rules. Once sys-apps/blah is included in core-kit, it will not be available for inclusion in foobar-kit, even if it has an identical rule, or a rule like 'sys-apps/*'. However, note that it is good practice to clean up any rules in foobar-kit that you know are no longer matching any catpkgs.
   Note

The above two approaches can be used to move catpkgs between kits transparently to the end-user. In the next ego sync, the catpkg will atomically move from one kit to another and no re-emerging will be required, even if the user had emerged the package from the 'old' kit location.

I want to contribute a cool package to Funtoo.
To do this, you will want to open a pull request against flora. Flora is used for all 'bonus' community-contributed ebuilds.
I want to fix a bug in a particular ebuild.
To do this, first find out where the ebuild is coming from. A good way to do this is to type ls -d /var/git/meta-repo/kits/*/sys-apps/foobar, which will show you what kit it is in. Running emerge -s sys-apps/foobar will also display this information. For research purposes, it is often useful to find where the original catpkg was sourced from. You can consult https://ports.funtoo.org/packages.xml which contains a list of all catpkgs and their source repository. After doing some initial research and seeing what's wrong, you might have a fix for the ebuild. Generally, the best way to fix the ebuild is to fork kit-fixups and create an appropriate fixup for the ebuild if none exists, and simply improve our fixup if one exists already. Then you can create a code.funtoo.org pull request, or open a bug on bugs.funtoo.org, or both. Remember that fixup catpkgs will totally replace all upstream ebuilds, so you may need to include multiple versions of the ebuild, even ones that don't need a fix, if they are still needed for certain packages.
   Note

If you want to fix a bug in an ebuild and you find that the ebuild comes from flora, you will want to fork flora and submit a pull request against flora instead.

I want to make a particular branch of a kit the default kit.
To do this, you will modify kit_groups and set the kit you want to be default to have 'default' : True or 'stability' : KitStabilityRating.PRIME, or both. Only one kit branch can be set as default.
I don't want to generate a particular branch of a kit.
To prevent a branch of a kit from being generated, set its stability to KitStabilityRating.DEPRECATED in kit_groups.
I want to generate a new kit branch that uses much newer ebuilds from Gentoo or from an upstream repo.
First, define a new entry in kit_source_defs that contains the collection of overlays and repos you want to use as sources. Specify the SHA1 commits you want to use for each repo (or don't specify one to use master.) Then, you will want to add a new kit definition to kit_groups, in the "prime" section.
I want to include a package in Funtoo, but move it to a new name.
To do this, use the "literal with package move" format in the package set (see section on #Package Moves, above). You can also use files in kit_fixups/move-maps/kitname or kit_fixups/move-maps/global (info in a note below the Package Set syntax section.).

back to Development_Guide