stow-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Stow-devel] Allowing Stow (version 2) to stow absolute links


From: Troy Will
Subject: [Stow-devel] Allowing Stow (version 2) to stow absolute links
Date: Thu, 26 Nov 2009 15:51:59 -0800

I am proposing that we remove the check for absolute links done in
Stow version 2. Stow version 1.3 stows and unstows absolute links just
fine, and I've tested that Stow version 2 will also stow and unstow
absolute links if the few lines of code that does the checking for
absolute links is removed:
    # don't try to stow absolute symlinks (they cant be unstowed)
    if (-l $source) {
        my $second_source = read_a_link($source);
        if ($second_source =~ m{\A/} ) {
            conflict("source is an absolute symlink $source => $second_source");
            if ($Option{'verbose'} > 2) {
                warn "absolute symlinks cannot be unstowed";
            }
            return;
        }
    }

Kahlil, were you thinking that because stow only makes relative links
that it would bomb when trying to unstow a package that contains
absolute links? If you put it into words, Stow could create a relative
link to and absolute link. When Stow would unstow a package with an
absolute link, it removes the relative link to the absolute link. As
far as I can see, it doesn't make any difference if the file in the
package is a regular file, relative link, or absolute link. Stow is
only going to make and delete relative links ( and directories.) What
are your thoughts?

 I want to take this code out and restore the Stow v1.3.3
functionality. But I won't do that until I hear from you first.

--Troy




reply via email to

[Prev in Thread] Current Thread [Next in Thread]