Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o, Nekun <nekokun@××××××××.cc>
Subject: Re: [gentoo-portage-dev] Implement new userpatch feature in existing eclass?
Date: Sun, 04 Apr 2021 20:48:20
Message-Id: 0c5d4323-3979-89bb-8b4b-ec567bd8365c@gentoo.org
In Reply to: [gentoo-portage-dev] Implement new userpatch feature in existing eclass? by Nekun
1 On 4/4/21 10:54 AM, Nekun wrote:
2 > Hi all.
3 >
4 > Recently, I start working on optional atom specifiers feature in
5 > userpatch facility: if package directory name starts with percent sign,
6 > following word threated as a regular Portage atom, e.g
7 > "/etc/portage/patches/sys-kernel/%<=gentoo-sources-5.4" ==
8 > "<=sys-kernel/gentoo-sources-5.4". This might be very useful in cases
9 > when patches applied to minor updates, but major update breaks it (e.g.,
10 > in Linux kernel), so I want to specify smth like "=gentoo-sources-5.4*".
11 > I added new command in portageq to match two atoms and call it from
12 > eapply_user function in phase-function.sh, in same manner as
13 > has_version/best_version are called it. But recently I found that
14 > eapply_user implemented in Portage only in EAPI 6, and there is its
15 > predecessor, epatch_user, implemented in epatch.eclass. So, ebuilds with
16 > EAPI<6 (I found 4463 in last gentoo snapshot) will ignore new "atomic"
17 > patch directories. Obviously, this is rather confusing, unacceptable
18 > behaviour.
19 >
20 > Can I patch epatch.eclass in gentoo repository to implement new
21 > userpatch facility for older EAPIs? I guess that EAPI version is
22 > considered as stable, unchangeable behaviour of all functions, but in
23 > other side, this feature doesn't changes anything existing: old
24 > userpatch semantics preserves and order of applying
25 > (${P}-${PR},${P},${PN}) not changed, seeking for atoms added at tail.
26 >
27
28 Today, I count only 2445, or 8.3% of ebuilds have EAPI 5.
29
30 I imagine that the migration is moving along, since we deprecated EAPI 5
31 on 2020-11-26 here:
32
33 https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2e281bb698eb93704e1987dc4df1cf2dd3c2cff
34
35 --
36 Thanks,
37 Zac

Attachments

File name MIME type
signature.asc application/pgp-signature