]> code.ossystems Code Review - openembedded-core.git/commitdiff
package.bbclass: Fix do_shlibs
authorMark Hatle <mhatle@windriver.com>
Sat, 21 Aug 2010 19:21:02 +0000 (12:21 -0700)
committerRichard Purdie <rpurdie@linux.intel.com>
Mon, 23 Aug 2010 14:27:36 +0000 (15:27 +0100)
The current packages shlibs processing is written to a local temporary file.
This file is not consulted when evaluting the provider of the dependency,
instead we need to cache the local values into the dictionary while we write
the temp file.

Signed-off-by: Mark Hatle <mhatle@windriver.com>
meta/classes/package.bbclass

index 921071753d7517341de7f4033416f18f2c545f3c..04ea9e384fb6d1d4d25bd974ea1acefcf291317d 100644 (file)
@@ -557,9 +557,6 @@ if [ x"$D" = "x" ]; then
 fi
 }
 
-SHLIBSDIR = "${STAGING_DIR_HOST}/shlibs"
-SHLIBSWORKDIR = "${WORKDIR}/shlibs"
-
 RPMDEPS = "${STAGING_LIBDIR_NATIVE}/rpm/${BUILD_ARCH}-${BUILD_OS}-rpmdeps"
 
 # Collect perfile run-time dependency metadata
@@ -616,6 +613,9 @@ python package_do_filedeps() {
                process_deps(dep_pipe, pkg, 'RDEPENDS')
 }
 
+SHLIBSDIR = "${STAGING_DIR_HOST}/shlibs"
+SHLIBSWORKDIR = "${WORKDIR}/shlibs"
+
 python package_do_shlibs() {
        import re
 
@@ -723,6 +723,7 @@ python package_do_shlibs() {
                                                                needed[pkg].append(name)
                                                                #bb.note("Adding %s for %s" % (name, pkg))
        needed = {}
+       shlib_provider = {}
        private_libs = bb.data.getVar('PRIVATE_LIBS', d, True)
        for pkg in packages.split():
                needs_ldconfig = False
@@ -747,6 +748,7 @@ python package_do_shlibs() {
                        fd = open(shlibs_file, 'w')
                        for s in sonames:
                                fd.write(s + '\n')
+                               shlib_provider[s] = (pkg, ver)
                        fd.close()
                        fd = open(shver_file, 'w')
                        fd.write(ver + '\n')
@@ -761,7 +763,6 @@ python package_do_shlibs() {
 
        bb.utils.unlockfile(lf)
 
-       shlib_provider = {}
        list_re = re.compile('^(.*)\.list$')
        for dir in [shlibs_dir]: 
                if not os.path.exists(dir):