diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-10-18 23:08:53 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-10-22 09:47:47 +0100 |
commit | a68c7c792ed85cfb85bcfac32dd629384f169245 (patch) | |
tree | e93d84ab961a81fb33f07c59eaed32107d1707d8 /meta | |
parent | 9da9e5d8aeced9880e84d421492ebc451cf7fa1b (diff) | |
download | poky-a68c7c792ed85cfb85bcfac32dd629384f169245.tar.gz |
package.bbclass: Switch shlibs to pkgdata directory and make package non-machine specific
Currently, do_package is machine specific since the shlibs data is installed
into each machine specific sysroot. This change moves the shlibs data to the
pkgdata structure, at the expense of having to iterate over a set of shlibs
directories instead of a single one.
It turns out this isn't any particular hardship for the code and as a result,
do_package stops being machine specific leading to optimisations for builds
that use a common PACKAGE_ARCH.
(From OE-Core rev: cc088489d70fb27d460c3dbe35d6ea382123c134)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/cross-canadian.bbclass | 3 | ||||
-rw-r--r-- | meta/classes/native.bbclass | 1 | ||||
-rw-r--r-- | meta/classes/package.bbclass | 25 |
3 files changed, 18 insertions, 11 deletions
diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass index 47fb0abb21..7dc20c65b1 100644 --- a/meta/classes/cross-canadian.bbclass +++ b/meta/classes/cross-canadian.bbclass | |||
@@ -90,7 +90,8 @@ export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${layout_libdir}/pkgconfig" | |||
90 | export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}" | 90 | export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}" |
91 | 91 | ||
92 | # Cross-canadian packages need to pull in nativesdk dynamic libs | 92 | # Cross-canadian packages need to pull in nativesdk dynamic libs |
93 | SHLIBSDIR = "${STAGING_DIR}/${SDK_ARCH}-nativesdk${SDK_VENDOR}-${BUILD_OS}/shlibs" | 93 | SHLIBSDIRS = "${TMPDIR}/pkgdata/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}/shlibs/ ${TMPDIR}/pkgdata/all-${HOST_VENDOR}-${HOST_OS}/shlibs/" |
94 | SHLIBSDIR = "${TMPDIR}/pkgdata/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}/shlibs/" | ||
94 | 95 | ||
95 | do_populate_sysroot[stamp-extra-info] = "" | 96 | do_populate_sysroot[stamp-extra-info] = "" |
96 | do_package[stamp-extra-info] = "" | 97 | do_package[stamp-extra-info] = "" |
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass index eb30b5a3c7..93f96f5dad 100644 --- a/meta/classes/native.bbclass +++ b/meta/classes/native.bbclass | |||
@@ -88,7 +88,6 @@ do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_NATIVE}" | |||
88 | # Since we actually install these into situ there is no staging prefix | 88 | # Since we actually install these into situ there is no staging prefix |
89 | STAGING_DIR_HOST = "" | 89 | STAGING_DIR_HOST = "" |
90 | STAGING_DIR_TARGET = "" | 90 | STAGING_DIR_TARGET = "" |
91 | SHLIBSDIR = "${STAGING_DIR_NATIVE}/shlibs" | ||
92 | PKG_CONFIG_DIR = "${libdir}/pkgconfig" | 91 | PKG_CONFIG_DIR = "${libdir}/pkgconfig" |
93 | 92 | ||
94 | EXTRA_NATIVE_PKGCONFIG_PATH ?= "" | 93 | EXTRA_NATIVE_PKGCONFIG_PATH ?= "" |
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 03002772f6..76979bd3df 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -1292,8 +1292,16 @@ python package_do_filedeps() { | |||
1292 | d.setVar("FILERPROVIDESFLIST_" + pkg, " ".join(provides_files)) | 1292 | d.setVar("FILERPROVIDESFLIST_" + pkg, " ".join(provides_files)) |
1293 | } | 1293 | } |
1294 | 1294 | ||
1295 | SHLIBSDIR = "${STAGING_DIR_HOST}/shlibs" | 1295 | def getshlibsdirs(d): |
1296 | SHLIBSWORKDIR = "${WORKDIR}/shlibs" | 1296 | dirs = [] |
1297 | triplets = (d.getVar("PKGTRIPLETS") or "").split() | ||
1298 | for t in triplets: | ||
1299 | dirs.append("${TMPDIR}/pkgdata/" + t + "/shlibs/") | ||
1300 | return " ".join(dirs) | ||
1301 | |||
1302 | SHLIBSDIRS = "${@getshlibsdirs(d)}" | ||
1303 | SHLIBSDIR = "${TMPDIR}/pkgdata/${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}/shlibs" | ||
1304 | SHLIBSWORKDIR = "${PKGDESTWORK}/shlibs" | ||
1297 | 1305 | ||
1298 | python package_do_shlibs() { | 1306 | python package_do_shlibs() { |
1299 | import re, pipes | 1307 | import re, pipes |
@@ -1318,7 +1326,7 @@ python package_do_shlibs() { | |||
1318 | 1326 | ||
1319 | pkgdest = d.getVar('PKGDEST', True) | 1327 | pkgdest = d.getVar('PKGDEST', True) |
1320 | 1328 | ||
1321 | shlibs_dir = d.getVar('SHLIBSDIR', True) | 1329 | shlibs_dirs = d.getVar('SHLIBSDIRS', True).split() |
1322 | shlibswork_dir = d.getVar('SHLIBSWORKDIR', True) | 1330 | shlibswork_dir = d.getVar('SHLIBSWORKDIR', True) |
1323 | 1331 | ||
1324 | # Take shared lock since we're only reading, not writing | 1332 | # Take shared lock since we're only reading, not writing |
@@ -1472,7 +1480,7 @@ python package_do_shlibs() { | |||
1472 | d.setVar('pkg_postinst_%s' % pkg, postinst) | 1480 | d.setVar('pkg_postinst_%s' % pkg, postinst) |
1473 | 1481 | ||
1474 | list_re = re.compile('^(.*)\.list$') | 1482 | list_re = re.compile('^(.*)\.list$') |
1475 | for dir in [shlibs_dir]: | 1483 | for dir in shlibs_dirs: |
1476 | if not os.path.exists(dir): | 1484 | if not os.path.exists(dir): |
1477 | continue | 1485 | continue |
1478 | for file in os.listdir(dir): | 1486 | for file in os.listdir(dir): |
@@ -1543,7 +1551,7 @@ python package_do_pkgconfig () { | |||
1543 | workdir = d.getVar('WORKDIR', True) | 1551 | workdir = d.getVar('WORKDIR', True) |
1544 | pkgdest = d.getVar('PKGDEST', True) | 1552 | pkgdest = d.getVar('PKGDEST', True) |
1545 | 1553 | ||
1546 | shlibs_dir = d.getVar('SHLIBSDIR', True) | 1554 | shlibs_dirs = d.getVar('SHLIBSDIRS', True).split() |
1547 | shlibswork_dir = d.getVar('SHLIBSWORKDIR', True) | 1555 | shlibswork_dir = d.getVar('SHLIBSWORKDIR', True) |
1548 | 1556 | ||
1549 | pc_re = re.compile('(.*)\.pc$') | 1557 | pc_re = re.compile('(.*)\.pc$') |
@@ -1594,7 +1602,7 @@ python package_do_pkgconfig () { | |||
1594 | f.write('%s\n' % p) | 1602 | f.write('%s\n' % p) |
1595 | f.close() | 1603 | f.close() |
1596 | 1604 | ||
1597 | for dir in [shlibs_dir]: | 1605 | for dir in shlibs_dirs: |
1598 | if not os.path.exists(dir): | 1606 | if not os.path.exists(dir): |
1599 | continue | 1607 | continue |
1600 | for file in os.listdir(dir): | 1608 | for file in os.listdir(dir): |
@@ -1853,10 +1861,9 @@ SSTATETASKS += "do_package" | |||
1853 | do_package[sstate-name] = "package" | 1861 | do_package[sstate-name] = "package" |
1854 | do_package[cleandirs] = "${PKGDESTWORK}" | 1862 | do_package[cleandirs] = "${PKGDESTWORK}" |
1855 | do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST}" | 1863 | do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST}" |
1856 | do_package[sstate-inputdirs] = "${PKGDESTWORK} ${SHLIBSWORKDIR}" | 1864 | do_package[sstate-inputdirs] = "${PKGDESTWORK}" |
1857 | do_package[sstate-outputdirs] = "${PKGDATA_DIR} ${SHLIBSDIR}" | 1865 | do_package[sstate-outputdirs] = "${PKGDATA_DIR}" |
1858 | do_package[sstate-lockfile-shared] = "${PACKAGELOCK}" | 1866 | do_package[sstate-lockfile-shared] = "${PACKAGELOCK}" |
1859 | do_package[stamp-extra-info] = "${MACHINE}" | ||
1860 | do_package_setscene[dirs] = "${STAGING_DIR}" | 1867 | do_package_setscene[dirs] = "${STAGING_DIR}" |
1861 | 1868 | ||
1862 | python do_package_setscene () { | 1869 | python do_package_setscene () { |