Skip to content

Conversation

@Flowdalic
Copy link
Member

No description provided.

@Flowdalic Flowdalic force-pushed the hook branch 2 times, most recently from 23fe0b5 to a4b2762 Compare April 1, 2023 16:55
@mgorny
Copy link
Member

mgorny commented Apr 2, 2023

One last idea — let's rename hook.d to something that better indicates that it takes place after preparing the kernel list. I'd normally expect hooks to be run after removals. I was thinking of pre-removal.d but it's also run when no removals are planned, so maybe there's a better name.

@Flowdalic
Copy link
Member Author

I was thinking of pre-removal.d but it's also run when no removals are planned, so maybe there's a better name.

  • kernels-computed.d
  • kernel-sets-computed.d
  • kernels-determined.d
  • kernel-sets-determined.d

ATM, the last one is what I like the most. But I have no strong opinion here. Let me know what you think.

@Flowdalic
Copy link
Member Author

Went with kernel-sets-determined.d, but I am happy to change it to anything you like.

Signed-off-by: Florian Schmaus <flow@gentoo.org>
@Flowdalic
Copy link
Member Author

Went with post-kernel-sets.d. I think the post- prefix makes it more obvious that it is a directory for hooks.

@Flowdalic
Copy link
Member Author

@mgorny friendly ping :)

@mgorny
Copy link
Member

mgorny commented Apr 6, 2023

I'm sorry, I need to think about the name a little more. I really want it to be "obvious" when it runs, and how many times, and in what circumstances.

@Flowdalic
Copy link
Member Author

@mgorny friendly ping

@mgorny
Copy link
Member

mgorny commented Apr 15, 2023

I'm sorry but I can't think of a really good way of doing this right at the moment.

How about if I added a machine-readable output mode that you could use with --pretend (or just with removal), and grab from a wrapper to do your bidding?

@Flowdalic
Copy link
Member Author

Flowdalic commented Apr 20, 2023

That feels like an unnecessary complication. I am not sure what the advantage would be, while it would mean to loose the direct hook capability (incl. having multiple hooks). I like the current design.

I am also not sure if I understand the concerns you have with the current approach. But would having an environment variable, e.g., ECLEAN_PRETEND, which signals if a removal action is to be performed or not, mitigate your concerns? Since you wrote "I really want it to be `'obvious' when it runs".1

1: Note that for my use case, this information is not required.

@mgorny
Copy link
Member

mgorny commented Apr 20, 2023

Unnecessary complication is adding semi-generic hook support with one kind of hooks that's designed ad-hoc to implement a hack to add unsupported functionality without clear design how to go from there, how to make hooks that are actually useful and quite good probability that extending hook support will require rewriting the hook running code to support different kinds of hooks and different behavior (per-kernel hooks, feedback).

@mgorny mgorny closed this May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants