Author martin.panter
Recipients Arfrever, doko, martin.panter, vstinner
Date 2015-11-25.23:58:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1448495903.45.0.998238614851.issue25696@psf.upfronthosting.co.za>
In-reply-to
Content
$(LIBPC) is a single directory name, so I suggest dropping the “for” loop.

Patch 2 should avoid the practical race condition. But there is technically still a race with “libainstall” and “bininstall” both testing and creating the same directory. Maybe we should factor it out, something like:

$(DESTDIR)$(LIBPC):
	@echo "Creating directory $@"
	@$(INSTALL) -d -m $(DIRMODE) $@
. . .
bininstall: altbininstall $(DESTDIR)$(LIBPC)
. . .
libainstall: all python-config $(DESTDIR)$(LIBPC)
	@for i in $(LIBDIR) $(LIBPL); \
	. . .

Looking at the history, the test-then-install code comes from 20 years ago: <https://hg.python.org/cpython/rev/d41d89eb43e5#l1.150>. I would say calling install unconditionally (without a test or echo message) might be simpler, but that’s probably getting out of scope here.
History
Date User Action Args
2015-11-25 23:58:23martin.pantersetrecipients: + martin.panter, doko, vstinner, Arfrever
2015-11-25 23:58:23martin.pantersetmessageid: <1448495903.45.0.998238614851.issue25696@psf.upfronthosting.co.za>
2015-11-25 23:58:23martin.panterlinkissue25696 messages
2015-11-25 23:58:23martin.pantercreate