diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-25 20:16:46 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-26 14:56:20 +0100 |
commit | 5157c85776bb8bd7315ef42e6e622aae27ebc79e (patch) | |
tree | c249765b2d9f43cee998b032bf3f9cb76999af5d /meta | |
parent | f3d5e08e654cc116947560ad981f2521be0d9eb5 (diff) | |
download | poky-5157c85776bb8bd7315ef42e6e622aae27ebc79e.tar.gz |
base/perlnative/pythonnative/gzipnative: Add a new variable to enable easier handling of native path issues
If something is listed in ASSUME_PROVIDED but also manually built (like bzip2-native and
bzip2-replacement-native), we need to ensure that the installed binaries are only accessed
for things which list the provider in DEPENDS.
This patch adds a generic mechanism to handle this instead of everything reinventing the
wheel. EXTRANATIVEPATH += "perl-native" will ensure that ${STAGING_BINDIR_NATIVE}/perl-native
is added to PATH.
This means that:
a) Such providers should install to ${bindir}/xxx-native
b) Should PROVIDE += "xxxx-replacement-native"
c) That users should DEPEND on xxx-replacement-native and have EXTRANATIVEPATH += "xxx-native"
This patch enables this at the core level, the bzip2 recipe still needs adjusting to work
like this along with adjustment of the users of bzip2-replacement-native (python-native?).
(From OE-Core rev: 14b70cd222519e5bccaca955334787f123d9fc54)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/base.bbclass | 9 | ||||
-rw-r--r-- | meta/classes/gzipnative.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/perlnative.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/pythonnative.bbclass | 2 |
4 files changed, 12 insertions, 3 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 1f7602394e..a57bd596d6 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass | |||
@@ -74,6 +74,15 @@ FILESPATH = "${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/$ | |||
74 | # in the context of the location its used (:=) | 74 | # in the context of the location its used (:=) |
75 | THISDIR = "${@os.path.dirname(d.getVar('FILE', True))}" | 75 | THISDIR = "${@os.path.dirname(d.getVar('FILE', True))}" |
76 | 76 | ||
77 | def extra_path_elements(d): | ||
78 | path = "" | ||
79 | elements = (d.getVar('EXTRANATIVEPATH', True) or "").split() | ||
80 | for e in elements: | ||
81 | path = path + "${STAGING_BINDIR_NATIVE}/" + e + ":" | ||
82 | return path | ||
83 | |||
84 | PATH_prepend = "${@extra_path_elements(d)}" | ||
85 | |||
77 | addtask fetch | 86 | addtask fetch |
78 | do_fetch[dirs] = "${DL_DIR}" | 87 | do_fetch[dirs] = "${DL_DIR}" |
79 | do_fetch[file-checksums] = "${@bb.fetch.get_checksum_file_list(d)}" | 88 | do_fetch[file-checksums] = "${@bb.fetch.get_checksum_file_list(d)}" |
diff --git a/meta/classes/gzipnative.bbclass b/meta/classes/gzipnative.bbclass index 4a411434a4..007e32c690 100644 --- a/meta/classes/gzipnative.bbclass +++ b/meta/classes/gzipnative.bbclass | |||
@@ -1,3 +1,3 @@ | |||
1 | PATH_prepend = "${STAGING_BINDIR_NATIVE}/pigz-native:${STAGING_BINDIR_NATIVE}/gzip-native:" | 1 | EXTRANATIVEPATH += "pigz-native gzip-native" |
2 | DEPENDS += "gzip-native" | 2 | DEPENDS += "gzip-native" |
3 | 3 | ||
diff --git a/meta/classes/perlnative.bbclass b/meta/classes/perlnative.bbclass index 2211b72135..cc8de8b381 100644 --- a/meta/classes/perlnative.bbclass +++ b/meta/classes/perlnative.bbclass | |||
@@ -1,3 +1,3 @@ | |||
1 | PATH_prepend = "${STAGING_BINDIR_NATIVE}/perl-native:" | 1 | EXTRANATIVEPATH += "perl-native" |
2 | DEPENDS += "perl-native" | 2 | DEPENDS += "perl-native" |
3 | OECMAKE_PERLNATIVE_DIR = "${STAGING_BINDIR_NATIVE}/perl-native" | 3 | OECMAKE_PERLNATIVE_DIR = "${STAGING_BINDIR_NATIVE}/perl-native" |
diff --git a/meta/classes/pythonnative.bbclass b/meta/classes/pythonnative.bbclass index bc346da58d..7886207d06 100644 --- a/meta/classes/pythonnative.bbclass +++ b/meta/classes/pythonnative.bbclass | |||
@@ -1,3 +1,3 @@ | |||
1 | PYTHON="${STAGING_BINDIR_NATIVE}/python-native/python" | 1 | PYTHON="${STAGING_BINDIR_NATIVE}/python-native/python" |
2 | PATH_prepend = "${STAGING_BINDIR_NATIVE}/python-native:" | 2 | EXTRANATIVEPATH += "python-native" |
3 | DEPENDS += " python-native " | 3 | DEPENDS += " python-native " |