Re: [gentoo-dev] Add Hooks to Eselect

2023-08-21 Thread konsolebox
On Tue, Aug 22, 2023, 02:50 Ulrich Mueller, wrote: > > On Mon, 21 Aug 2023, konsolebox wrote: > > > This actually allows users to virtually extend an eselect module without > > needing to fork it. The things people can do are endless. > > This isn't what eselect modules were designed for.

Re: [gentoo-dev] Add Hooks to Eselect

2023-08-21 Thread Redjard
On 2023-08-21 20:50:39, Ulrich Mueller wrote: > First, changing a low-level function like check_do() is really a no-no, > because this function is documented in the eselect developer guide and > third-party modules may rely on it. The documentation, as far as I can tell, states only > check_do

Re: [gentoo-dev] Add Hooks to Eselect

2023-08-21 Thread Ulrich Mueller
> On Mon, 21 Aug 2023, konsolebox wrote: > This actually allows users to virtually extend an eselect module without > needing to fork it. The things people can do are endless. This isn't what eselect modules were designed for. They are specialised tools that are supposed to do one thing,

Re: [gentoo-dev] Add Hooks to Eselect

2023-08-21 Thread konsolebox
On Mon, Aug 21, 2023, 18:00 Ulrich Mueller, wrote: > Sorry, but I don't see much incentive for adding such a hook mechanism. > This actually allows users to virtually extend an eselect module without needing to fork it. The things people can do are endless. Even now I just thought about using

Re: [gentoo-dev] Add Hooks to Eselect

2023-08-21 Thread Ulrich Mueller
> On Mon, 21 Aug 2023, Redjard wrote: > I did consider doing so, however with that approach my effective fork > of the kernel.eselect module would get continually outdated, while a > wrapper module requires a different command [...] Not necessarily. It could use the same name as the

Re: [gentoo-dev] Add Hooks to Eselect

2023-08-21 Thread Redjard
On 2023-08-21 12:00:18, Ulrich Mueller wrote: In addition to user patches, you can also put your own modules in the ${HOME}/.eselect/modules/ directory. For example, you could either copy kernel.eselect to there and modify it. Or, you could have a mykernel.eselect module, along these lines: I

Re: [gentoo-dev] Add Hooks to Eselect

2023-08-21 Thread Ulrich Mueller
> On Mon, 21 Aug 2023, Redjard wrote: > To roughly summarize, I was asking for a method to hook into eselect, > to modify the behavior of eselect kernel set. > I was pointed in the direction of a user patch by konsolebox, and > consequently wrote the patch. In addition to user patches, you

Re: [gentoo-dev] Add Hooks to Eselect

2023-08-21 Thread Redjard
On 2023-08-19 06:58:10, Michał Górny wrote: You have to provide the rationale here. You can't expect people to sign up for some shady third-party service to read it. My bad, not much of value is locked in the proprietary service but I should have stated as such. To roughly summarize, I was

Re: [gentoo-dev] Add Hooks to Eselect

2023-08-18 Thread Michał Górny
On Fri, 2023-08-18 at 21:38 +0200, Redjard wrote: > From: Redjard > > Add Hooks to Eselect > > For example for "eselect kernel list" the script > /etc/eselect/hooks/kernel/list/pre > is called before the eselect acts, and > /etc/eselect/hooks/kernel/list/post afterwards. > In the functions

[gentoo-dev] Add Hooks to Eselect

2023-08-18 Thread Redjard
From: Redjard Add Hooks to Eselect For example for "eselect kernel list" the script /etc/eselect/hooks/kernel/list/pre is called before the eselect acts, and /etc/eselect/hooks/kernel/list/post afterwards. In the functions you can use and modify $params, the value of which the do_ function