diff options
author | Henry Bruce <henry.bruce@intel.com> | 2016-09-07 14:09:54 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-09-09 11:53:36 +0100 |
commit | 4192e4bad5cb2765c2d1ba37c6a6a86ef12c20a8 (patch) | |
tree | c5462304c17a98add24838c364b1d8782dd6a42f /meta/classes | |
parent | e9126926d4322d070105ef70421619fcd783f9b8 (diff) | |
download | poky-4192e4bad5cb2765c2d1ba37c6a6a86ef12c20a8.tar.gz |
utils.bbclass: Added error checking for oe_soinstall
Fixes [YOCTO #10146]
(From OE-Core rev: cd5d532bd2a3f409b9470591c8d6f6b21e5995dd)
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/utils.bbclass | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass index d56f51e320..3c2a14fa42 100644 --- a/meta/classes/utils.bbclass +++ b/meta/classes/utils.bbclass | |||
@@ -62,15 +62,18 @@ def is_machine_specific(d): | |||
62 | oe_soinstall() { | 62 | oe_soinstall() { |
63 | # Purpose: Install shared library file and | 63 | # Purpose: Install shared library file and |
64 | # create the necessary links | 64 | # create the necessary links |
65 | # Example: | 65 | # Example: oe_soinstall libfoo.so.1.2.3 ${D}${libdir} |
66 | # | ||
67 | # oe_ | ||
68 | # | ||
69 | #bbnote installing shared library $1 to $2 | ||
70 | # | ||
71 | libname=`basename $1` | 66 | libname=`basename $1` |
67 | case "$libname" in | ||
68 | *.so) | ||
69 | bbfatal "oe_soinstall: Shared library must haved versioned filename (e.g. libfoo.so.1.2.3)" | ||
70 | ;; | ||
71 | esac | ||
72 | install -m 755 $1 $2/$libname | 72 | install -m 755 $1 $2/$libname |
73 | sonamelink=`${HOST_PREFIX}readelf -d $1 |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'` | 73 | sonamelink=`${HOST_PREFIX}readelf -d $1 |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'` |
74 | if [ -z $sonamelink ]; then | ||
75 | bbfatal "oe_soinstall: $libname is missing ELF tag 'SONAME'." | ||
76 | fi | ||
74 | solink=`echo $libname | sed -e 's/\.so\..*/.so/'` | 77 | solink=`echo $libname | sed -e 's/\.so\..*/.so/'` |
75 | ln -sf $libname $2/$sonamelink | 78 | ln -sf $libname $2/$sonamelink |
76 | ln -sf $libname $2/$solink | 79 | ln -sf $libname $2/$solink |