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

Overly permissive check for mercurial in meta.yaml files #3256

Closed
dpryan79 opened this issue Nov 11, 2018 · 1 comment
Closed

Overly permissive check for mercurial in meta.yaml files #3256

dpryan79 opened this issue Nov 11, 2018 · 1 comment
Labels
locked [bot] locked due to inactivity stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity

Comments

@dpryan79
Copy link
Contributor

dpryan79 commented Nov 11, 2018

This seems to be related to #1488. It turns out that if hg_ (in any case) is present in a meta.yaml file that conda build will assume that mercurial is being used. That's normally not an issue, but when things like linting are being done (at least on bioconda with bioconda-utils lint) we then receive the following error:

Traceback (most recent call last):
  File "/home/dpryan/miniconda3/bin/bioconda-utils", line 11, in <module>
    sys.exit(main())
  File "/home/dpryan/miniconda3/lib/python3.6/site-packages/bioconda_utils/cli.py", line 657, in main
    bioconductor_skeleton, pypi_check, clean_cran_skeleton,
  File "/home/dpryan/miniconda3/lib/python3.6/site-packages/argh/dispatching.py", line 328, in dispatch_commands
    dispatch(parser, *args, **kwargs)
  File "/home/dpryan/miniconda3/lib/python3.6/site-packages/argh/dispatching.py", line 174, in dispatch
    for line in lines:
  File "/home/dpryan/miniconda3/lib/python3.6/site-packages/argh/dispatching.py", line 277, in _execute_command
    for line in result:
  File "/home/dpryan/miniconda3/lib/python3.6/site-packages/argh/dispatching.py", line 260, in _call
    result = function(*positional, **keywords)
  File "/home/dpryan/miniconda3/lib/python3.6/site-packages/bioconda_utils/cli.py", line 243, in lint
    report = linting.lint(_recipes, lint_args)
  File "/home/dpryan/miniconda3/lib/python3.6/site-packages/bioconda_utils/linting.py", line 204, in lint
    metas.extend(utils.load_all_meta(recipe, config=config, finalize=False))
  File "/home/dpryan/miniconda3/lib/python3.6/site-packages/bioconda_utils/utils.py", line 172, in load_all_meta
    bypass_env_check=bypass_env_check,
  File "/home/dpryan/miniconda3/lib/python3.6/site-packages/conda_build/api.py", line 44, in render
    permit_unsatisfiable_variants=permit_unsatisfiable_variants)
  File "/home/dpryan/miniconda3/lib/python3.6/site-packages/conda_build/render.py", line 745, in render_recipe
    try_download(m, no_download_source=no_download_source)
  File "/home/dpryan/miniconda3/lib/python3.6/site-packages/conda_build/render.py", line 580, in try_download
    raise ValueError("no_download_source specified, but can't fully render recipe without"
ValueError: no_download_source specified, but can't fully render recipe without downloading source.  Please fix the recipe, or don't use no_download_source.

The cause of that appears to be https://github.com/conda/conda-build/blob/master/conda_build/metadata.py#L1575 , where the whole file is checked for a simple regex (presumably only the source section should be checked).

It's quite simple for me to check for and remove hg_ in the bioconda skeleton code to avoid this, but I figured this should be pointed out so others running into the aforementioned error can find the cause easily.

Below is a meta.yaml file that will reproduce this issue (I think the summary is the issue):

{% set version = "2.18.0" %}
{% set name = "hgu95av2cdf" %}
{% set bioc = "3.8" %}

package:
  name: 'bioconductor-{{ name|lower }}'
  version: '{{ version }}'
source:
  url:
    - 'https://bioconductor.org/packages/{{ bioc }}/data/annotation/src/contrib/{{ name }}_{{ version }}.tar.gz'
    - 'https://bioarchive.galaxyproject.org/{{ name }}_{{ version }}.tar.gz'
    - 'https://depot.galaxyproject.org/software/bioconductor-{{ name }}/bioconductor-{{ name }}_{{ version }}_src_all.tar.gz'
  md5: 026bae2f76433593f75ca6c79bc9a9d0
build:
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/
requirements:
  host:
    - 'bioconductor-annotationdbi >=1.44.0,<1.46.0'
    - r-base
  run:
    - 'bioconductor-annotationdbi >=1.44.0,<1.46.0'
    - r-base
    - wget
test:
  commands:
    - '$R -e "library(''{{ name }}'')"'
about:
  home: 'https://bioconductor.org/packages/{{ bioc }}/data/annotation/html/{{ name }}.html'
  license: LGPL
  summary: 'A package containing an environment representing the HG_U95Av2.CDF file.'

Xref: bioconda/bioconda-utils#353

@github-actions
Copy link

Hi there, thank you for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue at hand
  2. Comment that the issue is still reproducible and include:
    - What OS and version you reproduced the issue on
    - What steps you followed to reproduce the issue

NOTE: If this issue was closed prematurely, please leave a comment.

Thanks!

@github-actions github-actions bot added the stale [bot] marked as stale due to inactivity label Dec 22, 2022
@github-actions github-actions bot added the stale::closed [bot] closed after being marked as stale label Jan 22, 2023
@github-actions github-actions bot added the locked [bot] locked due to inactivity label Jan 22, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity
Projects
None yet
Development

No branches or pull requests

1 participant