Subject: bug#17103: regression: cp -al doesn't copy symlinks, but tries to link to them (fail)

From: Linda Walsh <[email-masked]>
Date: Wed, 26 Mar 2014 21:31:04 -0700

Pádraig Brady wrote:
> On 03/27/2014 02:57 AM, Pádraig Brady wrote:
> 
>> I've attached a patch for illustration.
>>
>> However I don't like it because it doesn't deal with,
>> 1. fifos, device files, setuid regular files, nor,
>> 2. relative symlinks that traverse outside the copied hierarchy.
> 
> Actually point 2 isn't specific to this issue at all,
> so forget about that disadvantage.
---
And it isn't really a problem.

Many times you'll see a link outside the hierarchy to a
directory or such -- even a file -- rather than including
it in dir -- because hardlinks are often not practical.
(cross devs...etc).  As for relative links outside the tree
they'd still work too if you are making a copy parallel in
the same tree.  I have these little gems in my
linux source/build tree:
lrwxrwxrwx  1     15 Jun 26  2010 clean_tree -> kbin/clean_tree*
lrwxrwxrwx  1     15 Jun 26  2010 doit -> kbin/install_it*
lrwxrwxrwx  1     15 Jun 26  2010 install_it -> kbin/install_it*
lrwxrwxrwx  1     11 Feb 28  2013 kbin -> ../law/kbin/
lrwxrwxrwx  1      8 Mar 26 20:52 linux -> ish-3137/
lrwxrwxrwx  1     16 Jun 26  2010 list_source -> kbin/list_source*
---
But also for # of kernels,
> ls -1d asa-* ish-* linux-*|wc -l
64

At over 300 to now over 500MB/tree that would be alot of wasted space if
they were not linked, but linked, even diff versions are relatively small:

because of tree linking:

     With            W/o
567M  ish-3101   567M  ish-3101
12M   ish-3102   567M  ish-3102
25M   ish-3105   567M  ish-3105
27M   ish-3106   567M  ish-3106
27M   ish-3107   567M  ish-3107
475M  ish-311    581M  ish-311
18M   ish-3113   581M  ish-3113
25M   ish-3116   579M  ish-3116
----  -----      ----  --------
1.1G  TOTAL      4.5G  TOTAL

the only reason I can keep so many copies is most of it is duplicate
info...