| Summary: | buildtools-tarball (buildtools-standalone) installer produces error on install | ||
|---|---|---|---|
| Product: | [Runtime] General Runtime | Reporter: | Mark Hatle <mark.hatle> |
| Component: | General Runtime | Assignee: | Chen Qi <Qi.Chen> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Undecided | CC: | Qi.Chen, richard.purdie |
| Version: | 1.7 | ||
| Target Milestone: | 1.7 M2 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Mark Hatle
2014-07-25 16:38:52 UTC
+ ln -sfn /usr/share/ca-certificates/mozilla/Atos_TrustedRoot_2011.crt /home/rpurdie/test/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/Atos_TrustedRoot_2011.pem
++ grep '^#!.*perl' -rl /home/rpurdie/test/sysroots/x86_64-pokysdk-linux
grep: /home/rpurdie/test/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/TWCA_Root_Certification_Authority.pem: No such file or directory
grep: /home/rpurdie/test/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/Starfield_Services_Root_Certificate_Authority_-_G2.pem: No such file or directory
grep: /home/rpurdie/test/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/DST_ACES_CA_X6.pem: No such file or directory
grep: /home/rpurdie/test/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/StartCom_Certification_Authority_2.pem: No such file or directory
grep: /home/rpurdie/test/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/QuoVadis_Root_CA_2.pem: No such file or directory
grep: /home/rpurdie/test/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/Go_Daddy_Root_Certificate_Authority_-_G2.pem: No such file or directory
So this is coming from the perl script handling code. It looks like it may be a change in the behaviour of grep -r.
"man grep" on centos:
-R, -r, --recursive
Read all files under each directory, recursively; this is equivalent to the -d recurse option.
"man grep" on a more recent ubuntu system:
-r, --recursive
Read all files under each directory, recursively, following symbolic links only if they are on the command line. This
is equivalent to the -d recurse option.
So we need to patch the script only to look at real files.
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index 893afbb..06112dc 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -285,7 +285,7 @@ done
# find out all perl scripts in $native_sysroot and modify them replacing the
# host perl with SDK perl.
-for perl_script in $($SUDO_EXEC grep "^#!.*perl" -rl $native_sysroot); do
+for perl_script in $($SUDO_EXEC find $native_sysroot -type f -exec grep "^#!.*perl" -l '{}' \;); do
$SUDO_EXEC sed -i -e "s:^#! */usr/bin/perl.*:#! /usr/bin/env perl:g" -e \
"s: /usr/bin/perl: /usr/bin/env perl:g" $perl_script
done
|