Re: install -d -C (was: Re: cvs commit: src/share/man/man5 make.conf.5 src/share/examples/etc make.conf)

[ Available lists | Index of freebsd-current | Month of Jul 2002 | Week of 19 Jul 2002 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Ruslan Ermilov <ru@FreeBSD.org>
Date
19 Jul 2002 05:19:02
Subject
Re: install -d -C (was: Re: cvs commit: src/share/man/man5 make.conf.5 src/share/examples/etc make.conf)
Message-ID
20020719121826.GA83942@sunbay.com


[ Hide this part ]
On Fri, Jul 19, 2002 at 03:05:37PM +0300, Ruslan Ermilov wrote:
> On Fri, Jul 19, 2002 at 09:28:09PM +1000, Bruce Evans wrote:
> > On Thu, 18 Jul 2002, Ruslan Ermilov wrote:
> >
> > > ru 2002/07/18 05:54:56 PDT
> > >
> > > Modified files:
> > > share/man/man5 make.conf.5
> > > share/examples/etc make.conf
> > > Log:
> > > To force install(1) to always compare files before installing, one
> > > now needs to set COPY=-C as -C is no longer compatible with the -d
> > > option. It is also likely to be renamed to INSTALL_COPY soon.
> > > Update documentation to reflect this change.
> > >
> > > PR: bin/40724
> >
> > The bug is that -C is no longer compatible with -d. See also misc/40414.
> >
> This PR is already closed.
>
> On Fri, Jul 19, 2002 at 09:21:14PM +1000, Bruce Evans wrote:
> > On Thu, 18 Jul 2002, Ruslan Ermilov wrote:
> >
> > > ru 2002/07/18 05:07:49 PDT
> > >
> > > Modified files:
> > > etc Makefile
> [...]
> > > usr.sbin/ypserv Makefile
> > > Log:
> > > s/${INSTALL} -c/${INSTALL} ${COPY}/
> >
> > Strongly unapproved by: bde.
> >
> > This change is to help work around the foot-shooting of making -d
> > incompatible with -C and -p in install(1)'s flags. It abuses the old
> > poorly named COPY variable which had become a no-op. Now COPY is still
> > poorly named but has different semantics. All this is like breaking
> > cc to reject combinations of flags that don't really go together (e.g.,
> > -I doesn't go with linking) instead of just ignoring the flags that
> > don't apply to the current operation, and then working around this
> > foot-shooting by splitting up CFLAGS and changing many Makefiles to
> > only use the part of CFLAGS that is relevant.
> >
> Since its first revision (install.1,v 1.7 and install.c,v 1.16 they
> were incompatible). Later on, in rev. 1.26, it was made a no-op,
> just to support "INSTALL=install -C" in /etc/make.conf.
>
> OpenBSD merged these changes and since then they still have them
> incompatible.
>
> There are two ways to proceed:
>
> 1. Rename COPY to INSTALL_COPY (that was my plan), optionally giving
> it by default an empty value. This shouldn't harm third-party
> makefiles as -c is now an effective no-op. But this would make
> us even more compatible with OpenBSD that has:
>
> : INSTALL_COPY The old usage of this flag is obsolescent since install(1)
> : now copies by default. However, it can also be used to
> : specify that a file not be copied unless it is different
> : (via the -p option). See install(1) for details. This
> : is to be used when building our own install script so
> : that the entire system can either be installed with copies,
> : or copy-if-different using a single knob. [-c]
>
OTOH, if we go this way we can get rid of ugly ${COPY} completely.

> 2. Make again -C an allowed (ignored) option in the -d case. This would
> make us again incompatible with OpenBSD.
>
> I do not have a technical problem doing either, I'd just like to know
> what do others think about this.

I'm not sure what's the better way, please help me out. :-)


Cheers,
--
Ruslan Ermilov Sysadmin and DBA,
ru@sunbay.com Sunbay Software AG,
ru@FreeBSD.org FreeBSD committer,
+380.652.512.251 Simferopol, Ukraine

http://www.FreeBSD.org The Power To Serve
http://www.oracle.com Enabling The Information Age


[ Show this part (application/pgp-signature) ]

Elapsed time: 0.343 seconds