In message <[EMAIL PROTECTED]> you wrote:
>
> > > -         @rm -f $(obj)environment.c
> > > -         ln -s $(src)../common/environment.c $(obj)environment.c
> > > +         ln -s -f $(src)../common/environment.c $(obj)environment.c
> >
> > Be careful here. Are you 100% sure that all systems in the field will
> > behave exactly as your's is doing?
> 
> i really dont understand what you mean.  any POSIX compliant system will 
> behave exactly as it's supposed to: if the destination exists already, unlink 
> it just before creating the link.

I finally fund such a situation again.

# cat /proc/version 
Linux version 2.6.22.14-72.fc6 ([EMAIL PROTECTED]) (gcc version 4.1.2 20070626 
(Red Hat 4.1.2-13)) #1 SMP Wed Nov 21 14:10:25 EST 2007
# cat /etc/issue
Fedora Core release 6 (Zod)
Kernel \r on an \m

# id
uid=0(root) gid=0(root) 
groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
# cd /opt
# ls -ld eldk eldk-4.2-2008-03-27 eldk-4.2-2008-04-01
lrwxrwxrwx  1 root root   19 Apr  4 04:01 eldk -> eldk-4.2-2008-03-27
drwxr-xr-x 14 root root 4096 Apr  8 23:37 eldk-4.2-2008-03-27
drwxr-xr-x 14 root root 4096 Apr  3 13:38 eldk-4.2-2008-04-01


Now we try:

# ln -sf eldk-4.2-2008-04-01 eldk
# echo $?
0

And what do you think we got?

# ls -ld eldk eldk-4.2-2008-03-27 eldk-4.2-2008-04-01
lrwxrwxrwx  1 root root   19 Apr  4 04:01 eldk -> eldk-4.2-2008-03-27
drwxr-xr-x 14 root root 4096 Apr 14 21:27 eldk-4.2-2008-03-27
drwxr-xr-x 14 root root 4096 Apr  3 13:38 eldk-4.2-2008-04-01


This is what I mean when I say that "rm -f foo ; ln -s bar foo" is
*NOT* exactly equivalent to "ln -sf bar foo". The former will always
work, the latter won't.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
"Wagner's music is better than it sounds."               - Mark Twain

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to