summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/package.bbclass23
1 files changed, 9 insertions, 14 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index edeffa978f..109cf27254 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1411,9 +1411,6 @@ fi
1411 pkgdest = d.getVar('PKGDEST') 1411 pkgdest = d.getVar('PKGDEST')
1412 pkgdatadir = d.getVar('PKGDESTWORK') 1412 pkgdatadir = d.getVar('PKGDESTWORK')
1413 1413
1414 # Take shared lock since we're only reading, not writing
1415 lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"), True)
1416
1417 data_file = pkgdatadir + d.expand("/${PN}" ) 1414 data_file = pkgdatadir + d.expand("/${PN}" )
1418 f = open(data_file, 'w') 1415 f = open(data_file, 'w')
1419 f.write("PACKAGES: %s\n" % packages) 1416 f.write("PACKAGES: %s\n" % packages)
@@ -1518,7 +1515,6 @@ fi
1518 if bb.data.inherits_class('allarch', d) and not bb.data.inherits_class('packagegroup', d): 1515 if bb.data.inherits_class('allarch', d) and not bb.data.inherits_class('packagegroup', d):
1519 write_extra_runtime_pkgs(global_variants, packages, pkgdatadir) 1516 write_extra_runtime_pkgs(global_variants, packages, pkgdatadir)
1520 1517
1521 bb.utils.unlockfile(lf)
1522} 1518}
1523emit_pkgdata[dirs] = "${PKGDESTWORK}/runtime ${PKGDESTWORK}/runtime-reverse ${PKGDESTWORK}/runtime-rprovides" 1519emit_pkgdata[dirs] = "${PKGDESTWORK}/runtime ${PKGDESTWORK}/runtime-reverse ${PKGDESTWORK}/runtime-rprovides"
1524 1520
@@ -1617,9 +1613,6 @@ python package_do_shlibs() {
1617 1613
1618 shlibswork_dir = d.getVar('SHLIBSWORKDIR') 1614 shlibswork_dir = d.getVar('SHLIBSWORKDIR')
1619 1615
1620 # Take shared lock since we're only reading, not writing
1621 lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"), True)
1622
1623 def linux_so(file, needed, sonames, renames, pkgver): 1616 def linux_so(file, needed, sonames, renames, pkgver):
1624 needs_ldconfig = False 1617 needs_ldconfig = False
1625 ldir = os.path.dirname(file).replace(pkgdest + "/" + pkg, '') 1618 ldir = os.path.dirname(file).replace(pkgdest + "/" + pkg, '')
@@ -1732,7 +1725,11 @@ python package_do_shlibs() {
1732 use_ldconfig = bb.utils.contains('DISTRO_FEATURES', 'ldconfig', True, False, d) 1725 use_ldconfig = bb.utils.contains('DISTRO_FEATURES', 'ldconfig', True, False, d)
1733 1726
1734 needed = {} 1727 needed = {}
1728
1729 # Take shared lock since we're only reading, not writing
1730 lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"), True)
1735 shlib_provider = oe.package.read_shlib_providers(d) 1731 shlib_provider = oe.package.read_shlib_providers(d)
1732 bb.utils.unlockfile(lf)
1736 1733
1737 for pkg in packages.split(): 1734 for pkg in packages.split():
1738 private_libs = d.getVar('PRIVATE_LIBS_' + pkg) or d.getVar('PRIVATE_LIBS') or "" 1735 private_libs = d.getVar('PRIVATE_LIBS_' + pkg) or d.getVar('PRIVATE_LIBS') or ""
@@ -1788,8 +1785,6 @@ python package_do_shlibs() {
1788 d.setVar('pkg_postinst_%s' % pkg, postinst) 1785 d.setVar('pkg_postinst_%s' % pkg, postinst)
1789 bb.debug(1, 'LIBNAMES: pkg %s sonames %s' % (pkg, sonames)) 1786 bb.debug(1, 'LIBNAMES: pkg %s sonames %s' % (pkg, sonames))
1790 1787
1791 bb.utils.unlockfile(lf)
1792
1793 assumed_libs = d.getVar('ASSUME_SHLIBS') 1788 assumed_libs = d.getVar('ASSUME_SHLIBS')
1794 if assumed_libs: 1789 if assumed_libs:
1795 libdir = d.getVar("libdir") 1790 libdir = d.getVar("libdir")
@@ -1902,9 +1897,6 @@ python package_do_pkgconfig () {
1902 if hdr == 'Requires': 1897 if hdr == 'Requires':
1903 pkgconfig_needed[pkg] += exp.replace(',', ' ').split() 1898 pkgconfig_needed[pkg] += exp.replace(',', ' ').split()
1904 1899
1905 # Take shared lock since we're only reading, not writing
1906 lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"), True)
1907
1908 for pkg in packages.split(): 1900 for pkg in packages.split():
1909 pkgs_file = os.path.join(shlibswork_dir, pkg + ".pclist") 1901 pkgs_file = os.path.join(shlibswork_dir, pkg + ".pclist")
1910 if pkgconfig_provided[pkg] != []: 1902 if pkgconfig_provided[pkg] != []:
@@ -1913,6 +1905,9 @@ python package_do_pkgconfig () {
1913 f.write('%s\n' % p) 1905 f.write('%s\n' % p)
1914 f.close() 1906 f.close()
1915 1907
1908 # Take shared lock since we're only reading, not writing
1909 lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"), True)
1910
1916 # Go from least to most specific since the last one found wins 1911 # Go from least to most specific since the last one found wins
1917 for dir in reversed(shlibs_dirs): 1912 for dir in reversed(shlibs_dirs):
1918 if not os.path.exists(dir): 1913 if not os.path.exists(dir):
@@ -1928,6 +1923,8 @@ python package_do_pkgconfig () {
1928 for l in lines: 1923 for l in lines:
1929 pkgconfig_provided[pkg].append(l.rstrip()) 1924 pkgconfig_provided[pkg].append(l.rstrip())
1930 1925
1926 bb.utils.unlockfile(lf)
1927
1931 for pkg in packages.split(): 1928 for pkg in packages.split():
1932 deps = [] 1929 deps = []
1933 for n in pkgconfig_needed[pkg]: 1930 for n in pkgconfig_needed[pkg]:
@@ -1945,8 +1942,6 @@ python package_do_pkgconfig () {
1945 for dep in deps: 1942 for dep in deps:
1946 fd.write(dep + '\n') 1943 fd.write(dep + '\n')
1947 fd.close() 1944 fd.close()
1948
1949 bb.utils.unlockfile(lf)
1950} 1945}
1951 1946
1952def read_libdep_files(d): 1947def read_libdep_files(d):