From: Henry Bruce <henry.bruce@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 2/2] utils.bbclass: Added error checking for oe_soinstall
Date: Tue, 6 Sep 2016 15:11:45 -0700 [thread overview]
Message-ID: <1473199905-13645-2-git-send-email-henry.bruce@intel.com> (raw)
In-Reply-To: <1473199905-13645-1-git-send-email-henry.bruce@intel.com>
Fixes [YOCTO #10146]
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
---
meta/classes/utils.bbclass | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass
index d56f51e..aa033d5 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -62,15 +62,16 @@ def is_machine_specific(d):
oe_soinstall() {
# Purpose: Install shared library file and
# create the necessary links
- # Example:
- #
- # oe_
- #
- #bbnote installing shared library $1 to $2
- #
+ # Example: oe_soinstall libfoo.so.1.2.3 ${D}${libdir}
libname=`basename $1`
+ if [[ "$libname" == *.so ]]; then
+ bbfatal "oe_soinstall: Shared library must haved versioned filename (e.g. libfoo.so.1.2.3)"
+ fi
install -m 755 $1 $2/$libname
sonamelink=`${HOST_PREFIX}readelf -d $1 |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'`
+ if [ -z $sonamelink ]; then
+ bbfatal "oe_soinstall: $libname is missing ELF tag 'SONAME'."
+ fi
solink=`echo $libname | sed -e 's/\.so\..*/.so/'`
ln -sf $libname $2/$sonamelink
ln -sf $libname $2/$solink
--
2.7.4
next prev parent reply other threads:[~2016-09-06 22:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-06 22:11 [PATCH 1/2] utils.bbclass: Remove trailing whitespace Henry Bruce
2016-09-06 22:11 ` Henry Bruce [this message]
2016-09-07 16:27 ` [PATCH 2/2] utils.bbclass: Added error checking for oe_soinstall Burton, Ross
2016-09-07 16:44 ` Christopher Larson
2016-09-07 21:09 ` [PATCH 2/2 v2] " Henry Bruce
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1473199905-13645-2-git-send-email-henry.bruce@intel.com \
--to=henry.bruce@intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox