summaryrefslogtreecommitdiffstats
path: root/meta/classes/package.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r--meta/classes/package.bbclass32
1 files changed, 27 insertions, 5 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 962abcd8d9..efb03f89bf 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1580,19 +1580,28 @@ python package_do_pkgconfig () {
1580 bb.utils.unlockfile(lf) 1580 bb.utils.unlockfile(lf)
1581} 1581}
1582 1582
1583python read_shlibdeps () { 1583def read_libdep_files(d):
1584 pkglibdeps = {}
1584 packages = d.getVar('PACKAGES', True).split() 1585 packages = d.getVar('PACKAGES', True).split()
1585 for pkg in packages: 1586 for pkg in packages:
1586 rdepends = bb.utils.explode_dep_versions(d.getVar('RDEPENDS_' + pkg, False) or d.getVar('RDEPENDS', False) or "") 1587 pkglibdeps[pkg] = []
1587
1588 for extension in ".shlibdeps", ".pcdeps", ".clilibdeps": 1588 for extension in ".shlibdeps", ".pcdeps", ".clilibdeps":
1589 depsfile = d.expand("${PKGDEST}/" + pkg + extension) 1589 depsfile = d.expand("${PKGDEST}/" + pkg + extension)
1590 if os.access(depsfile, os.R_OK): 1590 if os.access(depsfile, os.R_OK):
1591 fd = file(depsfile) 1591 fd = file(depsfile)
1592 lines = fd.readlines() 1592 lines = fd.readlines()
1593 fd.close() 1593 fd.close()
1594 for l in lines: 1594 pkglibdeps[pkg].extend([l.rstrip() for l in lines])
1595 rdepends[l.rstrip()] = "" 1595 return pkglibdeps
1596
1597python read_shlibdeps () {
1598 pkglibdeps = read_libdep_files(d)
1599
1600 packages = d.getVar('PACKAGES', True).split()
1601 for pkg in packages:
1602 rdepends = bb.utils.explode_dep_versions(d.getVar('RDEPENDS_' + pkg, False) or d.getVar('RDEPENDS', False) or "")
1603 for dep in pkglibdeps[pkg]:
1604 rdepends[dep] = ""
1596 d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False)) 1605 d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False))
1597} 1606}
1598 1607
@@ -1694,6 +1703,15 @@ python package_depchains() {
1694 pkgs[prefix] = {} 1703 pkgs[prefix] = {}
1695 pkgs[prefix][pkg] = (pkg[:-len(prefix)], pre_getname) 1704 pkgs[prefix][pkg] = (pkg[:-len(prefix)], pre_getname)
1696 1705
1706 if "-dbg" in pkgs:
1707 pkglibdeps = read_libdep_files(d)
1708 pkglibdeplist = []
1709 for pkg in pkglibdeps:
1710 for dep in pkglibdeps[pkg]:
1711 add_dep(pkglibdeplist, dep)
1712 # FIXME this should not look at PN once all task recipes inherit from task.bbclass
1713 dbgdefaultdeps = ((d.getVar('DEPCHAIN_DBGDEFAULTDEPS', True) == '1') or (d.getVar('PN', True) or '').startswith('task-'))
1714
1697 for suffix in pkgs: 1715 for suffix in pkgs:
1698 for pkg in pkgs[suffix]: 1716 for pkg in pkgs[suffix]:
1699 if d.getVarFlag('RRECOMMENDS_' + pkg, 'nodeprrecs'): 1717 if d.getVarFlag('RRECOMMENDS_' + pkg, 'nodeprrecs'):
@@ -1701,6 +1719,10 @@ python package_depchains() {
1701 (base, func) = pkgs[suffix][pkg] 1719 (base, func) = pkgs[suffix][pkg]
1702 if suffix == "-dev": 1720 if suffix == "-dev":
1703 pkg_adddeprrecs(pkg, base, suffix, func, depends, d) 1721 pkg_adddeprrecs(pkg, base, suffix, func, depends, d)
1722 elif suffix == "-dbg":
1723 if not dbgdefaultdeps:
1724 pkg_addrrecs(pkg, base, suffix, func, pkglibdeplist, d)
1725 continue
1704 if len(pkgs[suffix]) == 1: 1726 if len(pkgs[suffix]) == 1:
1705 pkg_addrrecs(pkg, base, suffix, func, rdepends, d) 1727 pkg_addrrecs(pkg, base, suffix, func, rdepends, d)
1706 else: 1728 else: