Open kenodegard opened 10 months ago
pre-link
, post-link
, and pre-unlink
are viewed as dangerous and legacy/deprecated, so we should look into removing it entirely
conda-forge forbids post-links for noarch: https://conda-forge.org/docs/maintainer/knowledge_base.html#noarch-python
to work around this, packages will have a multi-output recipe where the package itself would be noarch but the post-links are an arch specific package: https://github.com/conda-forge/bladerf-feedstock/blob/7deba2ef18fd1a9ba69239c61f018f67c24eba97/recipe/meta.yaml#L93
Oh wow. Having an extra output seems like overkill if I just want to emit a message to users (i.e., echo into $PREFIX/.messages.txt
). Is there any alternative means of doing this then going forward?
xref: https://github.com/conda-forge/r-tinytex-feedstock/issues/53
Right now, thinking I'm just going to drop it.
Hmm...but checking the info/files
manifest does show bin/.r-tinytex-post-link.sh
and the file is there. Still, seeing crashes on something as simple as echo "my message" >> .messages.txt
.
What happened?
When packaging a noarch package with post-link scripts only the post-link script cooresponding to the host machine is included in the output package and so in other words it isn't properly noarch.
The issue comes from how post-link (and pre-link and pre-unlink) scripts are detected:
https://github.com/conda/conda-build/blob/ca9de6013cf7d6909f063247512546d351f7a757/conda_build/build.py#L154-L178
Xref https://github.com/conda/conda/pull/13389