diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 9885d94..4556315 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1508,7 +1508,8 @@ python package_do_shlibs() {
                     lib_ver = fd.readline().rstrip()
                     fd.close()
                 for l in lines:
-                    shlib_provider[l.rstrip()] = (dep_pkg, lib_ver)
+                    if not l.rstrip() in shlib_provider:
+                        shlib_provider[l.rstrip()] = (dep_pkg, lib_ver)
 
     bb.utils.unlockfile(lf)
 
@@ -1521,7 +1522,8 @@ python package_do_shlibs() {
             if len(dep_pkg) == 2:
                 lib_ver = dep_pkg[1]
             dep_pkg = dep_pkg[0]
-            shlib_provider[l] = (dep_pkg, lib_ver)
+            if not l in shlib_provider:
+                shlib_provider[l] = (dep_pkg, lib_ver)
 
     for pkg in packages.split():
         bb.debug(2, "calculating shlib requirements for %s" % pkg)
