PATCH 0/1] ncurses: Improved installation
The installation on ncurses calls "make install.libs install.includes" Turns out, install.libs implicitly installs header files as well, so calling install.includes is redundant.
The description in INSTALL explicitly says:
...
'make install.includes' installs the headers.
'make install.libs' installs the libraries (and the headers)
...
Not needing to call install.includes has an additional benefit: It automatically removes a potential race condition between the two targets.
Juro Bystricky (1):
ncurses_6: Improve installation
.../ncurses/files/fix-include-files-race.patch | 32 ---------------------- meta/recipes-core/ncurses/ncurses.inc | 11 ++++++-- meta/recipes-core/ncurses/ncurses_6.0+20160213.bb | 1 - 3 files changed, 8 insertions(+), 36 deletions(-) delete mode 100644 meta/recipes-core/ncurses/files/fix-include-files-race.patch
Signature · 1 line
1.9.1
PATCH 1/1 ncurses_6: Improve installation
As "install.libs" also installs header files, it is redundant to also call "install.includes".
In fact, doing so can lead to a race, as both targets could try to install the header files at the same time if running parallel make. Obviously, with only calling "install.libs", there is no race with "install.includes".
If there is no race, then the patch fix-include-files-race.patch is no longer needed.
--- .../ncurses/files/fix-include-files-race.patch | 32 ---------------------- meta/recipes-core/ncurses/ncurses.inc | 11 ++++++-- meta/recipes-core/ncurses/ncurses_6.0+20160213.bb | 1 - 3 files changed, 8 insertions(+), 36 deletions(-) delete mode 100644 meta/recipes-core/ncurses/files/fix-include-files-race.patch
meta/recipes-core/ncurses/files/fix-include-files-race.patch deleted +0 -32
@@ -1,32 +0,0 @@ -There is a race condition when running - - $ make install.libs install.includes - -As both targets install identical files. The remedy is to either prevent -parallel make of install.libs and install.includes, or ensure only one -target installs the files. -The second approch will only work if we always install both libs and -includes (which we do). - - -Upstream-Status: Inappropriate [configuration] - -Index: git/mk-hdr.awk -=================================================================== ---- a/mk-hdr.awk -+++ b/mk-hdr.awk -@@ -73,11 +73,13 @@ BEGIN { - END { - if ( count > 0 ) - { -+ print" # patched here: Removed install.libs due the race " - print "${INCLUDEDIR} :" - print " mkdir -p $@" - print "" -+ print "install.libs :: ;" -+ print "" - print "install \\" -- print "install.libs \\" - print "install.includes :: ${AUTO_SRC} ${INCLUDEDIR} \\" - - for (i = 0; i < count - 1; ++i) {
meta/recipes-core/ncurses/ncurses.inc +8 -3
@@ -145,9 +145,14 @@ do_test() { # Split original _install_opts to two parts. # One is the options to install contents, the other is the parameters \ # when running command "make install" -_install_opts = "\ - install.libs install.includes install.man \ -" +# Note that install.libs will also implicitly install header files, +# so we do not need to explicitly specify install.includes. +# Doing so could in fact result in a race condition, as both targets +# (install.libs and install.includes) would install the same headers +# at the same time + +_install_opts = " install.libs install.man " + _install_cfgs = "\ DESTDIR='${D}' \ PKG_CONFIG_LIBDIR='${libdir}/pkgconfig' \
meta/recipes-core/ncurses/ncurses_6.0+20160213.bb +0 -1
@@ -2,7 +2,6 @@ require ncurses.inc SRC_URI += "file://tic-hang.patch \ file://config.cache \ - file://fix-include-files-race.patch \ " # commit id corresponds to the revision in package version SRCREV = "a25949ff653ac5ae7a204381a3ebfd800feeaa01"
Signature · 1 line
1.9.1