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

run_script not called for pre-unlink scripts #3761

Open
alexc5589 opened this issue Jan 21, 2025 · 3 comments
Open

run_script not called for pre-unlink scripts #3761

alexc5589 opened this issue Jan 21, 2025 · 3 comments
Labels
type::question Further information is requested

Comments

@alexc5589
Copy link

run_script is called for post-link scripts but despite the comment in the code and the docs describing similar for pre-unlink there is no call present and thus pre-unlink scripts are not executed.

Is this a bug/oversight or by design?

Thanks!

@Hind-M
Copy link
Member

Hind-M commented Jan 23, 2025

Hey @alexc5589! Can you please point to the code and the docs you're referring to? Thanks!

@Hind-M Hind-M added type::question Further information is requested status::user_reply_needed labels Jan 23, 2025
@alexc5589
Copy link
Author

alexc5589 commented Jan 23, 2025

Yeah sure, thanks for the reply.

The docs I'm referring to are the conda description of link scripts, here https://docs.conda.io/projects/conda-build/en/stable/resources/link-scripts.html

The comment in the code I'm referring to is the comment on the run_script function, here https://github.com/mamba-org/mamba/blob/main/libmamba/src/core/link.cpp#L314.

It looks like the intention was to call this function before unlinking.

Cheers

@Hind-M
Copy link
Member

Hind-M commented Jan 23, 2025

As far as I can tell, it looks like the run_script function was indeed intended to be called with pre-unlink, so it might have simply been overlooked. To confirm this, we would need a use case where we expect the pre-unlink scripts to run, to ensure it behaves as it should (and come up with the corresponding tests - note that there are no tests for post-link either at the moment).
Can you please share the details of your use case if possible?
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants