diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-09-13 13:35:31 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-09-14 08:21:00 +0100 |
commit | 8ebe7be3d9494c3467b5533091bf6832030aad99 (patch) | |
tree | f7b483590c2dd75cfeed99dd8479068cdbafbadb /meta/classes/package.bbclass | |
parent | af5b3f3510d3faa0e570be4b4997e9abcad5a805 (diff) | |
download | poky-8ebe7be3d9494c3467b5533091bf6832030aad99.tar.gz |
bitbake.conf/package: Collapse PKGDATA_DIR into a single machine specific directory
Currently we have a hierarchy of pkgdata directories and the code has to put together
a search path and look through each in turn until it finds the data it needs.
This has lead to a number of hardcoded paths and file globing which
is unpredictable and undesirable. Worse, certain tricks that should be
easy like a GL specific package architecture become problematic with the
curretn search paths.
With the modern sstate code, we can do better and construct a single pkgdata
directory for each machine in just the same way as we do for the sysroot. This
is already tried and well tested. With such a single directory, all the code that
iterated through multiple pkgdata directories and simply be removed and give
a significant simplification of the code. Even existing build directories adapt
to the change well since the package contents doesn't change, just the location
they're installed to and the stamp for them.
The only complication is the we need a different shlibs directory for each
multilib. These are only used by package.bbclass and the simple fix is to
add MLPREFIX to the shlib directory name. This means the multilib packages will
repackage and the sstate checksum will change but an existing build directory
will adapt to the changes safely.
It is close to release however I believe the benefits this patch give us
are worth consideration for inclusion and give us more options for dealing
with problems like the GL one. It also sets the ground work well for
shlibs improvements in 1.6.
(From OE-Core rev: 1b8e4abd2d9c0901d38d89d0f944fe1ffd019379)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r-- | meta/classes/package.bbclass | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 599df246f0..fbb68391b9 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -1304,17 +1304,8 @@ python package_do_filedeps() { | |||
1304 | d.setVar("FILERPROVIDESFLIST_" + pkg, " ".join(provides_files[pkg])) | 1304 | d.setVar("FILERPROVIDESFLIST_" + pkg, " ".join(provides_files[pkg])) |
1305 | } | 1305 | } |
1306 | 1306 | ||
1307 | def getshlibsdirs(d): | 1307 | SHLIBSDIRS = "${PKGDATA_DIR}/${MLPREFIX}shlibs" |
1308 | dirs = [] | 1308 | SHLIBSWORKDIR = "${PKGDESTWORK}/${MLPREFIX}shlibs" |
1309 | triplets = (d.getVar("PKGTRIPLETS") or "").split() | ||
1310 | for t in triplets: | ||
1311 | dirs.append("${TMPDIR}/pkgdata/" + t + "/shlibs/") | ||
1312 | return " ".join(dirs) | ||
1313 | getshlibsdirs[vardepsexclude] = "PKGTRIPLETS" | ||
1314 | |||
1315 | SHLIBSDIRS = "${@getshlibsdirs(d)}" | ||
1316 | SHLIBSDIR = "${TMPDIR}/pkgdata/${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}/shlibs" | ||
1317 | SHLIBSWORKDIR = "${PKGDESTWORK}/shlibs" | ||
1318 | 1309 | ||
1319 | python package_do_shlibs() { | 1310 | python package_do_shlibs() { |
1320 | import re, pipes | 1311 | import re, pipes |
@@ -1953,6 +1944,7 @@ do_packagedata[sstate-name] = "packagedata" | |||
1953 | do_packagedata[sstate-inputdirs] = "${PKGDESTWORK}" | 1944 | do_packagedata[sstate-inputdirs] = "${PKGDESTWORK}" |
1954 | do_packagedata[sstate-outputdirs] = "${PKGDATA_DIR}" | 1945 | do_packagedata[sstate-outputdirs] = "${PKGDATA_DIR}" |
1955 | do_packagedata[sstate-lockfile-shared] = "${PACKAGELOCK}" | 1946 | do_packagedata[sstate-lockfile-shared] = "${PACKAGELOCK}" |
1947 | do_packagedata[stamp-extra-info] = "${MACHINE}" | ||
1956 | 1948 | ||
1957 | python do_packagedata_setscene () { | 1949 | python do_packagedata_setscene () { |
1958 | sstate_setscene(d) | 1950 | sstate_setscene(d) |