Difference between revisions of "Applying Local Patches to Ebuilds"

From Funtoo
Jump to: navigation, search
(See Also)
Line 24: Line 24:
 
Only the patches within the first matching schema are used and are applied within numerical order.
 
Only the patches within the first matching schema are used and are applied within numerical order.
  
== See Also ==
 
 
[[Localpatch_(Tutorial)]]<br />
 
http://forums.funtoo.org/viewtopic.php?id=193
 
  
 
[[Category:Projects]]
 
[[Category:Projects]]
 
[[Category:Portage]]
 
[[Category:Portage]]
 
[[Category:Labs]]
 
[[Category:Labs]]

Revision as of 22:58, 27 June 2014

Note: This is just workprint. Feel free to contribute.
Important: Localpatch feature is severely outdated and removed from portage, use foobashrc ebuild!

Installation

localpatch is no longer part of portage. You need to install app-portage/foobashrc:

# emerge app-portage/foobashrc

This will install the script foobashrc.bashrc at /etc/portage/. It is intended to be used in the emerge process through /etc/portage/bashrc (see Hooking In the Emerge Process (Gentoo Manual)). If you do not have your own bashrc yet, you can just link it to foobashrc.bashrc:

# ln -s /etc/portage/foobashrc.bashrc /etc/portage/bashrc

To complete the installation you need to add

foobashrc_modules = "localpatch"

to your /etc/make.conf. By un-/commenting this line you can easily activate/deactivate localpatch.

How it works

By default, localpatch will look into /etc/portage/localpatches in order to search for patches. This can be changed by setting LOCALPATCH_OVERLAY variable within /etc/make.conf.

The actual patches for a package are placed in subdirectories with one of the following naming schemata:

  1. ${CATEGORY}/${PN}-${PV}-${PR} - example 'app-foo/bar-1.0-r1'
  2. ${CATEGORY}/${PN}-${PV} - example 'app-foo/bar-1.0'
  3. ${CATEGORY}/${PN} - example 'app-foo/bar'

Only the patches within the first matching schema are used and are applied within numerical order.