Bug 645 - "install -c -s" can't install shell scripts
Summary: "install -c -s" can't install shell scripts
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 2.0.5-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1995-08-01 18:00 UTC by hohmuth
Modified: 1995-08-04 18:15 UTC (History)
0 users

See Also:


Attachments
file.diff (340 bytes, patch)
1995-08-01 18:00 UTC, hohmuth
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description hohmuth 1995-08-01 18:00:01 UTC
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
Comment 1 Joerg Wunsch freebsd_committer freebsd_triage 1995-08-04 18:14:41 UTC
State Changed
From-To: open->closed

Suggested fix applied in rev 1.2 of xinstall.c.