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

[runtime_deploy] Respect subfolders in order to preserve symlinks #17848

Open
wants to merge 4 commits into
base: develop2
Choose a base branch
from

Conversation

uilianries
Copy link
Member

This PR is the second part of changing the runtime_deploy, addressing the comment #16938 (comment).

When having subfolders in the lib or bin package folder, the same the same will be preserved. This situation avoids broken symlinks, for instance, we consume libfoo.so, but it's a symlink and points to subfolber/libfoo.so.1.0.


Open to discussion:

When doing this fix occurred me the following case:

Users may have problems with LD_LIBRARY_PATH if there are separate libraries in the subfolder. Maybe, we could include a new conf, like tools.deployer.runtime:flatten, when True, we move all artifacts for the top folder, and fix the relative symlinks, for instance:

conan install foo/0.1.0 --deployer=runtime_deploy --deployer-folder=output

# tools.deployer.runtime:flatten=False/None (default)
ls -R output/
libfoo.so -> subfolder/libfoo.so.1
subfolder/libfoo.so.1 -> subfolder/libfoo.so.1.0

# tools.deployer.runtime:flatten=True
ls -l output/
libfoo.so -> libfoo.so.1
libfoo.so.1 -> libfoo.so.1.0

Changelog: Fix: Preserve subfolders for runtime_deploy deployer
Docs: TODO

fixes #16938

Related to #17824

  • Refer to the issue that supports this Pull Request.
  • If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.
  • I've opened another PR in the Conan docs repo to the develop branch, documenting this one.

@memsharded
Copy link
Member

Users may have problems with LD_LIBRARY_PATH if there are separate libraries in the subfolder. Maybe, we could include a new conf, like tools.deployer.runtime:flatten, when True, we move all artifacts for the top folder, and fix the relative symlinks, for instance:

Good point. But typically this shouldn't happen? Like they are almost always in the same "bin" directory?

@uilianries
Copy link
Member Author

Good point. But typically this shouldn't happen? Like they are almost always in the same "bin" directory?

True, it's a corner case TBH. Okay, let's keep it simple. People still can open issues in case facing this situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] Bugs in runtime_deployer
2 participants