svn commit: r246913 - head/etc

Andrey Chernov ache at freebsd.org
Tue Feb 19 13:28:07 UTC 2013


Forget about -C and the patch, this bug shows itself with pure install
without -C too. install does not acts like 'ln -f'. Here is minimal test:

#!/bin/sh
mkdir b
install -l s b a
echo Pass 1
ls -al a b
install -l s b a
echo
echo Pass 2
ls -al a b
# bug

And its output (notice b -> b):

Pass 1
lrwxr-xr-x  1 ache  wheel  1 19 Feb 17:15 a -> b

b:
total 6
drwxr-xr-x   2 ache  wheel   512 19 Feb 17:15 .
drwxr-xr-x  32 ache  wheel  2560 19 Feb 17:15 ..

Pass 2
lrwxr-xr-x  1 ache  wheel  1 19 Feb 17:15 a -> b

b:
total 6
drwxr-xr-x   2 ache  wheel   512 19 Feb 17:15 .
drwxr-xr-x  32 ache  wheel  2560 19 Feb 17:15 ..
lrwxr-xr-x   1 ache  wheel     1 19 Feb 17:15 b -> b


On 19.02.2013 15:29, Andrey Chernov wrote:
> This patch makes install -C, -S and default (-c) to do the same for links, 
> as 'ln -f'. Not well tested yes due to lack of time.
> 
> --- xinstall.c.bak	2013-02-19 15:20:16.000000000 +0400
> +++ xinstall.c	2013-02-19 15:24:30.000000000 +0400
> @@ -754,7 +754,7 @@
>  		target = (lstat(to_name, &to_sb) == 0);
>  
>  	if (dolink) {
> -		if (target && !safecopy) {
> +		if (target) {
>  			if (to_sb.st_mode & S_IFDIR && rmdir(to_name) == -1)
>  				err(EX_OSERR, "%s", to_name);
>  			if (to_sb.st_flags & NOCHANGEBITS) 
> 
> On 19.02.2013 14:49, Andrey Chernov wrote:
>> On 19.02.2013 2:55, Brooks Davis wrote:
>>> On Sun, Feb 17, 2013 at 01:06:59PM +0000, Andrey A. Chernov wrote:
>>>> Author: ache Date: Sun Feb 17 13:06:59 2013 New Revision: 246913
>>>>  URL: http://svnweb.freebsd.org/changeset/base/246913
>>>>
>>>> Log: In 'make hierarchy' don't install /sys/sys pointing to 
>>>> usr/src/sys but just /sys pointing there
>>>
>>> Did you have the latest install sources when you hit this?  It 
>>> should be emulating "ln -sfh" which would do the right thing.
>>>
>>> -- Brooks
>>>
>>
>> Yes, very latest current, just standing in /usr/src and typing 'make
>>  hierarchy' and fail. I suspect the difference which plays role is 
>> make.conf:INSTALL=install -C which is common practice since old
>> days. I.e. it may don't delete old symlink with -C, but use it as
>> directory instead. I can't check this right now, maybe later.
>>
> 
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20130219/53dd55e6/attachment.sig>


More information about the svn-src-all mailing list