
You are not logged in.
Let me introduce 'localpatch' portage's feature (upcomming).
Basically, from now on you will be able add your extra patches to packages without editing ebuild.
if 'localpatch' is present in FEATURES variable, portage will run localpatch function on the beginning of src_prepare function.
Default source for patches is /etc/portage/patches, can be changed by LOCALPATCH_OVERLAY variable.
First, localpatch will check if ${LOCALPATCH_OVERLAY}/${CATEGORY}/${PN}-${PV}-${PR} exist, if not, then it will check if ${LOCALPATCH_OVERLAY}/${CATEGORY}/${PN}-${PV} exist and on the end it will check for ${LOCALPATCH_OVERLAY}/${CATEGORY}/${PN} and set it as source.
Next localpatch will search for all *.patch and *.diff files there, recursively, so you can have there subdirs like bugfixes, features, whatever.
After it, localpatch will sort patches by `sort -n`, so best would be prefix patches with numbers if they have to be applied in right order.
Example:
We want patch www-servers/nginx with 01_bugfix.patch and www-servers/nginx-1.0-r1 with 01_new_feature.patch, all what we have to do is create /etc/portage/patches/www-servers/nginx and put ther 01_bugfix.patch and create /etc/portage/patches/www-servers/nginx-1.0-r1 and put there 01_new_features.patch. With it if we emerge nginx-1.0-r1 it will apply only 01_new_feature.patch, but if we emerge any other www-server/nginx version, it will apply only content of /etc/portage/patches/www-servers/nginx.
Any ideas, comments?
Work smart not hard.
Offline
Very nice feature, gain of productivity.
Offline
I only recently discovered/became interested in this feature recently, and I have been trying it out. Is there a way to have better control over which versions of a package a patch is applied to? For example, the current 3.4 ck patch can be applied to all 3.4.x versions of the kernel sources. Will I have to put a copy of the patch in /etc/portage/patches/sys-kernel/gentoo-sources-3.4.4/, /etc/portage/patches/sys-kernel/gentoo-sources-3.4.5/, /etc/portage/patches/sys-kernel/gentoo-sources-3.4.6/ for every time I upgrade the kernel, or is there a single location I can place the patch in so it is automatically applied to every 3.4.x version of gentoo-sources without it being applied to say 3.5.x versions?
Offline
Let me introduce 'localpatch' portage's feature.....
Any ideas, comments?
Sweet!
Offline