conda-forge.github.io icon indicating copy to clipboard operation
conda-forge.github.io copied to clipboard

Add bot directive to remove a patch on a new release

Open tdegeus opened this issue 7 months ago • 2 comments

Your question:

What happens from time-to-time is that a minor bug appears in an already released version (e.g. here). A nice option for the feedstock is to add a patch. However, this adds a maintenance burden as the patch has to be removed on the next release. It would be nice to have the bot do this.

For example:

{% set version = "10.1.1" %}

source:
   url: https://github.com/fmtlib/fmt/archive/{{ version }}.tar.gz
   sha256: {{ sha256 }}
   patches:
     - patches/0001-fix-core-version-10.1.1.patch   # [delete >{{ version }}]

Upon upgrading to 10.1.2 (or any version higher than 10.1.1) the bot could then remove the patch from meta.yaml and remove the patch file.

tdegeus avatar Nov 28 '23 14:11 tdegeus

You can always apply a selector using thr version directly to the line in the recipe with the patch. This won’t remove the line in the file but will remove the patch.

beckermr avatar Nov 29 '23 03:11 beckermr

From the docs I could not find a selector that does it. Do you rather mean one could use jinja2 ?

{% set version = "10.1.1" %}

source:
   url: https://github.com/fmtlib/fmt/archive/{{ version }}.tar.gz
   sha256: {{ sha256 }}
{% if {{ version }} == "10.1.1" %}
   patches:
     - patches/0001-fix-core-version-10.1.1.patch
{% endif %}

Indeed, that is not too bad. Still it would be nice to have a bot command to automatically clean-up.

tdegeus avatar Nov 30 '23 09:11 tdegeus