Not sure why this was reassigned from dget to dscverify, but, the problem is
caused by the following part in /usr/bin/dget:

    if ($url =~ m!^(file|copy)://(/.+)!) {
        if ($1 eq "copy" or not link($2, $file)) {
            system "cp -a $2 $file";
            return $? >> 8;
        }
        return;
    }

Hardlinking a symlink of course doesn't update its destination.

There are four bugs there:
1. (/.+) should be (.+) -- there's no reason relative urls shouldn't work
2. fallback cp should use -L
3. $2 in the link() calls should be `readlink -f "$2"` (modulo possible
   quotes inside the string and the general uselessness of `` on an
   user-provided string)
4. the system() call will break on spaces or quotes in the passed URL.
   should be system "/bin/cp", "-a", $2, $file

-- 
1KB             // Microsoft corollary to Hanlon's razor:
                //      Never attribute to stupidity what can be
                //      adequately explained by malice.




-- 
To unsubscribe, send mail to [email protected].

Reply via email to