Okay ... so where is the real file the symlink points to (what directory)? And do you get any errors at all? Looking at the code I see attempts to symlink if the file being extracted has a file mode setting indicating it's a symbolic link. There's a warning if that fails. Can you easily check the file mode settings and see if the file that ends up in the archive has the symlink bit set?

Looking at the code, I can see they do (on UNIX) a -l check when the file is added; set a SYMLINK file type and save the file its linked to if that's set; then try to call symlink if they see the SYMLINK entry type during extraction using the saved values. The reason I think you'll have problems with relative path names is that I don't see any path information being stored with the link name ... not sure if that matters if it's relative since you'd want it relative on the way out? I'd need to see what directory they think they're in though ...

If you have access to the source and can modify it I'd probably just copy it and put some debug in there. It may make it very clear with a smaller amount of effort than debugging around the module.


In reply to Re: Re: Re: symlinks in Archive::Tar? by steves
in thread symlinks in Archive::Tar? by heezy

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.