Fix PKG_BUILDNUM
env variable for post-link scripts
#2420
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As documented in https://docs.conda.io/projects/conda-build/en/latest/user-guide/environment-variables.html , during the build process the
PKG_BUILDNUM
environment variable should contain the build number of the package being built, without the hash (which is instead part of thePKG_BUILD_STRING
environment variable).When calling the pre-link, post-link and pre-unlink scripts,
PKG_BUILDNUM
is one of the 4 environment variable that need to be set, see https://docs.conda.io/projects/conda-build/en/latest/resources/link-scripts.html (as is the case already), but here it was including also the hash. This breaks the installation of some bioconda packages (e.g. lotus2) when using micromamba (but not mamba, not sure why).Fix the following error:
where
PKG_BUILDNUM
should have been simply 0.The relevant part of the
post-link.sh
file of the lotus2 recipe is:The same package is installed fine by both conda and mamba, that correctly find and run the
__lotus2@2.24/share/lotus2-2.24-0/autoInstall.pl
script.Found by @hildebra .