* [gentoo-dev] [PATCH] eutils.eclass: Allow to configure base patch location for epatch_user
@ 2015-09-05 10:46 Julian Ospald
2015-09-05 12:07 ` Rich Freeman
0 siblings, 1 reply; 11+ messages in thread
From: Julian Ospald @ 2015-09-05 10:46 UTC (permalink / raw
To: gentoo-dev; +Cc: base-system, Julian Ospald
This is particularly useful for people who run alternative
package managers and want to control their configuration.
Github-PR: https://github.com/gentoo/gentoo/pull/69
---
eclass/eutils.eclass | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
index fecd375..be65960 100644
--- a/eclass/eutils.eclass
+++ b/eclass/eutils.eclass
@@ -350,6 +350,12 @@ EPATCH_FORCE="no"
# List of patches not to apply. Note this is only file names,
# and not the full path. Globs accepted.
+# @VARIABLE: EPATCH_USER_SOURCE
+# @DESCRIPTION:
+# Location for user patches, see the epatch_user function.
+# Should be set by the user. Don't set this in ebuilds.
+: ${EPATCH_USER_SOURCE:=${PORTAGE_CONFIGROOT%/}/etc/portage/patches}
+
# @FUNCTION: epatch
# @USAGE: [options] [patches] [dirs of patches]
# @DESCRIPTION:
@@ -697,11 +703,11 @@ epatch_user() {
[[ -e ${applied} ]] && return 2
# don't clobber any EPATCH vars that the parent might want
- local EPATCH_SOURCE check base=${PORTAGE_CONFIGROOT%/}/etc/portage/patches
+ local EPATCH_SOURCE check
for check in ${CATEGORY}/{${P}-${PR},${P},${PN}}{,:${SLOT}}; do
- EPATCH_SOURCE=${base}/${CTARGET}/${check}
- [[ -r ${EPATCH_SOURCE} ]] || EPATCH_SOURCE=${base}/${CHOST}/${check}
- [[ -r ${EPATCH_SOURCE} ]] || EPATCH_SOURCE=${base}/${check}
+ EPATCH_SOURCE=${EPATCH_USER_SOURCE}/${CTARGET}/${check}
+ [[ -r ${EPATCH_SOURCE} ]] || EPATCH_SOURCE=${EPATCH_USER_SOURCE}/${CHOST}/${check}
+ [[ -r ${EPATCH_SOURCE} ]] || EPATCH_SOURCE=${EPATCH_USER_SOURCE}/${check}
if [[ -d ${EPATCH_SOURCE} ]] ; then
EPATCH_SOURCE=${EPATCH_SOURCE} \
EPATCH_SUFFIX="patch" \
--
2.5.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] [PATCH] eutils.eclass: Allow to configure base patch location for epatch_user
2015-09-05 10:46 [gentoo-dev] [PATCH] eutils.eclass: Allow to configure base patch location for epatch_user Julian Ospald
@ 2015-09-05 12:07 ` Rich Freeman
2015-09-05 12:35 ` hasufell
2015-09-05 12:42 ` Ulrich Mueller
0 siblings, 2 replies; 11+ messages in thread
From: Rich Freeman @ 2015-09-05 12:07 UTC (permalink / raw
To: gentoo-dev; +Cc: base-system, Julian Ospald
On Sat, Sep 5, 2015 at 6:46 AM, Julian Ospald <hasufell@gentoo.org> wrote:
> This is particularly useful for people who run alternative
> package managers and want to control their configuration.
I certainly support the principle, but for the sake of transparency
can we try to coordinate this so that the setting name doesn't change
when this moves into the package manager for EAPI6? PMS is more about
the content of the ebuilds, so presumably all package managers could
structure how patches are provided by the user in whatefver way is
most consistent with how they already operate.
--
Rich
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] [PATCH] eutils.eclass: Allow to configure base patch location for epatch_user
2015-09-05 12:07 ` Rich Freeman
@ 2015-09-05 12:35 ` hasufell
2015-09-05 12:42 ` Ulrich Mueller
1 sibling, 0 replies; 11+ messages in thread
From: hasufell @ 2015-09-05 12:35 UTC (permalink / raw
To: gentoo-dev
On 09/05/2015 02:07 PM, Rich Freeman wrote:
> On Sat, Sep 5, 2015 at 6:46 AM, Julian Ospald <hasufell@gentoo.org> wrote:
>> This is particularly useful for people who run alternative
>> package managers and want to control their configuration.
>
> I certainly support the principle, but for the sake of transparency
> can we try to coordinate this so that the setting name doesn't change
> when this moves into the package manager for EAPI6? PMS is more about
> the content of the ebuilds, so presumably all package managers could
> structure how patches are provided by the user in whatefver way is
> most consistent with how they already operate.
>
Of course, PMS should not refer to directories like "/etc/portage", but
I am not sure it's the place to introduce variables for users to
configure their PM behavior. I'd rather expect this to be PM-specific.
At that point, probably nothing will change for portage users anyway.
Everything else is not within our control.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] [PATCH] eutils.eclass: Allow to configure base patch location for epatch_user
2015-09-05 12:07 ` Rich Freeman
2015-09-05 12:35 ` hasufell
@ 2015-09-05 12:42 ` Ulrich Mueller
2015-09-05 12:46 ` hasufell
2015-09-05 16:14 ` Guilherme Amadio
1 sibling, 2 replies; 11+ messages in thread
From: Ulrich Mueller @ 2015-09-05 12:42 UTC (permalink / raw
To: gentoo-dev; +Cc: base-system, Julian Ospald
[-- Attachment #1: Type: text/plain, Size: 1193 bytes --]
>>>>> On Sat, 5 Sep 2015, Rich Freeman wrote:
> I certainly support the principle, but for the sake of transparency
> can we try to coordinate this so that the setting name doesn't
> change when this moves into the package manager for EAPI6?
So far, the EAPI 6 draft says [1]:
eapply_user
Takes no arguments. Package managers supporting it apply
user-provided patches to the source tree in the current working
directory. Exact behaviour is implementation defined and beyond
the scope of this specification. Package managers not supporting
it must implement the function as a no-op. Only available in
EAPIs listed in table [...] as supporting eapply_user.
> PMS is more about the content of the ebuilds, so presumably all
> package managers could structure how patches are provided by the
> user in whatefver way is most consistent with how they already
> operate.
Exactly, IMHO we should leave the details how this is implemented
to the package manager (including the option not to implement it).
This is of course open for discussion.
Ulrich
[1] https://gitweb.gentoo.org/proj/pms.git/diff/pkg-mgr-commands.tex?h=eapi-6&id=c82042d29a03defbb639050e5b3d265f74cbbee6
[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] [PATCH] eutils.eclass: Allow to configure base patch location for epatch_user
2015-09-05 12:42 ` Ulrich Mueller
@ 2015-09-05 12:46 ` hasufell
2015-09-05 12:53 ` Rich Freeman
2015-09-05 16:14 ` Guilherme Amadio
1 sibling, 1 reply; 11+ messages in thread
From: hasufell @ 2015-09-05 12:46 UTC (permalink / raw
To: gentoo-dev
On 09/05/2015 02:42 PM, Ulrich Mueller wrote:
>>>>>> On Sat, 5 Sep 2015, Rich Freeman wrote:
>
>> I certainly support the principle, but for the sake of transparency
>> can we try to coordinate this so that the setting name doesn't
>> change when this moves into the package manager for EAPI6?
>
> So far, the EAPI 6 draft says [1]:
>
> eapply_user
> Takes no arguments. Package managers supporting it apply
> user-provided patches to the source tree in the current working
> directory. Exact behaviour is implementation defined and beyond
> the scope of this specification. Package managers not supporting
> it must implement the function as a no-op. Only available in
> EAPIs listed in table [...] as supporting eapply_user.
>
>> PMS is more about the content of the ebuilds, so presumably all
>> package managers could structure how patches are provided by the
>> user in whatefver way is most consistent with how they already
>> operate.
>
> Exactly, IMHO we should leave the details how this is implemented
> to the package manager (including the option not to implement it).
> This is of course open for discussion.
>
Right, I don't even see a reason to make the patch location configurable
once it is implemented in package managers.
This is really just about eutils.eclass.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] [PATCH] eutils.eclass: Allow to configure base patch location for epatch_user
2015-09-05 12:46 ` hasufell
@ 2015-09-05 12:53 ` Rich Freeman
2015-09-07 7:51 ` Alexander Berntsen
0 siblings, 1 reply; 11+ messages in thread
From: Rich Freeman @ 2015-09-05 12:53 UTC (permalink / raw
To: gentoo-dev
On Sat, Sep 5, 2015 at 8:46 AM, hasufell <hasufell@gentoo.org> wrote:
> On 09/05/2015 02:42 PM, Ulrich Mueller wrote:
>>>>>>> On Sat, 5 Sep 2015, Rich Freeman wrote:
>>
>>> I certainly support the principle, but for the sake of transparency
>>> can we try to coordinate this so that the setting name doesn't
>>> change when this moves into the package manager for EAPI6?
>>
>> So far, the EAPI 6 draft says [1]:
>>
>> eapply_user
>> Takes no arguments. Package managers supporting it apply
>> user-provided patches to the source tree in the current working
>> directory. Exact behaviour is implementation defined and beyond
>> the scope of this specification. Package managers not supporting
>> it must implement the function as a no-op. Only available in
>> EAPIs listed in table [...] as supporting eapply_user.
>>
>>> PMS is more about the content of the ebuilds, so presumably all
>>> package managers could structure how patches are provided by the
>>> user in whatefver way is most consistent with how they already
>>> operate.
>>
>> Exactly, IMHO we should leave the details how this is implemented
>> to the package manager (including the option not to implement it).
>> This is of course open for discussion.
>>
>
> Right, I don't even see a reason to make the patch location configurable
> once it is implemented in package managers.
>
> This is really just about eutils.eclass.
>
I wasn't suggesting that the configuration of the path be made a part of PMS.
I was suggesting that somebody talk to the portage developers about
how they intend to implement EAPI6 so that users don't have to go into
their make.conf and change EPATCH_USER_SOURCE to EAPPY_USER_SOURCE or
something silly like that, or more likely define both since pre-6
ebuilds will use one setting and post-6 ebuilds will use the other.
I do realize that there is no technical constraint that forces us to
be nice to our users. It's just good manners. :)
(And I do realize that portage isn't the only package manager out
there. By all means try to do this in a way that is easiest on users
of all of them.)
--
Rich
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] [PATCH] eutils.eclass: Allow to configure base patch location for epatch_user
2015-09-05 12:42 ` Ulrich Mueller
2015-09-05 12:46 ` hasufell
@ 2015-09-05 16:14 ` Guilherme Amadio
2015-09-05 16:16 ` hasufell
1 sibling, 1 reply; 11+ messages in thread
From: Guilherme Amadio @ 2015-09-05 16:14 UTC (permalink / raw
To: gentoo-dev; +Cc: base-system, Julian Ospald
On Sat, Sep 05, 2015 at 02:42:15PM +0200, Ulrich Mueller wrote:
> >>>>> On Sat, 5 Sep 2015, Rich Freeman wrote:
>
> > I certainly support the principle, but for the sake of transparency
> > can we try to coordinate this so that the setting name doesn't
> > change when this moves into the package manager for EAPI6?
>
> So far, the EAPI 6 draft says [1]:
>
> eapply_user
> Takes no arguments. Package managers supporting it apply
> user-provided patches to the source tree in the current working
> directory. Exact behaviour is implementation defined and beyond
> the scope of this specification. Package managers not supporting
> it must implement the function as a no-op. Only available in
> EAPIs listed in table [...] as supporting eapply_user.
Is there a reason to pick eapply_user rather than epatch_user? I think
the second one would fit better with what we already have.
Alternatively, if we would like to avoid adding a new function, it could
be something like epatch --user or epatch -d $DIRECTORY_WITH_PATCHES,
where $DIRECTORY_WITH_PATCHES either defaults to something like
$EPATCH_SOURCE_USER, or can be specified via package.env. This takes the
burden away from the package manager for where to put patches, and lets
the user make that choice.
Cheers,
—Guilherme
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] [PATCH] eutils.eclass: Allow to configure base patch location for epatch_user
2015-09-05 16:14 ` Guilherme Amadio
@ 2015-09-05 16:16 ` hasufell
0 siblings, 0 replies; 11+ messages in thread
From: hasufell @ 2015-09-05 16:16 UTC (permalink / raw
To: gentoo-dev
On 09/05/2015 06:14 PM, Guilherme Amadio wrote:
> On Sat, Sep 05, 2015 at 02:42:15PM +0200, Ulrich Mueller wrote:
>>>>>>> On Sat, 5 Sep 2015, Rich Freeman wrote:
>>
>>> I certainly support the principle, but for the sake of transparency
>>> can we try to coordinate this so that the setting name doesn't
>>> change when this moves into the package manager for EAPI6?
>>
>> So far, the EAPI 6 draft says [1]:
>>
>> eapply_user
>> Takes no arguments. Package managers supporting it apply
>> user-provided patches to the source tree in the current working
>> directory. Exact behaviour is implementation defined and beyond
>> the scope of this specification. Package managers not supporting
>> it must implement the function as a no-op. Only available in
>> EAPIs listed in table [...] as supporting eapply_user.
>
> Is there a reason to pick eapply_user rather than epatch_user? I think
> the second one would fit better with what we already have.
> Alternatively, if we would like to avoid adding a new function, it could
> be something like epatch --user or epatch -d $DIRECTORY_WITH_PATCHES,
> where $DIRECTORY_WITH_PATCHES either defaults to something like
> $EPATCH_SOURCE_USER, or can be specified via package.env. This takes the
> burden away from the package manager for where to put patches, and lets
> the user make that choice.
>
Please start a new thread for discussing EAPI-6 features. This is
offtopic here.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] [PATCH] eutils.eclass: Allow to configure base patch location for epatch_user
2015-09-05 12:53 ` Rich Freeman
@ 2015-09-07 7:51 ` Alexander Berntsen
2015-09-07 13:14 ` Rich Freeman
0 siblings, 1 reply; 11+ messages in thread
From: Alexander Berntsen @ 2015-09-07 7:51 UTC (permalink / raw
To: gentoo-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
On 05/09/15 14:53, Rich Freeman wrote:
> I was suggesting that somebody talk to the portage developers about
> how they intend to implement EAPI6
We don't know. But our tardiness should not retard the development of
other package managers.
- --
Alexander
bernalex@gentoo.org
https://secure.plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCgAGBQJV7UH8AAoJENQqWdRUGk8BY80P/j2l8HH/FcicnF9QvwhUzjUA
bjrCPaFBArPmGIGqCaRjAB6OvrD7SOsdOG1GcQNJ7OSxxx3sV8Vo8Qc4PJ6R43U+
lN5Vxq/dEhJwGpWFOKFdxFGnSJK1wbFlf1l2Y5MkyNd8KBxhTLxh8vWHyIgL3mLC
9L6fteBdhbyUQaAjtKJiVRm1lMKrfgZUu/8zL+pa3RDolErgD+sfNF21AGt8csjn
GwRy/MkQGYKE73Uy+bhtsQPtRl5fChDvbA/hM6mTC3uODY/bEzwNFM0P8sk8L0uj
HkQqErGAWRROTnKH3LQJ3kwO1Lxqr8rosi7Em0zhzKpimSDgx/XlqGLyNaV1bgD7
IuKG/ww5bBgrJPUkhdRFhZl1LA9wFD81koOpbL+zQYi42Q50412lpkNrKS3+5YpK
K9DN+zv/63Hw7GnW6v9MWi5X0+UJlGWKtsTNhvyGy4FV321gRXn3GC/GNGKEbDCB
YlOzmaQoID+22R8P3liBj7CsWRE1i/3EJwaPsFxrixqrGVkwJyBV5kGqgVNU9Uhk
RYWArfpQ6eI92oL90Xpy+sY+aWduhR3O7zYPj4dDYoVMOwFfsFWi/vMqjxZsc3FT
g0g+fC9SEhUeEUXlQhQORrlkVJnEhSXmZQcmXKX6MIlh1jxy67Liby8XSnlQNarj
AH6YTaEkikCmEfqb+nJA
=8vHo
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] [PATCH] eutils.eclass: Allow to configure base patch location for epatch_user
2015-09-07 7:51 ` Alexander Berntsen
@ 2015-09-07 13:14 ` Rich Freeman
2015-09-08 9:15 ` Alexander Berntsen
0 siblings, 1 reply; 11+ messages in thread
From: Rich Freeman @ 2015-09-07 13:14 UTC (permalink / raw
To: gentoo-dev
On Mon, Sep 7, 2015 at 3:51 AM, Alexander Berntsen <bernalex@gentoo.org> wrote:
>
> On 05/09/15 14:53, Rich Freeman wrote:
>> I was suggesting that somebody talk to the portage developers about
>> how they intend to implement EAPI6
> We don't know. But our tardiness should not retard the development of
> other package managers.
>
This wouldn't hold up developers of other package managers, just the
change to the eclass. I wasn't suggesting waiting until EAPI6 was
implemented, or securing a 100% binding commitment from anybody. I
was just suggesting that users might not like having two different
variables that end up doing the same thing, simply because nobody
bothered to talk to anybody else.
If you ask and there is no answer I wouldn't hold things up.
--
Rich
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] [PATCH] eutils.eclass: Allow to configure base patch location for epatch_user
2015-09-07 13:14 ` Rich Freeman
@ 2015-09-08 9:15 ` Alexander Berntsen
0 siblings, 0 replies; 11+ messages in thread
From: Alexander Berntsen @ 2015-09-08 9:15 UTC (permalink / raw
To: gentoo-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
On 07/09/15 15:14, Rich Freeman wrote:
> If you ask and there is no answer I wouldn't hold things up.
Michał was working on implementing EAPI6 in Portage, perhaps you
should ping him somewhere.
- --
Alexander
bernalex@gentoo.org
https://secure.plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCgAGBQJV7qcUAAoJENQqWdRUGk8BUmgQAJhXhipADcDZ3TkLbGBQLGSo
dmSoIQ51R74qhV+w5FG+r/r2TVUa2q4+ISVTVQUTOyyBuVGiwjQf6q89DLKliaO1
rnEfiXn9ILprXx72lnRpfVv60dWpvG8tAE6a7AWSBaeLHX5Yw38MQIrLIx4fWkh0
juLZ6Xp7QV6ZgjttzEwJ2JxjFfeyZ8r/iyt/Kuxi6+HBN9/UxpEUI+gRLqcQdjVP
ygnqf77vgNW9yxxpiABhZMVqIo71ccRwloicM75gxnRQFc8hmp93aQIf4aMvyTNm
EUPsLuM4M4ejGYnN8+lBJpAxs39ZJ+2XPEU7OqjaCm/QJpvZ104W6aj20TzV8Fcn
fY8je5POCzMGmCz0t5h6g1qtEHrCFOOKfi9amelNAjyieM9yqK+rovTw/RjXLan7
OJCWFx9m6nIODkYcpmnac0qyM8U8DjYdCz+GDQdChplh/MDBJmT+1vTEU7wKscfm
ULR0dK4JmnA9UqhUBfvTCsbvDvO17TVvCAsrvkkrH+TRBERbKpnDd+5ZwwKJkN/V
SWmeP07csW2RB8ErfEyuN/NTo1gW73YkAUsaOFEhzGTuZQY3c1lbd4xTWH5sIMXz
yUVvwgWNWFKqnZcIKW4QQIXiEQWrCZiTJLKUL6nK2+jnPMQmurZjVNTG08ZVg9z4
jZkqzuZ7LB1TbMcAJMAj
=vnTw
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2015-09-08 9:15 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-05 10:46 [gentoo-dev] [PATCH] eutils.eclass: Allow to configure base patch location for epatch_user Julian Ospald
2015-09-05 12:07 ` Rich Freeman
2015-09-05 12:35 ` hasufell
2015-09-05 12:42 ` Ulrich Mueller
2015-09-05 12:46 ` hasufell
2015-09-05 12:53 ` Rich Freeman
2015-09-07 7:51 ` Alexander Berntsen
2015-09-07 13:14 ` Rich Freeman
2015-09-08 9:15 ` Alexander Berntsen
2015-09-05 16:14 ` Guilherme Amadio
2015-09-05 16:16 ` hasufell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox