Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Add post_install and post_uninstall hooks to quarks #5753

Closed
madskjeldgaard opened this issue Apr 4, 2022 · 6 comments
Closed

[FR] Add post_install and post_uninstall hooks to quarks #5753

madskjeldgaard opened this issue Apr 4, 2022 · 6 comments
Labels
comp: sclang sclang C++ implementation (primitives, etc.). for changes to class lib use "comp: class library" good first issue indicates issue tickets that are suitable for a new contributor

Comments

@madskjeldgaard
Copy link
Contributor

madskjeldgaard commented Apr 4, 2022

Some quarks produce files/folders outside of it's own folder, some quarks need the system to run a certain command after installation/uninstallation or do other things to finish the setup, and while this can be done with a method in a class of the package or documentation, it would be really great to have this automated in the quark file itself.

What I propose is that the quark dictionary contains two extra fields that each take a function that is run as hooks (inspired by how some linux package managers do this).

  • post_install - A function that runs after the quark is cloned and downloaded. Could be used to install further dependencies or setup things on the system.
  • post_uninstall - A function that runs after the quark is uninstalled. Could be used for cleaning up stuff.

Those two are the most important I can come up with now, but I have an additional hook in mind that is worth mentioning, but I'm currently not sure how to solve it. It would additionally be great to have a hook that is triggering a function after the first class library compilation after the quark is installed - maybe called post_compilation. This would allow to call methods and classes in the quark after it has been installed and the classes are now compiled by the system.

@madskjeldgaard madskjeldgaard added good first issue indicates issue tickets that are suitable for a new contributor comp: sclang sclang C++ implementation (primitives, etc.). for changes to class lib use "comp: class library" labels Apr 4, 2022
@madskjeldgaard
Copy link
Contributor Author

As further inspiration, here are the hooks that are used in the Arch Linux package system:

  • pre_install
  • post_install
  • pre_upgrade
  • post_upgrade
  • pre_remove
  • post_remove

capital-G added a commit to capital-G/supercollider that referenced this issue May 20, 2022
@capital-G capital-G mentioned this issue May 20, 2022
4 tasks
telephon pushed a commit to telephon/supercollider that referenced this issue Nov 24, 2022
telephon pushed a commit to telephon/supercollider that referenced this issue Dec 23, 2022
telephon pushed a commit to telephon/supercollider that referenced this issue Dec 23, 2022
@dyfer
Copy link
Member

dyfer commented Mar 14, 2023

I think this was added in #5907

@dyfer dyfer closed this as completed Mar 14, 2023
@madskjeldgaard
Copy link
Contributor Author

Ah that's amazing @dyfer !

@madskjeldgaard
Copy link
Contributor Author

and thanks @telephon !

@dyfer
Copy link
Member

dyfer commented Mar 14, 2023

and thanks to @capital-G

@madskjeldgaard
Copy link
Contributor Author

Thanks @capital-G !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: sclang sclang C++ implementation (primitives, etc.). for changes to class lib use "comp: class library" good first issue indicates issue tickets that are suitable for a new contributor
Projects
None yet
Development

No branches or pull requests

2 participants