diff options
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r-- | meta/classes/package.bbclass | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 1ef0c66ca0..bc91e9f866 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -1384,7 +1384,7 @@ python package_do_shlibs() { | |||
1384 | 1384 | ||
1385 | def linux_so(file, needed, sonames, renames): | 1385 | def linux_so(file, needed, sonames, renames): |
1386 | needs_ldconfig = False | 1386 | needs_ldconfig = False |
1387 | ldir = os.path.dirname(file).replace(pkgdest, '') | 1387 | ldir = os.path.dirname(file).replace(pkgdest + "/" + pkg, '') |
1388 | cmd = d.getVar('OBJDUMP', True) + " -p " + pipes.quote(file) + " 2>/dev/null" | 1388 | cmd = d.getVar('OBJDUMP', True) + " -p " + pipes.quote(file) + " 2>/dev/null" |
1389 | fd = os.popen(cmd) | 1389 | fd = os.popen(cmd) |
1390 | lines = fd.readlines() | 1390 | lines = fd.readlines() |
@@ -1404,10 +1404,11 @@ python package_do_shlibs() { | |||
1404 | m = re.match("\s+SONAME\s+([^\s]*)", l) | 1404 | m = re.match("\s+SONAME\s+([^\s]*)", l) |
1405 | if m: | 1405 | if m: |
1406 | this_soname = m.group(1) | 1406 | this_soname = m.group(1) |
1407 | if not this_soname in sonames: | 1407 | prov = (this_soname, ldir) |
1408 | if not prov in sonames: | ||
1408 | # if library is private (only used by package) then do not build shlib for it | 1409 | # if library is private (only used by package) then do not build shlib for it |
1409 | if not private_libs or this_soname not in private_libs: | 1410 | if not private_libs or this_soname not in private_libs: |
1410 | sonames.append(this_soname) | 1411 | sonames.append(prov) |
1411 | if libdir_re.match(os.path.dirname(file)): | 1412 | if libdir_re.match(os.path.dirname(file)): |
1412 | needs_ldconfig = True | 1413 | needs_ldconfig = True |
1413 | if snap_symlinks and (os.path.basename(file) != this_soname): | 1414 | if snap_symlinks and (os.path.basename(file) != this_soname): |
@@ -1417,6 +1418,7 @@ python package_do_shlibs() { | |||
1417 | def darwin_so(file, needed, sonames, renames): | 1418 | def darwin_so(file, needed, sonames, renames): |
1418 | if not os.path.exists(file): | 1419 | if not os.path.exists(file): |
1419 | return | 1420 | return |
1421 | ldir = os.path.dirname(file).replace(pkgdest, '') | ||
1420 | 1422 | ||
1421 | def get_combinations(base): | 1423 | def get_combinations(base): |
1422 | # | 1424 | # |
@@ -1438,7 +1440,8 @@ python package_do_shlibs() { | |||
1438 | combos = get_combinations(name) | 1440 | combos = get_combinations(name) |
1439 | for combo in combos: | 1441 | for combo in combos: |
1440 | if not combo in sonames: | 1442 | if not combo in sonames: |
1441 | sonames.append(combo) | 1443 | prov = (combo, ldir) |
1444 | sonames.append(prov) | ||
1442 | if file.endswith('.dylib') or file.endswith('.so'): | 1445 | if file.endswith('.dylib') or file.endswith('.so'): |
1443 | lafile = file.replace(os.path.join(pkgdest, pkg), d.getVar('PKGD', True)) | 1446 | lafile = file.replace(os.path.join(pkgdest, pkg), d.getVar('PKGD', True)) |
1444 | # Drop suffix | 1447 | # Drop suffix |
@@ -1521,13 +1524,13 @@ python package_do_shlibs() { | |||
1521 | if len(sonames): | 1524 | if len(sonames): |
1522 | fd = open(shlibs_file, 'w') | 1525 | fd = open(shlibs_file, 'w') |
1523 | for s in sonames: | 1526 | for s in sonames: |
1524 | if s in shlib_provider: | 1527 | if s[0] in shlib_provider: |
1525 | (old_pkg, old_pkgver) = shlib_provider[s] | 1528 | (old_pkg, old_pkgver) = shlib_provider[s[0]] |
1526 | if old_pkg != pkg: | 1529 | if old_pkg != pkg: |
1527 | 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)) | 1530 | 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[0], pkg, pkgver)) |
1528 | bb.debug(1, 'registering %s-%s as shlib provider for %s' % (pkg, pkgver, s)) | 1531 | bb.debug(1, 'registering %s-%s as shlib provider for %s' % (pkg, pkgver, s[0])) |
1529 | fd.write(s + '\n') | 1532 | fd.write(s[0] + '\n') |
1530 | shlib_provider[s] = (pkg, pkgver) | 1533 | shlib_provider[s[0]] = (pkg, pkgver) |
1531 | fd.close() | 1534 | fd.close() |
1532 | fd = open(shver_file, 'w') | 1535 | fd = open(shver_file, 'w') |
1533 | fd.write(pkgver + '\n') | 1536 | fd.write(pkgver + '\n') |