Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Gentoo: Dev

Making user patches globally available

 

 

First page Previous page 1 2 3 Next page Last page  View All Gentoo dev RSS feed   Index | Next | Previous | View Threaded


dirtyepic at gentoo

Apr 25, 2012, 9:44 PM

Post #26 of 60 (167 views)
Permalink
Re: Making user patches globally available [In reply to]

On Wed, 18 Apr 2012 22:41:39 +0100
David Leverton <levertond [at] googlemail> wrote:

> The point I was trying to get at was that it seems a bit heavyweight to
> rely on a whole eclass for a minor use-case, as well as a bit
> error-prone to expect people to remember it every time, but maybe that's
> the least bad option after all....

Yeah the whole idea here was to make user patches available without ebuild
modifications or eclass dependence.


--
fonts, gcc-porting
toolchain, wxwidgets
@ gentoo.org
Attachments: signature.asc (0.19 KB)


zmedico at gentoo

Apr 25, 2012, 10:03 PM

Post #27 of 60 (165 views)
Permalink
Re: Re: Making user patches globally available [In reply to]

On 04/25/2012 09:44 PM, Ryan Hill wrote:
> On Wed, 18 Apr 2012 22:41:39 +0100
> David Leverton <levertond [at] googlemail> wrote:
>
>> The point I was trying to get at was that it seems a bit heavyweight to
>> rely on a whole eclass for a minor use-case, as well as a bit
>> error-prone to expect people to remember it every time, but maybe that's
>> the least bad option after all....
>
> Yeah the whole idea here was to make user patches available without ebuild
> modifications or eclass dependence.

Using the "apply_user_patches_here" approach [1] that Ciaran suggested,
the ebuild wouldn't need any modification unless it overrides
default_src_prepare. There is not necessarily any "eclass dependence",
though the ebuild may call eclass functions such as eautoreconf when
necessary.

[1]
http://archives.gentoo.org/gentoo-dev/msg_c228be85e0c4e577ad194e6004d59062.xml
--
Thanks,
Zac


dirtyepic at gentoo

Apr 25, 2012, 11:09 PM

Post #28 of 60 (167 views)
Permalink
Re: Making user patches globally available [In reply to]

On Wed, 25 Apr 2012 22:03:18 -0700
Zac Medico <zmedico [at] gentoo> wrote:

> On 04/25/2012 09:44 PM, Ryan Hill wrote:
> > Yeah the whole idea here was to make user patches available without ebuild
> > modifications or eclass dependence.

> Using the "apply_user_patches_here" approach [1] that Ciaran suggested,
> the ebuild wouldn't need any modification unless it overrides
> default_src_prepare.

Which is a very large number of ebuilds. :) But it's a step in the right
direction.

> There is not necessarily any "eclass dependence",
> though the ebuild may call eclass functions such as eautoreconf when
> necessary.
>
> [1]
> http://archives.gentoo.org/gentoo-dev/msg_c228be85e0c4e577ad194e6004d59062.xml



--
fonts, gcc-porting
toolchain, wxwidgets
@ gentoo.org
Attachments: signature.asc (0.19 KB)


1i5t5.duncan at cox

Apr 25, 2012, 11:18 PM

Post #29 of 60 (165 views)
Permalink
Re: Making user patches globally available [In reply to]

Ryan Hill posted on Wed, 25 Apr 2012 22:44:33 -0600 as excerpted:

> On Wed, 18 Apr 2012 22:41:39 +0100 David Leverton
> <levertond [at] googlemail> wrote:
>
>> The point I was trying to get at was that it seems a bit heavyweight to
>> rely on a whole eclass for a minor use-case, as well as a bit
>> error-prone to expect people to remember it every time, but maybe
>> that's the least bad option after all....
>
> Yeah the whole idea here was to make user patches available without
> ebuild modifications or eclass dependence.

Being a user of this functionality since <name forgotten, unfortunately>
first introduced it with his bashrc hooks and the additional
FEATURES=userpatch he used, and currently using a nasty hack to ensure
that it gets run for every package, even those not calling base.eclass...

IMO we're over-thinking this. Keep in mind that while being able to
simply drop a patch in /etc/portage/patches/cat/pkg/ is very useful
indeed, ultimately, all it does is eliminate the necessity of manually
copying the ebuild to a personal overlay and setting up the patch to be
applied via the ebuild itself.

My suggestion is therefore to do the simple thing, just apply any patches
found in the patches dir, and punt on the complicated do-we-eautoreconf-
or-not thing.

Just having the patches applied consistently will be a HUGE improvement
from what we have at the moment, and it doesn't prevent people from
falling back to the old copy-ebuild-to-overlay-and-modify method, should
anything "fancy", including eautoreconf, but of course also including all
the other things people modify ebuilds for OTHER than "simple patching",
be needed.

IOW, let's quit letting the perfect be the enemy of the good, and just
get on with it, already. I know from experience that this eliminates a
good 80-90% of what would otherwise be personal overlay ebuilds, here,
and it's not as if it's an EITHER overlay OR patches dir thing, so let's
"just do it", and people who need anything fancier can still do the
overlay thing they're doing now, while those just applying a simple patch
no longer have to worry about whether dropping it in patches is enough or
not.

--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman


zmedico at gentoo

Apr 25, 2012, 11:26 PM

Post #30 of 60 (167 views)
Permalink
Re: Re: Making user patches globally available [In reply to]

On 04/25/2012 11:18 PM, Duncan wrote:
> IOW, let's quit letting the perfect be the enemy of the good, and just
> get on with it, already.

If that means settling on something that's fragile and prone to lots of
bug reports, then it's not really practical, because it wastes peoples
time (and time is our most valuable resource).
--
Thanks,
Zac


1i5t5.duncan at cox

Apr 26, 2012, 2:55 AM

Post #31 of 60 (167 views)
Permalink
Re: Making user patches globally available [In reply to]

Zac Medico posted on Wed, 25 Apr 2012 23:26:24 -0700 as excerpted:

> On 04/25/2012 11:18 PM, Duncan wrote:
>> IOW, let's quit letting the perfect be the enemy of the good, and just
>> get on with it, already.
>
> If that means settling on something that's fragile and prone to lots of
> bug reports, then it's not really practical, because it wastes peoples
> time (and time is our most valuable resource).

IMO it's trying to do too much with it that's the fragile bit. If all it
does is the patching, but it /always/ does the patching (unlike the hit-
and-miss we get now), and people know they need to use the overlay-ebuild
method to do anything beyond patching, including if they need to re-
invoke eautoreconf, then it should "just work". Right now we're talking
about all this fancy stuff, detecting when we need to automatically run
eautoreconf, etc, and /that/ seems to me to be the fragile bit.

Of course that's why I have preserve-libs turned off here as well. IMO
it's a too complex solution to a simple problem, and cleaning up when it
breaks is worse than simply dealing with the problem using current proven
technology. But at least epatch-user doesn't break the modified ebuild
in overlay method, like preserved-libs breaks the normal revdep-rebuild
scans so they report no packages to rebuild.

--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman


zmedico at gentoo

Apr 26, 2012, 8:21 AM

Post #32 of 60 (165 views)
Permalink
Re: Re: Making user patches globally available [In reply to]

On 04/26/2012 02:55 AM, Duncan wrote:
> Zac Medico posted on Wed, 25 Apr 2012 23:26:24 -0700 as excerpted:
>
>> On 04/25/2012 11:18 PM, Duncan wrote:
>>> IOW, let's quit letting the perfect be the enemy of the good, and just
>>> get on with it, already.
>>
>> If that means settling on something that's fragile and prone to lots of
>> bug reports, then it's not really practical, because it wastes peoples
>> time (and time is our most valuable resource).
>
> IMO it's trying to do too much with it that's the fragile bit. If all it
> does is the patching, but it /always/ does the patching (unlike the hit-
> and-miss we get now), and people know they need to use the overlay-ebuild
> method to do anything beyond patching, including if they need to re-
> invoke eautoreconf, then it should "just work". Right now we're talking
> about all this fancy stuff, detecting when we need to automatically run
> eautoreconf, etc, and /that/ seems to me to be the fragile bit.

Ignoring the problem doesn't make it go away. If we ignore the problem,
then we end up dealing with bug reports of the form "FEATURES=userpatch
doesn't work with this particular patch set" until the end of time.

Also, don't forget to consider the possibility of interference between
FEATURES=userpatch and epatch_user (applying same patches twice).

Overall, the "apply_user_patches_here" approach [1] seems pretty
reasonable to me.

[1]
http://archives.gentoo.org/gentoo-dev/msg_c228be85e0c4e577ad194e6004d59062.xml
--
Thanks,
Zac


mgorny at gentoo

Apr 26, 2012, 11:27 AM

Post #33 of 60 (167 views)
Permalink
Re: Re: Making user patches globally available [In reply to]

On Thu, 26 Apr 2012 06:18:32 +0000 (UTC)
Duncan <1i5t5.duncan [at] cox> wrote:

> My suggestion is therefore to do the simple thing, just apply any
> patches found in the patches dir, and punt on the complicated
> do-we-eautoreconf- or-not thing.

Agreed. Just make sure the feature will be only used for ebuilds not
calling epatch_user manually or through the eclass.

--
Best regards,
Michał Górny
Attachments: signature.asc (0.31 KB)


zmedico at gentoo

Apr 26, 2012, 11:43 AM

Post #34 of 60 (167 views)
Permalink
Re: Re: Making user patches globally available [In reply to]

On 04/26/2012 11:27 AM, Michał Górny wrote:
> On Thu, 26 Apr 2012 06:18:32 +0000 (UTC)
> Duncan <1i5t5.duncan [at] cox> wrote:
>
>> My suggestion is therefore to do the simple thing, just apply any
>> patches found in the patches dir, and punt on the complicated
>> do-we-eautoreconf- or-not thing.
>
> Agreed. Just make sure the feature will be only used for ebuilds not
> calling epatch_user manually or through the eclass.

So the package manager is supposed to interact with an eclass function?
That's pretty ugly. Why not just roll out a quick EAPI 5 that adds
support for the "apply_user_patches_here" approach [1]?

http://archives.gentoo.org/gentoo-dev/msg_c228be85e0c4e577ad194e6004d59062.xml
--
Thanks,
Zac


mgorny at gentoo

Apr 26, 2012, 11:50 AM

Post #35 of 60 (165 views)
Permalink
Re: Re: Making user patches globally available [In reply to]

On Thu, 26 Apr 2012 11:43:37 -0700
Zac Medico <zmedico [at] gentoo> wrote:

> On 04/26/2012 11:27 AM, Michał Górny wrote:
> > On Thu, 26 Apr 2012 06:18:32 +0000 (UTC)
> > Duncan <1i5t5.duncan [at] cox> wrote:
> >
> >> My suggestion is therefore to do the simple thing, just apply any
> >> patches found in the patches dir, and punt on the complicated
> >> do-we-eautoreconf- or-not thing.
> >
> > Agreed. Just make sure the feature will be only used for ebuilds not
> > calling epatch_user manually or through the eclass.
>
> So the package manager is supposed to interact with an eclass
> function? That's pretty ugly. Why not just roll out a quick EAPI 5
> that adds support for the "apply_user_patches_here" approach [1]?
>
> http://archives.gentoo.org/gentoo-dev/msg_c228be85e0c4e577ad194e6004d59062.xml

1) Because it's ugly hack,
2) it will have to interact with epatch_user anyway (at least to avoid
applying patches twice),
3) it will work only for new/modified ebuilds so won't differ at all
from using epatch_user().

--
Best regards,
Michał Górny
Attachments: signature.asc (0.31 KB)


ciaran.mccreesh at googlemail

Apr 26, 2012, 11:55 AM

Post #36 of 60 (166 views)
Permalink
Re: Re: Making user patches globally available [In reply to]

On Thu, 26 Apr 2012 20:50:02 +0200
Michał Górny <mgorny [at] gentoo> wrote:
> > So the package manager is supposed to interact with an eclass
> > function? That's pretty ugly. Why not just roll out a quick EAPI 5
> > that adds support for the "apply_user_patches_here" approach [1]?
> >
> > http://archives.gentoo.org/gentoo-dev/msg_c228be85e0c4e577ad194e6004d59062.xml
>
> 1) Because it's ugly hack,

Awww. You say that about everything with my name on it.

> 2) it will have to interact with epatch_user anyway (at least to avoid
> applying patches twice),
> 3) it will work only for new/modified ebuilds so won't differ at all
> from using epatch_user().

Not if we kill epatch_user... Not like it works properly anyway, and
it's better to have a "works properly or not at all" feature than one
that breaks randomly. The package mangler could even make it fatal (at
pretend time, no less) if someone wants to apply user patches to an
ebuild whose EAPI doesn't support it.

--
Ciaran McCreesh
Attachments: signature.asc (0.19 KB)


1i5t5.duncan at cox

Apr 26, 2012, 3:08 PM

Post #37 of 60 (169 views)
Permalink
Re: Making user patches globally available [In reply to]

Zac Medico posted on Thu, 26 Apr 2012 08:21:02 -0700 as excerpted:

> On 04/26/2012 02:55 AM, Duncan wrote:
>> Zac Medico posted on Wed, 25 Apr 2012 23:26:24 -0700 as excerpted:
>>
>>> On 04/25/2012 11:18 PM, Duncan wrote:
>>>> IOW, let's quit letting the perfect be the enemy of the good

>>> If that means settling on something that's fragile and prone to lots
>>> of bug reports, then it's not really practical

>> IMO[,] If all it does is the patching, but it /always/ does the
>> patching[,] and people know they need to use the overlay-ebuild
>> method to do anything beyond patching, [including eautoreconf,]
>> then it should "just work".

> Ignoring the problem doesn't make it go away. If we ignore the problem,
> then we end up dealing with bug reports of the form "FEATURES=userpatch
> doesn't work with this particular patch set" until the end of time.

Standard boilerplate resolved/DUP, pointing to the first one, resolved
like this:

NOTABUG/INVALID. The feature does what it says on the label and is
working as designed. The files are patched and the build bails out if
the patch fails. The userpatch feature is deliberately limited to
patching, thus keeping the problem manageable and the code transparent
and maintainable. For anything fancy, including patches that need
eautoreconf called afterward, the userpatch feature isn't the right
tool. Copy the ebuild to an overlay and edit it as necessary to both
apply the patch and eautoreconf or whatever else needs done afterward.

> Also, don't forget to consider the possibility of interference between
> FEATURES=userpatch and epatch_user (applying same patches twice).

The existing phaselock-file solution should continue to work there. Test
for the existence of a file and punt if it's found; touch the file on
first invocation.

The only caveat is that the existing eclass solution has changed the
filename before. Once the corresponding feature exists, both the eclass
and the feature will have to use the same filename so as not to conflict
with each other, thereby effectively locking down the name and preventing
further changes to it.

> Overall, the "apply_user_patches_here" approach [1] seems pretty
> reasonable to me.
>
> [1]
> http://archives.gentoo.org/gentoo-dev/
msg_c228be85e0c4e577ad194e6004d59062.xml

With the requirements that if the ebuild never calls it, it's still run
immediately after source_prepare, thus ensuring that it gets called, AND
that calling either autoreconf or eautoreconf without calling apply-user-
patches first is a repoman-checked error, it looks like it should work,
agreed.

But I'm a bit wary as to the robustness. And without a mechanism to
apply the patches at a particular point (arguably, post-src-prepare) even
in the absence of a specific apply-user-patches-here call, we're back
where we were without a global solution, but if the hard-invocation is
done, then we're back to either inefficiently running eautoreconf twice
or forced into doing likely failure-prone detection, thus the worry over
robustness.

But of course he who codes, decides. We have existing and already proven
code for the simple case, but if someone actually codes that complex
approach, and it actually does both get us global coverage and avoid
duplicated autoreconf runs, without hard to track down failures, I for
one will certainly bless them! =:^)

I just don't want to have to wait until kingdom come for the "perfect"
solution, when we already have a demonstrated "good enough 80-90% of the
time" solution ready to roll out globally, if we'd just do it.

It's also worth pointing out that nothing prevents rolling out the "good
enough" solution right away, then growing the complexity to cover the
harder autoreconf cases when a solution for them actually gets coded.

--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman


zmedico at gentoo

Apr 26, 2012, 6:41 PM

Post #38 of 60 (165 views)
Permalink
Re: Re: Making user patches globally available [In reply to]

On 04/26/2012 03:08 PM, Duncan wrote:
> Zac Medico posted on Thu, 26 Apr 2012 08:21:02 -0700 as excerpted:
>> Also, don't forget to consider the possibility of interference between
>> FEATURES=userpatch and epatch_user (applying same patches twice).
>
> The existing phaselock-file solution should continue to work there. Test
> for the existence of a file and punt if it's found; touch the file on
> first invocation.
>
> The only caveat is that the existing eclass solution has changed the
> filename before. Once the corresponding feature exists, both the eclass
> and the feature will have to use the same filename so as not to conflict
> with each other, thereby effectively locking down the name and preventing
> further changes to it.

Having the package manager interact with an eclass function like
epatch_user is ugly, and it's unnecessary since we can pull all of the
pieces into the package manager in EAPI 5. Any eclasses that currently
call epatch_user can have a conditional like this:

if has $EAPI 0 1 2 3 4 ; then
epatch_user
else
apply_user_patches_here
fi

>> Overall, the "apply_user_patches_here" approach [1] seems pretty
>> reasonable to me.
>>
>> [1]
>> http://archives.gentoo.org/gentoo-dev/
> msg_c228be85e0c4e577ad194e6004d59062.xml
>
> With the requirements that if the ebuild never calls it, it's still run
> immediately after source_prepare, thus ensuring that it gets called, AND
> that calling either autoreconf or eautoreconf without calling apply-user-
> patches first is a repoman-checked error, it looks like it should work,
> agreed.

I think it might be better to die if it's not called in src_prepare,
like Ciaran originally suggested. This ensures that people don't forget
to call it when they are supposed to.

> But I'm a bit wary as to the robustness. And without a mechanism to
> apply the patches at a particular point (arguably, post-src-prepare) even
> in the absence of a specific apply-user-patches-here call, we're back
> where we were without a global solution, but if the hard-invocation is
> done, then we're back to either inefficiently running eautoreconf twice
> or forced into doing likely failure-prone detection, thus the worry over
> robustness.

It's no worse than epatch_user currently is. It's the responsibility of
the person who overrides src_prepare to call eautoreconf or whatever
else when necessary, so the package manager will not have the burden.
--
Thanks,
Zac


1i5t5.duncan at cox

Apr 27, 2012, 7:15 AM

Post #39 of 60 (167 views)
Permalink
Re: Making user patches globally available [In reply to]

Zac Medico posted on Thu, 26 Apr 2012 18:41:21 -0700 as excerpted:

> On 04/26/2012 03:08 PM, Duncan wrote:
>> Zac Medico posted on Thu, 26 Apr 2012 08:21:02 -0700 as excerpted:
>>> Also, don't forget to consider the possibility of interference between
>>> FEATURES=userpatch and epatch_user (applying same patches twice).
>>
>> The existing phaselock-file solution should continue to work there.

> Having the package manager interact with an eclass function like
> epatch_user is ugly, and it's unnecessary since we can pull all of the
> pieces into the package manager in EAPI 5. Any eclasses that currently
> call epatch_user can have a conditional like this:
>
> if has $EAPI 0 1 2 3 4 ; then
> epatch_user
> else
> apply_user_patches_here
> fi

But that doesn't solve the problem of making it globally available, since
it only applies to packages/eclasses that already call epatch_user for
EAPIs thru current EAPI-4.

In ordered to make it globally available, it cannot simply be an EAPI-5
thing, it must apply to all current ebuilds whether they (or an inherited
eclass) call epatch_user or not. Which means that conflict with the
existing epatch_user is unavoidable, since it will either try to run
twice where it's already called, or it won't run at all where it's not.

Tho I guess one solution to that would be to change the name of the
patches dir for the new version, calling it /etc/portage/patches2/ or
some such. Another solution could be to make the existing epatch_user
call a no-op, and force post-src-prepare invocation on EAPIs 1-4.

But both of these have problems in that they nullify the work done in
existing ebuilds to locate the call correctly, before eautoreconf or
whatever.

>
>>> Overall, the "apply_user_patches_here" approach [1] seems pretty
>>> reasonable to me.
>>>
>>> [1]
>>> http://archives.gentoo.org/gentoo-dev/
>> msg_c228be85e0c4e577ad194e6004d59062.xml
>>
>> With the requirements that if the ebuild never calls it, it's still run
>> immediately after source_prepare, thus ensuring that it gets called,
>> AND that calling either autoreconf or eautoreconf without calling
>> apply-user-patches fit is a repoman-checked error, it looks like it
>> should work, agreed.
>
> I think it might be better to die if it's not called in src_prepare,
> like Ciaran originally suggested. This ensures that people don't forget
> to call it when they are supposed to.

That can work for EAPI-5, but what about existing ebuilds? Remember, the
goal is global coverage without forcing an edit to every existing ebuild
that doesn't yet call it either directly or via eclass.

>> But I'm a bit wary as to the robustness. And without a mechanism to
>> apply the patches at a particular point (arguably, post-src-prepare)
>> even in the absence of a specific apply-user-patches-here call, we're
>> back where we were without a global solution, but if the
>> hard-invocation is done, then we're back to either inefficiently
>> running eautoreconf twice or forced into doing likely failure-prone
>> detection, thus the worry over robustness.
>
> It's no worse than epatch_user currently is. It's the responsibility of
> the person who overrides src_prepare to call eautoreconf or whatever
> else when necessary, so the package manager will not have the burden.

Except that in ordered to make it global without touching existing
ebuilds, the PM MUST shoulder the burden. THAT is where the robustness
issues appear.

The require-it-in-EAPI-5-plus-only solution will help longer term, but
given that many core packages are to remain EAPI-0 for the foreseeable
future, that could be a VERY long term indeed. Additionally, it only
makes user confusion WORSE, since a user still won't know for sure
whether his patches will apply to a particular ebuild without looking.
Making it "just work" is the goal, and just doing it for EAPI-5+ is nice,
but not really sufficient.

--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman


mgorny at gentoo

Apr 27, 2012, 7:20 AM

Post #40 of 60 (165 views)
Permalink
Re: Re: Making user patches globally available [In reply to]

On Fri, 27 Apr 2012 14:15:35 +0000 (UTC)
Duncan <1i5t5.duncan [at] cox> wrote:

> Zac Medico posted on Thu, 26 Apr 2012 18:41:21 -0700 as excerpted:
>
> > On 04/26/2012 03:08 PM, Duncan wrote:
> >> Zac Medico posted on Thu, 26 Apr 2012 08:21:02 -0700 as excerpted:
> >>> Also, don't forget to consider the possibility of interference
> >>> between FEATURES=userpatch and epatch_user (applying same patches
> >>> twice).
> >>
> >> The existing phaselock-file solution should continue to work
> >> there.
>
> > Having the package manager interact with an eclass function like
> > epatch_user is ugly, and it's unnecessary since we can pull all of
> > the pieces into the package manager in EAPI 5. Any eclasses that
> > currently call epatch_user can have a conditional like this:
> >
> > if has $EAPI 0 1 2 3 4 ; then
> > epatch_user
> > else
> > apply_user_patches_here
> > fi
>
> But that doesn't solve the problem of making it globally available,
> since it only applies to packages/eclasses that already call
> epatch_user for EAPIs thru current EAPI-4.
>
> In ordered to make it globally available, it cannot simply be an
> EAPI-5 thing, it must apply to all current ebuilds whether they (or
> an inherited eclass) call epatch_user or not. Which means that
> conflict with the existing epatch_user is unavoidable, since it will
> either try to run twice where it's already called, or it won't run at
> all where it's not.
>
> Tho I guess one solution to that would be to change the name of the
> patches dir for the new version, calling it /etc/portage/patches2/ or
> some such. Another solution could be to make the existing
> epatch_user call a no-op, and force post-src-prepare invocation on
> EAPIs 1-4.
>
> But both of these have problems in that they nullify the work done in
> existing ebuilds to locate the call correctly, before eautoreconf or
> whatever.

We could finally decide it'll be a Portage internal feature, and modify
epatch_user() to export some Portage-specific indication that user
patches were applied.

--
Best regards,
Michał Górny
Attachments: signature.asc (0.31 KB)


ciaran.mccreesh at googlemail

Apr 27, 2012, 7:27 AM

Post #41 of 60 (166 views)
Permalink
Re: Re: Making user patches globally available [In reply to]

On Fri, 27 Apr 2012 14:15:35 +0000 (UTC)
Duncan <1i5t5.duncan [at] cox> wrote:
> In ordered to make it globally available, it cannot simply be an
> EAPI-5 thing, it must apply to all current ebuilds whether they (or
> an inherited eclass) call epatch_user or not. Which means that
> conflict with the existing epatch_user is unavoidable, since it will
> either try to run twice where it's already called, or it won't run at
> all where it's not.

In order to make it globally available, you put it in EAPI 5, and make
the package mangler die at pretend time if the user has patches
specified for a package that isn't EAPI 5.

--
Ciaran McCreesh
Attachments: signature.asc (0.19 KB)


zmedico at gentoo

Apr 27, 2012, 8:41 AM

Post #42 of 60 (170 views)
Permalink
Re: Re: Making user patches globally available [In reply to]

On 04/27/2012 07:27 AM, Ciaran McCreesh wrote:
> On Fri, 27 Apr 2012 14:15:35 +0000 (UTC)
> Duncan <1i5t5.duncan [at] cox> wrote:
>> In ordered to make it globally available, it cannot simply be an
>> EAPI-5 thing, it must apply to all current ebuilds whether they (or
>> an inherited eclass) call epatch_user or not. Which means that
>> conflict with the existing epatch_user is unavoidable, since it will
>> either try to run twice where it's already called, or it won't run at
>> all where it's not.
>
> In order to make it globally available, you put it in EAPI 5, and make
> the package mangler die at pretend time if the user has patches
> specified for a package that isn't EAPI 5.

Or, have repoman assert that src_prepare contains an epatch_user call if
EAPI is less than 5.
--
Thanks,
Zac


ciaran.mccreesh at googlemail

Apr 27, 2012, 8:45 AM

Post #43 of 60 (168 views)
Permalink
Re: Re: Making user patches globally available [In reply to]

On Fri, 27 Apr 2012 08:41:35 -0700
Zac Medico <zmedico [at] gentoo> wrote:
> > In order to make it globally available, you put it in EAPI 5, and
> > make the package mangler die at pretend time if the user has patches
> > specified for a package that isn't EAPI 5.
>
> Or, have repoman assert that src_prepare contains an epatch_user call
> if EAPI is less than 5.

Why bother? That's hideously error prone. We have a simple way that's
guaranteed to work, and that is able to inform the user if their
expectations can't be met.

--
Ciaran McCreesh
Attachments: signature.asc (0.19 KB)


realnc at gmail

Apr 27, 2012, 8:55 AM

Post #44 of 60 (167 views)
Permalink
Re: Making user patches globally available [In reply to]

On 27/04/12 17:15, Duncan wrote:
> Zac Medico posted on Thu, 26 Apr 2012 18:41:21 -0700 as excerpted:
>> Having the package manager interact with an eclass function like
>> epatch_user is ugly, and it's unnecessary since we can pull all of the
>> pieces into the package manager in EAPI 5. Any eclasses that currently
>> call epatch_user can have a conditional like this:
>>
>> if has $EAPI 0 1 2 3 4 ; then
>> epatch_user
>> else
>> apply_user_patches_here
>> fi
>
> But that doesn't solve the problem of making it globally available, since
> it only applies to packages/eclasses that already call epatch_user for
> EAPIs thru current EAPI-4.
>
> In ordered to make it globally available, it cannot simply be an EAPI-5
> thing, it must apply to all current ebuilds whether they (or an inherited
> eclass) call epatch_user or not. Which means that conflict with the
> existing epatch_user is unavoidable, since it will either try to run
> twice where it's already called, or it won't run at all where it's not.

According to the source, calling it twice is perfectly safe.


zmedico at gentoo

Apr 27, 2012, 8:55 AM

Post #45 of 60 (166 views)
Permalink
Re: Re: Making user patches globally available [In reply to]

On 04/27/2012 08:45 AM, Ciaran McCreesh wrote:
> On Fri, 27 Apr 2012 08:41:35 -0700
> Zac Medico <zmedico [at] gentoo> wrote:
>>> In order to make it globally available, you put it in EAPI 5, and
>>> make the package mangler die at pretend time if the user has patches
>>> specified for a package that isn't EAPI 5.
>>
>> Or, have repoman assert that src_prepare contains an epatch_user call
>> if EAPI is less than 5.
>
> Why bother? That's hideously error prone. We have a simple way that's
> guaranteed to work, and that is able to inform the user if their
> expectations can't be met.

I suppose that we could do it both ways. The repoman check would be for
people who want a practical approach that doesn't require all ebuilds to
be converted to EAPI 5, and your strict die approach would be for people
who want strictness and can afford to wait for the relevant ebuilds to
be converted to EAPI 5.
--
Thanks,
Zac


ciaran.mccreesh at googlemail

Apr 27, 2012, 9:00 AM

Post #46 of 60 (166 views)
Permalink
Re: Re: Making user patches globally available [In reply to]

On Fri, 27 Apr 2012 08:55:49 -0700
Zac Medico <zmedico [at] gentoo> wrote:
> I suppose that we could do it both ways. The repoman check would be
> for people who want a practical approach that doesn't require all
> ebuilds to be converted to EAPI 5, and your strict die approach would
> be for people who want strictness and can afford to wait for the
> relevant ebuilds to be converted to EAPI 5.

But there's no way the repoman check is going to give anything like
reliable answers if you're involving eclasses...

--
Ciaran McCreesh
Attachments: signature.asc (0.19 KB)


zmedico at gentoo

Apr 27, 2012, 9:08 AM

Post #47 of 60 (166 views)
Permalink
Re: Re: Making user patches globally available [In reply to]

On 04/27/2012 09:00 AM, Ciaran McCreesh wrote:
> On Fri, 27 Apr 2012 08:55:49 -0700
> Zac Medico <zmedico [at] gentoo> wrote:
>> I suppose that we could do it both ways. The repoman check would be
>> for people who want a practical approach that doesn't require all
>> ebuilds to be converted to EAPI 5, and your strict die approach would
>> be for people who want strictness and can afford to wait for the
>> relevant ebuilds to be converted to EAPI 5.
>
> But there's no way the repoman check is going to give anything like
> reliable answers if you're involving eclasses...

Okay, so people who need "reliable answers" can go with your strict
approach. Meanwhile, it's relatively easy to to a manual audit of the
src_prepare function of each eclass.
--
Thanks,
Zac


ciaran.mccreesh at googlemail

Apr 27, 2012, 9:11 AM

Post #48 of 60 (166 views)
Permalink
Re: Re: Making user patches globally available [In reply to]

On Fri, 27 Apr 2012 09:08:06 -0700
Zac Medico <zmedico [at] gentoo> wrote:
> > But there's no way the repoman check is going to give anything like
> > reliable answers if you're involving eclasses...
>
> Okay, so people who need "reliable answers" can go with your strict
> approach. Meanwhile, it's relatively easy to to a manual audit of the
> src_prepare function of each eclass.

Providing unreliable functionality just leads to whining and
contortions when it doesn't work. This isn't a situation where
compromise is necessary, so there's no reason not to just do it
properly.

--
Ciaran McCreesh
Attachments: signature.asc (0.19 KB)


zmedico at gentoo

Apr 27, 2012, 9:19 AM

Post #49 of 60 (166 views)
Permalink
Re: Re: Making user patches globally available [In reply to]

On 04/27/2012 09:11 AM, Ciaran McCreesh wrote:
> On Fri, 27 Apr 2012 09:08:06 -0700
> Zac Medico <zmedico [at] gentoo> wrote:
>>> But there's no way the repoman check is going to give anything like
>>> reliable answers if you're involving eclasses...
>>
>> Okay, so people who need "reliable answers" can go with your strict
>> approach. Meanwhile, it's relatively easy to to a manual audit of the
>> src_prepare function of each eclass.
>
> Providing unreliable functionality just leads to whining and
> contortions when it doesn't work. This isn't a situation where
> compromise is necessary, so there's no reason not to just do it
> properly.

Yeah, I guess you're right. ;-)
--
Thanks,
Zac


zmedico at gentoo

Apr 27, 2012, 10:19 AM

Post #50 of 60 (166 views)
Permalink
Re: Re: Making user patches globally available [In reply to]

On 04/27/2012 07:20 AM, Michał Górny wrote:
> We could finally decide it'll be a Portage internal feature, and modify
> epatch_user() to export some Portage-specific indication that user
> patches were applied.

Since we've managed to survive up to this point without such a feature,
I think it's worth the wait roll it into EAPI 5 and have a clean
solution that doesn't rely on package manager interaction with eclasses.
If we quickly draft an EAPI 5 spec, there's still have time to have it
approved at the next council meeting.
--
Thanks,
Zac

First page Previous page 1 2 3 Next page Last page  View All Gentoo dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.