unpacked sources and ln

Richard A Downing FBCS geek109 at hotmail.com
Sat Nov 15 10:05:28 PST 2003


On Sat, 15 Nov 2003 11:54:22 -0600
<liquid.ism at verizon.net> wrote:

> I've looked through the FAQ and I didnt see anything to help me
> there(I think).  I want to know if its ok to delete the
> unpacked sources after issuing the commands to install the
> package.  But sometimes I see command to create symlinks that
> "appear"(Im not completly sure)to link a file thats in the
> source/build directory.  If I delete that, then it would work
> right?  Heres an example... In the first pass of installing GCC
> http://lfs.130th.net/lfs/view/stable/chapter05/gcc-pass1.html
> the last command says
> ln -sf gcc /tools/bin/cc
> I dont know that much about symlinks but it appears the me that
> if I delete the gcc-3.3.1 and the gcc-build directory, then the
> symlink will cease to exist.
> 
> Can someone help me w/ this?
> 
> 
Yes.
You need to read the 'man ln' carefully.  But it is a good
question.

A symlink is just a piece of text that is interpreted by the
system in whatever context it's in at the time.  So if you put a
symlink in /tools/bin/cc containing the text 'gcc' it will
interpret that as /tools/bin/gcc since it will be 'looking' in
/tools/bin when it finds it. The context you are 'in' when you
create the link is not significant.  This is a hard one to grasp,
I agree.

The book is good on this - trust the book.

(Jeroen, I've had to explain this twice this week.  Can we put
something in the FAQ? The other guy was a 20 year Unix vet!)


-- 
Cheers, Richard

Richard A Downing FBCS

Anyone  sending  unwanted  advertising   e-mail
to this address will be charged $25 for network
traffic and computing time.   By  extracting my
address from  this  message or its  header, you
agree to these terms.




More information about the lfs-support mailing list