While playing around with this, I found an issue when trying to collect and package dependencies for clang-11. The problem seems to be that the actual file, libclang-cpp.so.11, is being overwritten with a symlink of the same name.
Thanks for pointing this out, and feel free to open a PR, I would be happy! I mistakenly assumed the symlinks would always take the form libname.so.x -> libname.so.x.y.z.
Very cool project!! 😄
Issue
While playing around with this, I found an issue when trying to collect and package dependencies for
clang-11
. The problem seems to be that the actual file,libclang-cpp.so.11
, is being overwritten with a symlink of the same name.I've added a simple check that should prevent this in my branch (https://github.com/haampie/libtree/compare/master...ekilmer:fix-symlink-clobber), which I can submit for a PR if you'd like.
Reproduce
I also made a Dockerfile for reproducing this, where you can switch repos to check that my patch fixes the problem.
Dockerfile:
Run:
Output of
tree
on the deploy directory usingmaster
and showing the broken symlink forlibclang-cpp.so.11
:Output of
tree
for my branchfix-symlink-clobber
by changing to these lines in Dockerfileshowing the fix and real file for
libclang-cpp.so.11
: