diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/package.bbclass | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 768047caf3..7dcec5ebf4 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -1352,6 +1352,28 @@ python package_do_shlibs() { | |||
1352 | # Take shared lock since we're only reading, not writing | 1352 | # Take shared lock since we're only reading, not writing |
1353 | lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}")) | 1353 | lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}")) |
1354 | 1354 | ||
1355 | def read_shlib_providers(): | ||
1356 | list_re = re.compile('^(.*)\.list$') | ||
1357 | # Go from least to most specific since the last one found wins | ||
1358 | for dir in reversed(shlibs_dirs): | ||
1359 | if not os.path.exists(dir): | ||
1360 | continue | ||
1361 | for file in os.listdir(dir): | ||
1362 | m = list_re.match(file) | ||
1363 | if m: | ||
1364 | dep_pkg = m.group(1) | ||
1365 | fd = open(os.path.join(dir, file)) | ||
1366 | lines = fd.readlines() | ||
1367 | fd.close() | ||
1368 | ver_file = os.path.join(dir, dep_pkg + '.ver') | ||
1369 | lib_ver = None | ||
1370 | if os.path.exists(ver_file): | ||
1371 | fd = open(ver_file) | ||
1372 | lib_ver = fd.readline().rstrip() | ||
1373 | fd.close() | ||
1374 | for l in lines: | ||
1375 | shlib_provider[l.rstrip()] = (dep_pkg, lib_ver) | ||
1376 | |||
1355 | def linux_so(file): | 1377 | def linux_so(file): |
1356 | needs_ldconfig = False | 1378 | needs_ldconfig = False |
1357 | cmd = d.getVar('OBJDUMP', True) + " -p " + pipes.quote(file) + " 2>/dev/null" | 1379 | cmd = d.getVar('OBJDUMP', True) + " -p " + pipes.quote(file) + " 2>/dev/null" |
@@ -1496,26 +1518,7 @@ python package_do_shlibs() { | |||
1496 | postinst += d.getVar('ldconfig_postinst_fragment', True) | 1518 | postinst += d.getVar('ldconfig_postinst_fragment', True) |
1497 | d.setVar('pkg_postinst_%s' % pkg, postinst) | 1519 | d.setVar('pkg_postinst_%s' % pkg, postinst) |
1498 | 1520 | ||
1499 | list_re = re.compile('^(.*)\.list$') | 1521 | read_shlib_providers() |
1500 | # Go from least to most specific since the last one found wins | ||
1501 | for dir in reversed(shlibs_dirs): | ||
1502 | if not os.path.exists(dir): | ||
1503 | continue | ||
1504 | for file in os.listdir(dir): | ||
1505 | m = list_re.match(file) | ||
1506 | if m: | ||
1507 | dep_pkg = m.group(1) | ||
1508 | fd = open(os.path.join(dir, file)) | ||
1509 | lines = fd.readlines() | ||
1510 | fd.close() | ||
1511 | ver_file = os.path.join(dir, dep_pkg + '.ver') | ||
1512 | lib_ver = None | ||
1513 | if os.path.exists(ver_file): | ||
1514 | fd = open(ver_file) | ||
1515 | lib_ver = fd.readline().rstrip() | ||
1516 | fd.close() | ||
1517 | for l in lines: | ||
1518 | shlib_provider[l.rstrip()] = (dep_pkg, lib_ver) | ||
1519 | 1522 | ||
1520 | bb.utils.unlockfile(lf) | 1523 | bb.utils.unlockfile(lf) |
1521 | 1524 | ||