conda-forge / petsc4py-feedstock

A conda-smithy repository for petsc4py.
BSD 3-Clause "New" or "Revised" License
0 stars 15 forks source link

Issue with last package build #64

Closed AntoineD closed 2 years ago

AntoineD commented 2 years ago

Solution to issue cannot be found in the documentation.

Issue

conda create -p /tmp/foo --channel conda-forge python=3.9 petsc4py         
Collecting package metadata (current_repodata.json): failed

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "/opt/mambaforge/lib/python3.9/site-packages/conda/exceptions.py", line 1082, in __call__
        return func(*args, **kwargs)
      File "/opt/mambaforge/lib/python3.9/site-packages/conda/cli/main.py", line 87, in _main
        exit_code = do_call(args, p)
      File "/opt/mambaforge/lib/python3.9/site-packages/conda/cli/conda_argparse.py", line 84, in do_call
        return getattr(module, func_name)(args, parser)
      File "/opt/mambaforge/lib/python3.9/site-packages/conda/cli/main_create.py", line 41, in execute
        install(args, parser, 'create')
      File "/opt/mambaforge/lib/python3.9/site-packages/conda/cli/install.py", line 260, in install
        unlink_link_transaction = solver.solve_for_transaction(
      File "/opt/mambaforge/lib/python3.9/site-packages/conda/core/solve.py", line 152, in solve_for_transaction
        unlink_precs, link_precs = self.solve_for_diff(update_modifier, deps_modifier,
      File "/opt/mambaforge/lib/python3.9/site-packages/conda/core/solve.py", line 195, in solve_for_diff
        final_precs = self.solve_final_state(update_modifier, deps_modifier, prune, ignore_pinned,
      File "/opt/mambaforge/lib/python3.9/site-packages/conda/core/solve.py", line 300, in solve_final_state
        ssc = self._collect_all_metadata(ssc)
      File "/opt/mambaforge/lib/python3.9/site-packages/conda/common/io.py", line 88, in decorated
        return f(*args, **kwds)
      File "/opt/mambaforge/lib/python3.9/site-packages/conda/core/solve.py", line 463, in _collect_all_metadata
        index, r = self._prepare(prepared_specs)
      File "/opt/mambaforge/lib/python3.9/site-packages/conda/core/solve.py", line 1058, in _prepare
        reduced_index = get_reduced_index(self.prefix, self.channels,
      File "/opt/mambaforge/lib/python3.9/site-packages/conda/core/index.py", line 291, in get_reduced_index
        push_record(record)
      File "/opt/mambaforge/lib/python3.9/site-packages/conda/core/index.py", line 265, in push_record
        combined_depends = record.combined_depends
      File "/opt/mambaforge/lib/python3.9/site-packages/conda/models/records.py", line 340, in combined_depends
        result = {ms.name: ms for ms in MatchSpec.merge(self.depends)}
      File "/opt/mambaforge/lib/python3.9/site-packages/conda/models/match_spec.py", line 478, in merge
        reduce(lambda x, y: x._merge(y, union), group) if len(group) > 1 else group[0]
      File "/opt/mambaforge/lib/python3.9/site-packages/conda/models/match_spec.py", line 478, in <lambda>
        reduce(lambda x, y: x._merge(y, union), group) if len(group) > 1 else group[0]
      File "/opt/mambaforge/lib/python3.9/site-packages/conda/models/match_spec.py", line 509, in _merge
        final = this_component.merge(that_component)
      File "/opt/mambaforge/lib/python3.9/site-packages/conda/models/match_spec.py", line 760, in merge
        raise ValueError("Incompatible component merge:\n  - %r\n  - %r"
    ValueError: Incompatible component merge:
      - '*real*'
      - 'real_*'

`$ /opt/mambaforge/bin/conda create -p /tmp/toto --channel conda-forge python=3.9 petsc4py`

  environment variables:
                 CIO_TEST=<not set>
                CONDA_EXE=/opt/mambaforge/bin/conda
         CONDA_PYTHON_EXE=/opt/mambaforge/bin/python
               CONDA_ROOT=/opt/mambaforge
              CONDA_SHLVL=0
           CURL_CA_BUNDLE=<not set>
             MOZ_GMP_PATH=/usr/lib64/mozilla/plugins/gmp-gmpopenh264/system-installed
                     PATH=/opt/mambaforge/bin:/opt/mambaforge/condabin:/home/antoine.dechaume/.l
                          ocal/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/antoi
                          ne.dechaume/bin:/home/antoine.dechaume/.antigen/bundles/robbyrussell/o
                          h-my-zsh/lib:/home/antoine.dechaume/.antigen/bundles/robbyrussell/oh-
                          my-zsh/plugins/git:/home/antoine.dechaume/.antigen/bundles/robbyrussel
                          l/oh-my-zsh/plugins/colored-man-
                          pages:/home/antoine.dechaume/.antigen/bundles/robbyrussell/oh-my-zsh/p
                          lugins/pip:/home/antoine.dechaume/.antigen/bundles/robbyrussell/oh-my-
                          zsh/plugins/python:/home/antoine.dechaume/.antigen/bundles/robbyrussel
                          l/oh-my-zsh/plugins/dirpersist:/home/antoine.dechaume/.antigen/bundles
                          /robbyrussell/oh-my-zsh/plugins/common-
                          aliases:/home/antoine.dechaume/.antigen/bundles/zsh-users/zsh-syntax-
                          highlighting:/home/antoine.dechaume/.antigen/bundles/zsh-users/zsh-
                          history-substring-search:/home/antoine.dechaume/.antigen/bundles/zsh-
                          users/zsh-completions:/home/antoine.dechaume/.antigen/bundles/zsh-
                          users/zsh-
                          autosuggestions:/home/antoine.dechaume/.antigen/bundles/esc/conda-zsh-
                          completion:/home/antoine.dechaume/.fzf/bin
            PYTHONSTARTUP=/home/antoine.dechaume/dotfiles/.pythonrc
       REQUESTS_CA_BUNDLE=<not set>
            SSL_CERT_FILE=<not set>

     active environment : None
            shell level : 0
       user config file : /home/antoine.dechaume/.condarc
 populated config files : /opt/mambaforge/.condarc
                          /home/antoine.dechaume/.condarc
          conda version : 4.12.0
    conda-build version : not installed
         python version : 3.9.13.final.0
       virtual packages : __linux=5.18.9=0
                          __glibc=2.34=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /opt/mambaforge  (writable)
      conda av data dir : /opt/mambaforge/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /opt/mambaforge/pkgs
                          /home/antoine.dechaume/.conda/pkgs
       envs directories : /opt/mambaforge/envs
                          /home/antoine.dechaume/.conda/envs
               platform : linux-64
             user-agent : conda/4.12.0 requests/2.27.1 CPython/3.9.13 Linux/5.18.9-100.fc35.x86_64 fedora/35 glibc/2.34
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False

An unexpected error has occurred. Conda has prepared the above report.

If submitted, this report will be used by core maintainers to improve
future releases of conda.
Would you like conda to send this report to the core maintainers?

Installed packages

NA

Environment info

cf error report above.
minrk commented 2 years ago

This is a conda bug, also reported in https://github.com/conda-forge/petsc-feedstock/issues/147.

I've submitted fixes to repodata: https://github.com/conda-forge/conda-forge-repodata-patches-feedstock/pull/295 and conda itself: https://github.com/conda/conda/pull/11612

I'm just waiting for either or both of those to be reviewed/merged (the first should patches out the metadata conda chokes on, while the second fixes the bug in conda to handle the metadata correctly).

In the meantime, you can use mamba to avoid the conda bug:

conda install -c conda-forge mamba
mamba install -c conda-forge petsc4py

UPDATE: The repodata patch has been merged, so once that propagates (within an hour, I think), this should be resolved.

minrk commented 2 years ago

Confirmed the fix. If you're still seeing it, you might need to clear repodata caches, or just wait a little bit.