]> code.ossystems Code Review - openembedded-core.git/commitdiff
base.bbclass: Add sanity check for multiple file matches to oe_libinstall from OE.dev
authorRichard Purdie <richard@openedhand.com>
Mon, 12 May 2008 14:10:06 +0000 (14:10 +0000)
committerRichard Purdie <richard@openedhand.com>
Mon, 12 May 2008 14:10:06 +0000 (14:10 +0000)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4460 311d38ba-8fff-0310-9ca6-ca027cbcb966

meta/classes/base.bbclass

index 6b0e50bd6a0d7cb46cd9906058d590b3c591bc90..34f9c181c497fcdf8ab22e63bb70dbeeb04cd915 100644 (file)
@@ -297,7 +297,16 @@ oe_libinstall() {
        if [ -z "$dir" ]; then
                dir=`pwd`
        fi
+
        dotlai=$libname.lai
+
+       # Sanity check that the libname.lai is unique
+       number_of_files=`(cd $dir; find . -name "$dotlai") | wc -l`
+       if [ $number_of_files -gt 1 ]; then
+               oefatal "oe_libinstall: $dotlai is not unique in $dir"
+       fi
+
+
        dir=$dir`(cd $dir;find . -name "$dotlai") | sed "s/^\.//;s/\/$dotlai\$//;q"`
        olddir=`pwd`
        __runcmd cd $dir