Date: Tue, 23 Sep 2014 10:19:37 -0400 From: John Baldwin <jhb@freebsd.org> To: Bruce Evans <brde@optusnet.com.au> Cc: src-committers@freebsd.org, Will Andrews <will@freebsd.org>, svn-src-all@freebsd.org, Navdeep Parhar <np@freebsd.org>, svn-src-head@freebsd.org, Julian Elischer <julian@freebsd.org> Subject: Re: svn commit: r271771 - in head: bin/csh etc/mail lib/libc usr.bin/grep usr.sbin/mtree Message-ID: <201409231019.38023.jhb@freebsd.org> In-Reply-To: <20140920172111.Q4941@besplex.bde.org> References: <201409181441.s8IEfvR1075223@svn.freebsd.org> <541D2356.8040403@freebsd.org> <20140920172111.Q4941@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday, September 20, 2014 3:38:03 am Bruce Evans wrote: > On Sat, 20 Sep 2014, Julian Elischer wrote: > > > On 9/18/14, 10:41 PM, Will Andrews wrote: > >> Author: will > >> Date: Thu Sep 18 14:41:57 2014 > >> New Revision: 271771 > >> URL: http://svnweb.freebsd.org/changeset/base/271771 > >> > >> Log: > >> Fix incremental builds involving non-root users with read-only source > >> files. > >> Makefiles should not assume that source files can be overwritten. > >> This is the > >> common case for Perforce source trees. > > > > I'm concerned that just adding -f may not really be fixing the problem.. > > why are the files getting overwritten? I'm not sure forcing an overwrite is > > teh right answer to read-only sources. > > The log message is confused. Source files are not being overwritten. > They are being copied to object directories using cp. Then if they > are read-only in the source directory, they are read-only in the object > directory, even if they are copied without -p so as to clobber their > timestamps (their mode is still preserved). Then if the source file's > mtime is changed, either by actually changing the file or just by > clobbering its mtime, the copy in the object directory becomes out of > date. Then the cp to make it up to date fails because it is read-only. I ran into this the other day with the cxgbe firmware config files during a kernel build due to the same issue. That is due to entries in sys/conf/files like this: t4fw_cfg.fw optional cxgbe \ dependency "$S/dev/cxgbe/firmware/t4fw_cfg.txt" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t4fw_cfg.fw" Not sure if the correct solution there is to force -f for all of these or if ${CP} should be 'cp -f' for kernel builds. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409231019.38023.jhb>