Skip to content

The generated pkgs/envs.txt does not honour info['channel_remap'] #654

@jaimergp

Description

@jaimergp

The generated pkgs/envs.txt does not honour info['channel_remap'], so the generated installer fails for locally built channels, by reclaiming the path of the package from the environment running constructor.

The problem seems in preconda.py.

Files pkgs/urls.txt and pkgs/urls are written using get_final_url(info, url) (within all_final_urls_md5s --> this honours channel_remap; but pkgs/envs_txt uses info["_urls"] directly.

You have the remap info already in final_urls_md5s, so the solution -hopefully- is as simple as:

Replace

    # base environment file used with conda install --file
    # (list of specs/dists to install)
    write_env_txt(info, dst_dir, info["_urls"])

with

    # base environment file used with conda install --file
    # (list of specs/dists to install)
    write_env_txt(info, dst_dir, final_urls_md5s)

Equal change is required for sub environment:

replace

        write_env_txt(info, env_dst_dir, env_info["_urls"])

with

        write_env_txt(info, env_dst_dir, env_urls_md5)

==> generated installer than works in my cases

Originally posted by @EisW in #559 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    locked[bot] locked due to inactivitytype::bugdescribes erroneous operation, use severity::* to classify the type

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions