Hi,

I am encountering problems using Archive::Tar (v0.07) when inserting symlinks. The file that the symlink refers to is added to the tar (with the name of the symlink) instead of maintaining the original symlink.

Example..

lrwxrwxrwx 1 mf139823 staff 30 Feb1909:26 /webroot/service/servicelist +/ss/rasprofile-fr-eng.pdf -> rasprofile-fr-eng-20030219.pdf ...is added to the tarfile by using... $tar->add_files("/webroot/rasprofile-fr-eng.pdf"); ...however when the tar file is extracted it appears as... -rwx--x--x 1 mf139823 staff 5318 Feb1909:26 rasprofile-fr-eng.pdf

I know it is possible to use tar -cvf from the command line to maintain symlinks as I often use this, but I need to be selective about the files I add therfore I want to do it from within PERL

Help! Why is it doing this? How can I make it maintain the symlink? If you can think of an easier way to achive this then please let me know

Please help if you can I'm stuck!

M


In reply to 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.