perl: only run finalize hook when necessary
PATCH 1/1 perl: only run finalize hook when necessary
The PERL_FINALIZE_TARGET always runs, even if perl is not installed. This results in errors from the find command when it fails to find anything, even when doing "make -s":
Quoted 1 line
Quoted 1 line
Quoted 1 line
Finalizing target directory
find: `...../output/target/usr/lib/perl5/': No such file or directory
find: `...../output/target/usr/lib/perl5/': No such file or directory
find: `...../output/target/usr/lib/perl5/': No such file or directory
This is not helpful for projects that do not select Perl. Silence this by making the hook conditional on package selection.
--- package/perl/perl.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
package/perl/perl.mk +2 -2
@@ -115,6 +115,7 @@ endef $(eval $(generic-package)) $(eval $(host-generic-package)) +ifeq ($(BR2_PACKAGE_PERL),y) define PERL_FINALIZE_TARGET rm -rf $(TARGET_DIR)/usr/lib/perl5/$(PERL_VERSION)/pod rm -rf $(TARGET_DIR)/usr/lib/perl5/$(PERL_VERSION)/$(PERL_ARCHNAME)/CORE
@@ -122,6 +123,5 @@ define PERL_FINALIZE_TARGET find $(TARGET_DIR)/usr/lib/perl5/ -name '*.bs' -print0 | xargs -0 rm -f find $(TARGET_DIR)/usr/lib/perl5/ -name '.packlist' -print0 | xargs -0 rm -f endef - TARGET_FINALIZE_HOOKS += PERL_FINALIZE_TARGET - +endif
Signature · 1 line
1.7.9.5
Thomas Petazzoni
AppliedPATCH 1/1 perl: only run finalize hook when necessary
Dear Danomi Manchego,
Quoted 9 lines · Danomi Manchego
The
PERL_FINALIZE_TARGETalways runs, even if perl is not installed. This results in errors from the find command when it fails to find anything, even when doing "make -s":Quoted 1 line
Quoted 1 line
Quoted 1 line
Finalizing target directory
find: `...../output/target/usr/lib/perl5/': No such file or directory
find: `...../output/target/usr/lib/perl5/': No such file or directory
find: `...../output/target/usr/lib/perl5/': No such file or directory
Quoted 7 lines
This is not helpful for projects that do not select Perl. Silence this by making the hook conditional on package selection.
Signed-off-by Danomi Manchego <[email protected]>--- package/perl/perl.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com