Re: install -d -C (was: Re: cvs commit: src/share/man/man5 make.conf.5 src/share/examples/etc make.conf)
On Tue, Jul 30, 2002 at 06:21:17AM +1000, Bruce Evans wrote: On Mon, 29 Jul 2002, Ruslan Ermilov wrote: On Fri, Jul 19, 2002 at 10:55:56PM +1000, Bruce Evans wrote: On Fri, 19 Jul 2002, Ruslan Ermilov wrote: OTOH, if we go this way we can get rid of ugly ${COPY} completely. I'd like to get rid of it too. But not in RELENG_4. -c has been the default for long enough now in -current. As you know, there are various problems in using the correctly named variable for install(1)'s flags (INSTALLFLAGS) to actually hold install's flags in a general way (mainly, this variable already exists and is used in a non-general way). However, the old hack of putting the flags in the same variable as the command still works well except for the -[Cp] vs -d conflict. This depends on the flags not being order-dependent. OK, -[CpS] are now ignored with -d, and I've dropped support for COPY. I have a question. Why COPY can't be removed from RELENG_4 as well? Ports that use COPY (there are many of them) will see it as an empty string. -c hasn't been the default for so long in RELENG_4, so I think the change has too lrge a risk/reward ratio. Can you envision any breakage caused by me removing COPY?=-c from RELENG_4's bsd.own.mk? We bootstrap install(1), so it's in my opinion safe to assume that on a system without COPY in bsd.own.mk install(1) copies files by default, no? bsd.port.mk and many ports that use ${COPY} will substitute an empty string. If you disagree, what do you propose? Remove any usages of COPY from src/ and leave its definition in bsd.own.mk? What purpose would it serve then? Cheers, -- Ruslan Ermilov Sysadmin and DBA, [EMAIL PROTECTED] Sunbay Software AG, [EMAIL PROTECTED] FreeBSD committer, +380.652.512.251Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age msg41525/pgp0.pgp Description: PGP signature
Re: install -d -C (was: Re: cvs commit: src/share/man/man5 make.conf.5 src/share/examples/etc make.conf)
On Fri, Jul 19, 2002 at 10:55:56PM +1000, Bruce Evans wrote: On Fri, 19 Jul 2002, Ruslan Ermilov wrote: On Fri, Jul 19, 2002 at 03:05:37PM +0300, Ruslan Ermilov wrote: ... 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 ... 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, I think this makes -c vs -d moot. just to support INSTALL=install -C in /etc/make.conf. -C is not really like -c. It really means unbreak the default of !-c, and preserve certain metadata. Preserving the metadata is the main point of this option, but IIRC it was made as much like -c as possible just as a first attempt to kill -c. OpenBSD merged these changes and since then they still have them incompatible. That was probably a mistake. Certainly merging it all back was. -C is our (half my) flag, so we should know its intended use :-). 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_COPYThe 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. I'd like to get rid of it too. But not in RELENG_4. -c has been the default for long enough now in -current. As you know, there are various problems in using the correctly named variable for install(1)'s flags (INSTALLFLAGS) to actually hold install's flags in a general way (mainly, this variable already exists and is used in a non-general way). However, the old hack of putting the flags in the same variable as the command still works well except for the -[Cp] vs -d conflict. This depends on the flags not being order-dependent. OK, -[CpS] are now ignored with -d, and I've dropped support for COPY. I have a question. Why COPY can't be removed from RELENG_4 as well? Ports that use COPY (there are many of them) will see it as an empty string. Cheers, -- Ruslan Ermilov Sysadmin and DBA, [EMAIL PROTECTED] Sunbay Software AG, [EMAIL PROTECTED] FreeBSD committer, +380.652.512.251Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age msg41506/pgp0.pgp Description: PGP signature
install -d -C (was: Re: cvs commit: src/share/man/man5 make.conf.5 src/share/examples/etc make.conf)
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_COPYThe 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] 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. Thanks, -- Ruslan Ermilov Sysadmin and DBA, [EMAIL PROTECTED] Sunbay Software AG, [EMAIL PROTECTED] FreeBSD committer, +380.652.512.251Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age msg41224/pgp0.pgp Description: PGP signature
Re: install -d -C (was: Re: cvs commit: src/share/man/man5 make.conf.5 src/share/examples/etc make.conf)
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_COPYThe 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, [EMAIL PROTECTED] Sunbay Software AG, [EMAIL PROTECTED] FreeBSD committer, +380.652.512.251Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age msg41225/pgp0.pgp Description: PGP signature