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

Invalid assertion error: "Can't merge/copy source into subdirectory of itself" #1541

Closed
mausch opened this issue Nov 21, 2016 · 2 comments · Fixed by #1546
Closed

Invalid assertion error: "Can't merge/copy source into subdirectory of itself" #1541

mausch opened this issue Nov 21, 2016 · 2 comments · Fixed by #1546
Labels
locked [bot] locked due to inactivity
Milestone

Comments

@mausch
Copy link

mausch commented Nov 21, 2016

The check in https://github.com/conda/conda-build/blob/master/conda_build/utils.py#L194 causes invalid AssertionErrors in some cases.

I have this build where the source is in /xxx which causes the build to fail with

Copying /xxx to /opt/conda/conda-bld/xxx_1479725365157/work

Traceback (most recent call last):
  File "/opt/conda/bin/conda-build", line 6, in <module>
    sys.exit(conda_build.cli.main_build.main())
  File "/opt/conda/lib/python3.4/site-packages/conda_build/cli/main_build.py", line 247, in main
    execute(sys.argv[1:])
  File "/opt/conda/lib/python3.4/site-packages/conda_build/cli/main_build.py", line 239, in execute
    already_built=None, config=config, noverify=args.no_verify)
  File "/opt/conda/lib/python3.4/site-packages/conda_build/api.py", line 77, in build
    need_source_download=need_source_download, config=config)
  File "/opt/conda/lib/python3.4/site-packages/conda_build/build.py", line 1088, in build_tree
    config=recipe_config)
  File "/opt/conda/lib/python3.4/site-packages/conda_build/build.py", line 652, in build
    config=config)
  File "/opt/conda/lib/python3.4/site-packages/conda_build/render.py", line 86, in parse_or_try_download
    source.provide(metadata.path, metadata.get_section('source'), config=config)
  File "/opt/conda/lib/python3.4/site-packages/conda_build/source.py", line 500, in provide
    copy_into(path, config.work_dir, config.timeout)
  File "/opt/conda/lib/python3.4/site-packages/conda_build/utils.py", line 95, in copy_into
    merge_tree(src, dst, symlinks, timeout=timeout, lock=lock)
  File "/opt/conda/lib/python3.4/site-packages/conda_build/utils.py", line 194, in merge_tree
    assert src not in dst, ("Can't merge/copy source into subdirectory of itself.  Please create "
AssertionError: Can't merge/copy source into subdirectory of itself.  Please create separate spaces for these things.

which is obviously invalid.

This check was introduced in b7845f8 .

Workarounds:

  • downgrade to conda-build 2.0.1, or
  • make sure that the source dir is not a substring of that target dir
@msarahan
Copy link
Contributor

Thanks, I will try to refine the match.

@github-actions
Copy link

Hi there, thank you for your contribution!

This issue has been automatically locked because it has not had recent activity after being closed.

Please open a new issue if needed.

Thanks!

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Apr 18, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants