Re: Implement new userpatch feature in existing eclass?

Zac Medico <[email protected]> Sun, 4 Apr 2021 13:48:15 -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

iQKTBAEBCgB9FiEE8OgXaltWzqgSupCu0HX7jBBKPSAFAmBqJg9fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEYw
RTgxNzZBNUI1NkNFQTgxMkJBOTBBRUQwNzVGQjhDMTA0QTNEMjAACgkQ0HX7jBBK
PSB2gBAAwxtM/TdPA5/buu6zYW370d0zW3xhJuOzNTYDFuh6GmehkdLSp2F7rJ4i
X082pI8/qT91wmuy1dqmIj9YQb6epTcaMvmyglwDNrGBR+MX8kf1rvmHiBijZBH+
WnU8u1j2UOgf8XFeRUMETIXj4gWVJ/adFprQzM5qdcB6icmGrrC03XoBiCTZuC1H
8Cyn31G3cc1upHSSyyv2jXb1K4x8ZTgQxlUndZeF1v4lon0l/CxS7uwtYrn4c2wy
u7ZX+3+PxikZ4nS7eodTJoeP+/N/v+lWGzifvmdd5BAoYJsIbnOcaEHqtDDWtxVT
Ac/VMjhFVua4RFz9LQUZ1joMQJfbDv14N75lOqwhTrHg5PHNnbv6SPicMQGQhq+j
gQj86EjI3Gns0pnsk9TjMiUrxljd7ELNUFfkTE6fgNpUOWbE92limwZU6gDyFOZv
g8ziiijOKHPuqfNahSH3OGVxaX3yJ3KHuGUOTZqPacIoejNrSH837ZizLeFyx8i+
uyVIi6igQ0Vk+ZT+B8Lw0+bdoyLDt7DzSF59w+MNCnfsJRuNqL1LNVZs8Qivfje/
FYRLELrvpUuzVkEDBdc+hGPr3h606AdvOwTLVGOv84SzN2hvOeEyC7ioxsAJk7fz
9/dOzQaoNHmIxD56L92j20viZBLI/3P6qESKw8F/pITk5+2rnwU=
=Gu2H
-----END PGP SIGNATURE-----