in reply to Re^6: Getting all subpaths from a path
in thread Getting all subpaths from a path

For the second link I get an error: ln: failed to create symbolic link '/usr/vsa/pkgs/python3/3.6.3a': No such file or directory

I can't reproduce this. To create a test directory structure I tried:

mkdir -p /tmp/site/tools/gauv/pkgs/python3/3.6.3/bin/python3.6 ln -fns /tmp/site/tools/gauv /tmp/vsa ln -fns 3.6.3 /tmp/site/tools/gauv/pkgs/python3/3.6.3a

And running my script with /tmp/vsa/pkgs/python3/3.6.3a/bin/python3.6 as the input produces this output:

mkdir -p /tmp/site/tools/gauv/pkgs/python3/3.6.3/bin/python3.6 ln -snf /tmp/site/tools/gauv /tmp/vsa ln -snf 3.6.3 /tmp/vsa/pkgs/python3/3.6.3a ln -snf 3.6.3 /tmp/site/tools/gauv/pkgs/python3/3.6.3a

Which looks like the output you've shown (minus the mkdir command, which you are running first, right?). And if I delete /tmp/site and /tmp/vsa, the above set of commands work fine. I can only guess that perhaps there's a permissions issue (/root often has restrictive permissions set). I also noticed an inconsistency in the example you give in the root node: your example array of subpaths ends on /root/site/tools/gauv/python3/3.6.3/bin/python3.6, which is missing the pkgs from its path. I did not test my code in the presence of broken symlinks.

Something doesn't add up. I've asked several times now for code, input, and output to reproduce the questions you have. Please read and understand all of the following, and provide actual, runnable code that reproduces the issue you're having, along with representative sample input, the expected output for that input, and the complete actual output, including any error messages.