install seems to be doing things needlessly

Dag Wieers <[email protected]> Tue, 18 Mar 2003 10:52:52 +0100 (CET)
Newsgroups gmane.comp.gnu.fileutils.bugs
Organization 3TI Web Hosting Services
Message-ID <[email protected]>
Hi,

I noticed the following 'strange' behaviour and I was wondering if it was 
a bug or just not important to change.

	[root@lisse soapbox-0.1.0]# soapbox -p /var/tmp/soapbox make install
	install -d -m0755 /lib /usr/bin
	soapbox: Attempt to chmod("/lib", 0755).
	soapbox: Attempt to chmod("/lib", 0755).
	soapbox: Attempt to chmod("/usr/bin", 0755).
	soapbox: Attempt to chmod("/usr/bin", 0755).
	install -m0755 libsoapbox.so /lib
	soapbox: Attempt to unlink("/lib/libsoapbox.so").
	soapbox: Attempt to open64("/lib/libsoapbox.so", O_WRONLY|O_CREAT, 100755).
	soapbox: Attempt to chmod("/lib/libsoapbox.so", 0600).
	soapbox: Attempt to chown("/lib/libsoapbox.so", -1, -1).
	soapbox: Attempt to chmod("/lib/libsoapbox.so", 0755).
	install -m0755 soapbox.sh /usr/bin/soapbox
	soapbox: Attempt to unlink("/usr/bin/soapbox").
	soapbox: Attempt to open64("/usr/bin/soapbox", O_WRONLY|O_CREAT, 100644).
	soapbox: Attempt to chmod("/usr/bin/soapbox", 0600).
	soapbox: Attempt to chown("/usr/bin/soapbox", -1, -1).
	soapbox: Attempt to chmod("/usr/bin/soapbox", 0755).

You'll notice double chmod's (probably the default first and then the 
requested one).


Another problem I frequently have is when doing install -d

	[root@lisse soapbox-0.1.0]# soapbox -p /var/tmp/soapbox install -d -m0755 /var/tmp/soapbox-1.2.3
	soapbox: Attempt to mkdir("/var", 0755).
	soapbox: Attempt to mkdir("/var/tmp", 0755).

Is this the expected behaviour of install ? creating directories 
that already exist before even testing ?


The reason why I bother, is because in my case these incidents are 
'reported' and since they are unnecesarry I'd rather have an extra stat 
and no systemcalls, than unneeded systemcalls that trigger something.

Thank you for taking the time and for your feedback.
--   dag wieers,  [email protected],  http://dag.wieers.com/   --
«Any errors in spelling, tact or fact are transmission errors»