Date: Tue, 1 Aug 1995 18:56:04 +0200 From: hohmuth@inf.tu-dresden.de To: FreeBSD-gnats-submit@freebsd.org Subject: bin/645: "install -c -s" can't install shell scripts Message-ID: <199508011656.SAA01632@irs201.inf.tu-dresden.de> Resent-Message-ID: <199508011700.KAA00566@freefall.cdrom.com>
next in thread | raw e-mail | index | archive | help
>Number: 645 >Category: bin >Synopsis: "install -c -s" can't install shell scripts >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Aug 1 10:00:01 PDT 1995 >Last-Modified: >Originator: Michael Hohmuth >Organization: Dept. of Computer Science, TU Dresden, Germany >Release: FreeBSD 2.0.5-RELEASE i386 >Environment: uname -a yields: FreeBSD olymp.inf.tu-dresden.de 2.0.5-RELEASE FreeBSD 2.0.5-RELEASE #0: Wed Jul 5 12:39:10 1995 root@olymp.inf.tu-dresden.de:/usr/src/sys/compile/OLYMP i386 >Description: When invoked with "-s", `install' executes `strip' in order to strip the installed file. However, if the file can't be stripped (for example, if it is a shell script), `strip' will return an exit code != 0 which make `install' delete the destination file. `install' will return exit code 0 nevertheless. (The file installs OK when "-s" is omitted.) I believe that `install' should silently ignore failure codes returned by `strip' and should not delete the destination file. >How-To-Repeat: Here's a typescript: olymp:~> echo baz > foo olymp:~> install -c -s foo bar strip: bar: Inappropriate file type or format olymp:~> cat bar cat: bar: No such file or directory olymp:~> install -c foo bar olymp:~> cat bar baz >Fix: --- usr.bin/xinstall/xinstall.c~ Fri May 27 14:33:39 1994 +++ usr.bin/xinstall/xinstall.c Fri Jul 28 01:40:17 1995 @@ -311,7 +311,7 @@ execl(_PATH_STRIP, "strip", to_name, NULL); err("%s: %s", _PATH_STRIP, strerror(errno)); default: - if (wait(&status) == -1 || status) + if (wait(&status) == -1) (void)unlink(to_name); } } >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199508011656.SAA01632>