From 19c7496648cb25500ca7007a7c1578a426c23a09 Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Wed, 11 Aug 2021 10:57:23 -0300 Subject: [PATCH 1/2] perl: perlmod.mk: use 'install' for host binaries When installing a host perl module, the host perl binary in the staging dir is replaced by using 'cp'. However, if the binary is running in a parallel job, cp will fail with a text file busy error. Use $(INSTALL_BIN), which unliks the file first to avoid the error. Signed-off-by: Eneas U de Queiroz --- lang/perl/perlmod.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/perl/perlmod.mk b/lang/perl/perlmod.mk index 8a95099155..2ce3ceab03 100644 --- a/lang/perl/perlmod.mk +++ b/lang/perl/perlmod.mk @@ -35,8 +35,8 @@ PERLMOD_TESTSDIR:=/usr/share/perl/perlmod-tests define perlmod/host/relink rm -f $(1)/Makefile.aperl $(MAKE) -C $(1) perl - $(CP) $(1)/perl $(PERL_CMD) - $(CP) $(1)/perl $(STAGING_DIR_HOSTPKG)/usr/bin/perl + $(INSTALL_BIN) $(1)/perl $(PERL_CMD) + $(INSTALL_BIN) $(1)/perl $(STAGING_DIR_HOSTPKG)/usr/bin/perl endef define perlmod/host/Configure From 47f98d7030f1023e7b2ed118c7774c6100fc979b Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Wed, 11 Aug 2021 11:04:50 -0300 Subject: [PATCH 2/2] unixodbc: use 'install' when copying host binaries 'cp' fails with a text file busy error if it tries to overwrite an executable file that is running. 'install' unlinks the file first, so it will not cause the problem. Signed-off-by: Eneas U de Queiroz --- libs/unixodbc/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/unixodbc/Makefile b/libs/unixodbc/Makefile index 603b933790..f2600432f5 100644 --- a/libs/unixodbc/Makefile +++ b/libs/unixodbc/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=unixodbc PKG_VERSION:=2.3.9 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=unixODBC-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.unixodbc.org @@ -152,7 +152,7 @@ endef define Host/Install $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin - $(CP) $(HOST_BUILD_DIR)/exe/odbc_config $(STAGING_DIR_HOST)/bin + $(INSTALL_BIN) $(HOST_BUILD_DIR)/exe/odbc_config $(STAGING_DIR_HOST)/bin endef $(eval $(call BuildPackage,unixodbc))