bzip2-1.0.0 - Makefile correction ?

Georg Wilckens durandal at nfinity.de
Fri Jun 9 13:54:15 PDT 2000


On Fri, Jun 09, 2000 at 03:38:38PM -0400, Gerard Beekmans wrote:

> > cp -f bzip2 $(PREFIX)/bin/bzip2
> > cp -f bzip2 $(PREFIX)/bin/bunzip2
> > cp -f bzip2 $(PREFIX)/bin/bzcat
> > cp -f bzip2recover $(PREFIX)/bin/bzip2recover
> > 
> > Question:
> > Isn´t that a waste of space?
> > Any arguments against ln -s bunzip2 and bzcat -> bzip2?
> 
> Depends. If bunzip2 and the others are just hard links (in stead of
> symbolic links aka 'ln -s') than it's not a waste of space since they

Errmm... did you read the above closely?

cp -f bzip2 /usr/bin/bzip2
cp -f bzip2 /usr/bin/bunzip2

Regardless of what bzip2 is, cp will always create new (and identical)
files. So yes, it is a waste of space. And unless the binaries are
self-modifying, soft- or hardlinks should both do fine.

> are all the same files. If they are not links but separate binaries than
> I don't think you can just create symlinks. You can try but it all

If they are identical, it doesn't matter.

> depends on how the binaries work. Some programs look at how it was
> called (as what filename) and work accordingly. Others don't.

But checking the filename is the only way for the program to know what
it is.

nfinity:~ # cat testfile
#/bin/bash
echo $0
nfinity:~ # ./testfile
./testfile
nfinity:~ # ln -s testfile testfile2
nfinity:~ # ./testfile
./testfile
nfinity:~ # ./testfile2
./testfile2

Regards,
	Georg
-- 
Georg Wilckens <durandal at nfinity.de>

Computers are useless. They can only give you answers.
--
Mail archive: http://www.pcrdallas.com/mail-archives/lfs-discuss
IRC access: server: irc.linuxfromscratch.org port: 6667 channel: #LFS
News Reader access: news.pcrdallas.com
Unsubscribe: email lfs-discuss-request at linuxfromscratch.org and put
"unsubscribe" (without the quotation marks) in the body of the message
(no subject is required)



More information about the lfs-dev mailing list