perl: perlmod.mk: use 'install' for host binaries
authorEneas U de Queiroz <cotequeiroz@gmail.com>
Wed, 11 Aug 2021 13:57:23 +0000 (10:57 -0300)
committerRosen Penev <rosenp@gmail.com>
Sat, 14 Aug 2021 20:45:07 +0000 (13:45 -0700)
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 <cotequeiroz@gmail.com>
(cherry picked from commit 19c7496648cb25500ca7007a7c1578a426c23a09)

lang/perl/perlmod.mk

index 8a95099155cf63566d613f617a9bc6e3096edea0..2ce3ceab0371fefa187960280aee6b2380021fea 100644 (file)
@@ -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