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.


In reply to Re^7: Getting all subpaths from a path by haukex
in thread Getting all subpaths from a path by ovedpo15

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.