diff options
-rw-r--r-- | meta/classes/package.bbclass | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 7dcec5ebf4..9b511a6bc9 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -1356,6 +1356,7 @@ python package_do_shlibs() { | |||
1356 | list_re = re.compile('^(.*)\.list$') | 1356 | list_re = re.compile('^(.*)\.list$') |
1357 | # Go from least to most specific since the last one found wins | 1357 | # Go from least to most specific since the last one found wins |
1358 | for dir in reversed(shlibs_dirs): | 1358 | for dir in reversed(shlibs_dirs): |
1359 | bb.debug(2, "Reading shlib providers in %s" % (dir)) | ||
1359 | if not os.path.exists(dir): | 1360 | if not os.path.exists(dir): |
1360 | continue | 1361 | continue |
1361 | for file in os.listdir(dir): | 1362 | for file in os.listdir(dir): |
@@ -1471,6 +1472,8 @@ python package_do_shlibs() { | |||
1471 | 1472 | ||
1472 | needed = {} | 1473 | needed = {} |
1473 | shlib_provider = {} | 1474 | shlib_provider = {} |
1475 | read_shlib_providers() | ||
1476 | |||
1474 | for pkg in packages.split(): | 1477 | for pkg in packages.split(): |
1475 | private_libs = d.getVar('PRIVATE_LIBS_' + pkg, True) or d.getVar('PRIVATE_LIBS', True) | 1478 | private_libs = d.getVar('PRIVATE_LIBS_' + pkg, True) or d.getVar('PRIVATE_LIBS', True) |
1476 | needs_ldconfig = False | 1479 | needs_ldconfig = False |
@@ -1504,6 +1507,11 @@ python package_do_shlibs() { | |||
1504 | if len(sonames): | 1507 | if len(sonames): |
1505 | fd = open(shlibs_file, 'w') | 1508 | fd = open(shlibs_file, 'w') |
1506 | for s in sonames: | 1509 | for s in sonames: |
1510 | if s in shlib_provider: | ||
1511 | (old_pkg, old_pkgver) = shlib_provider[s] | ||
1512 | if old_pkg != pkg: | ||
1513 | bb.warn('%s-%s was registered as shlib provider for %s, changing it to %s-%s because it was built later' % (old_pkg, old_pkgver, s, pkg, pkgver)) | ||
1514 | bb.debug(1, 'registering %s-%s as shlib provider for %s' % (pkg, pkgver, s)) | ||
1507 | fd.write(s + '\n') | 1515 | fd.write(s + '\n') |
1508 | shlib_provider[s] = (pkg, pkgver) | 1516 | shlib_provider[s] = (pkg, pkgver) |
1509 | fd.close() | 1517 | fd.close() |
@@ -1517,8 +1525,7 @@ python package_do_shlibs() { | |||
1517 | postinst = '#!/bin/sh\n' | 1525 | postinst = '#!/bin/sh\n' |
1518 | postinst += d.getVar('ldconfig_postinst_fragment', True) | 1526 | postinst += d.getVar('ldconfig_postinst_fragment', True) |
1519 | d.setVar('pkg_postinst_%s' % pkg, postinst) | 1527 | d.setVar('pkg_postinst_%s' % pkg, postinst) |
1520 | 1528 | bb.debug(1, 'LIBNAMES: pkg %s sonames %s' % (pkg, sonames)) | |
1521 | read_shlib_providers() | ||
1522 | 1529 | ||
1523 | bb.utils.unlockfile(lf) | 1530 | bb.utils.unlockfile(lf) |
1524 | 1531 | ||