Re: Implement new userpatch feature in existing eclass?

Zac Medico <[email protected]> Sun, 4 Apr 2021 13:49:50 -0700
Newsgroups gmane.linux.gentoo.portage.devel
Message-ID <[email protected]>
On 4/4/21 10:54 AM, Nekun wrote:
> Hi all.
> 
> Recently, I start working on optional atom specifiers feature in
> userpatch facility: if package directory name starts with percent sign,
> following word threated as a regular Portage atom, e.g
> "/etc/portage/patches/sys-kernel/%<=gentoo-sources-5.4" ==
> "<=sys-kernel/gentoo-sources-5.4". This might be very useful in cases
> when patches applied to minor updates, but major update breaks it (e.g.,
> in Linux kernel), so I want to specify smth like "=gentoo-sources-5.4*".
> I added new command in portageq to match two atoms and call it from
> eapply_user function in phase-function.sh, in same manner as
> has_version/best_version are called it. But recently I found that
> eapply_user implemented in Portage only in EAPI 6, and there is its
> predecessor, epatch_user, implemented in epatch.eclass. So, ebuilds with
> EAPI<6 (I found 4463 in last gentoo snapshot) will ignore new "atomic"
> patch directories. Obviously, this is rather confusing, unacceptable
> behaviour.
> 
> Can I patch epatch.eclass in gentoo repository to implement new
> userpatch facility for older EAPIs? I guess that EAPI version is
> considered as stable, unchangeable behaviour of all functions, but in
> other side, this feature doesn't changes anything existing: old
> userpatch semantics preserves and order of applying
> (${P}-${PR},${P},${PN}) not changed, seeking for atoms added at tail.
> 

Today, I count only 2445, or 8.3% of ebuilds have EAPI 5.

I imagine that the migration is moving along, since we deprecated EAPI 5
on 2020-11-26 here:

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2e281bb698eb93704e1987dc4df1cf2dd3c2cff
-- 
Thanks,
Zac
signature.asc (application/pgp-signature, 981 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQKTBAEBCgB9FiEE8OgXaltWzqgSupCu0HX7jBBKPSAFAmBqJm5fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEYw
RTgxNzZBNUI1NkNFQTgxMkJBOTBBRUQwNzVGQjhDMTA0QTNEMjAACgkQ0HX7jBBK
PSDb9RAAnLH6PBy8XG5Jz3Fe/Ng67JD7Yi7uD3oGUTKotI3E2rmdxywCKcmW8Aa5
jnlCrAzyNKX6x49p8B5UIvcEZ48KdCdVMgcZtKhku1Y3npzG4kirnXqwarR2Pmew
Gn1c2QtvSgYx9Pk1Lbw23ZMnQ83fclCssXFiN/UeMrTT16yWF55dpSBzjhXuBrYj
FBAfESh6CLTFgZ7S4XhiE+7efeAjA7l+FEtJ53LRG949gCiRUd0Jhy7kQ1waNKoe
4HQYFXJjfcsyHbjW9mko4qea5+7dm1iYo2kwon2YaFGg8A5r1/+URZLkuM1ht73Y
h2HDTsg3QdndViFkptwl+wQ+cMZVE9wM5RE8SXPQG3BtDk3wmWpoR7h/ygrM/hLr
ZiquK5cS+iIJqidkAsW0x4U4bl3e9AOt4/dl2DYQS/Gk2EvTMvcKPaxV4sc2/ugj
IbpSpzm/1xkI3lmNcgfCTINp3yRLA2PoCeHt311lhurusKWYEnYQrrheCG+O7Drn
Moaiacn0MXkfdLY1WCAl83Ni9IN6wPcFtQTLJO1RX9ywnOItR233xwePM6ZbNZPY
/FgLmI+qceKTMeJCETG/Zdrq9qzfMxhHpzW+XKnU2aXJRVY1EK8y3vGwHz4hvWig
5c44X4hPLmuIoOycok8rsjYTk8rWO7cmy6WlO8k+Nkk22WglPzY=
=lD4w
-----END PGP SIGNATURE-----