[oe-commits] [openembedded-core] 17/17: utils.bbclass: Avoid recursive symlink in oe_soinstall

git at git.openembedded.org git at git.openembedded.org
Wed Feb 26 04:54:37 UTC 2020


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit c90780dab6c371c174704a3208312d751e9c8b1b
Author: Yevhenii Shchehlov <eugenyshcheglov at gmail.com>
AuthorDate: Tue Feb 25 16:17:33 2020 +0200

    utils.bbclass: Avoid recursive symlink in oe_soinstall
    
    This patch fixes an issue when oe_soinstall function creates
    non-functional recursive symlinks in case library soname is equal
    to library real (file) name.
    
    Signed-off-by: Yevhenii Shchehlov <eugenyshcheglov at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/utils.bbclass | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass
index cd3d057..dea824f 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -25,7 +25,7 @@ oe_soinstall() {
 	libname=`basename $1`
 	case "$libname" in
 	    *.so)
-	        bbfatal "oe_soinstall: Shared library must haved versioned filename (e.g. libfoo.so.1.2.3)"
+	        bbfatal "oe_soinstall: Shared library must haved versioned filename (e.g. libfoo.so.1.2.3 instead of libfoo.so)"
 	        ;;
 	esac
 	install -m 755 $1 $2/$libname
@@ -33,8 +33,12 @@ oe_soinstall() {
 	if [ -z $sonamelink ]; then
 		bbfatal "oe_soinstall: $libname is missing ELF tag 'SONAME'."
 	fi
+	if [ "$sonamelink" == "$libname" ]; then
+		bbwarn "oe_soinstall: $libname soname is equal to real (file) name. Minor version should be added to a real name (e.g. libfoo.so.1.2 instead of libfoo.so.1)"
+	else
+		ln -sf $libname $2/$sonamelink
+	fi
 	solink=`echo $libname | sed -e 's/\.so\..*/.so/'`
-	ln -sf $libname $2/$sonamelink
 	ln -sf $libname $2/$solink
 }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list