Re: epel 6 fedpkg build or koji scratch builds failing — I'm stumped

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Richard W.M. Jones wrote:
> On Thu, Nov 24, 2011 at 03:01:03PM +0000, Paul Howarth wrote:
>> http://marc.info/?l=pptpclient-devel&m=132102054518031
>
> This is indeed rather unexpected behaviour of make!

Actually it should not be unexpected.
Whenever you update a target non-atomically that can happen.

The moment the first non-atomic write affects the target,
any parallel make job that is then inspecting that file's "mtime"
(date of last modification) will think that it is "up to date"
and consider it ready to be used.  That is why the recommended
approach is to write only to a temporary (as you did below)
and only update atomically via mv's rename.

> BTW I think your patch is incomplete, since it will create an
> incomplete config.h if the disk runs out of space.  I think this would
> be better, and should also avoid the parallel make problem:
>
> config.h:
> 	echo "/* text added by Makefile target config.h */" > $@-t
> 	echo "#define PPTP_LINUX_VERSION \"$(VERSION)$(RELEASE)\"" >> $@-t
> 	echo "#define PPPD_BINARY \"$(PPPD)\"" >> $@-t
> 	echo "#define IP_BINARY \"$(IP)\"" >> $@-t
> 	mv $@-t $@
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux