]> code.ossystems Code Review - openembedded-core.git/commitdiff
base/perlnative/pythonnative/gzipnative: Add a new variable to enable easier handling...
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 25 Jul 2012 20:16:46 +0000 (20:16 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 26 Jul 2012 13:55:35 +0000 (14:55 +0100)
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?).

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/base.bbclass
meta/classes/gzipnative.bbclass
meta/classes/perlnative.bbclass
meta/classes/pythonnative.bbclass

index 1f7602394e8761177d4aa9e4b3baf51063b9ab75..a57bd596d618566818d7165cef8b06c9f7d80a97 100644 (file)
@@ -74,6 +74,15 @@ FILESPATH = "${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/$
 # in the context of the location its used (:=)
 THISDIR = "${@os.path.dirname(d.getVar('FILE', True))}"
 
+def extra_path_elements(d):
+    path = ""
+    elements = (d.getVar('EXTRANATIVEPATH', True) or "").split()
+    for e in elements:
+        path = path + "${STAGING_BINDIR_NATIVE}/" + e + ":"
+    return path
+
+PATH_prepend = "${@extra_path_elements(d)}"
+
 addtask fetch
 do_fetch[dirs] = "${DL_DIR}"
 do_fetch[file-checksums] = "${@bb.fetch.get_checksum_file_list(d)}"
index 4a411434a4d512af7c90fd1328b61bb11e8f1a9c..007e32c6904f54a1f4e648925e1debea53b878df 100644 (file)
@@ -1,3 +1,3 @@
-PATH_prepend = "${STAGING_BINDIR_NATIVE}/pigz-native:${STAGING_BINDIR_NATIVE}/gzip-native:"
+EXTRANATIVEPATH += "pigz-native gzip-native"
 DEPENDS += "gzip-native"
 
index 2211b72135bfe661fc233ff156bc1e43cf5ca9c5..cc8de8b38159e05387d152c8a74a0a0d6443537a 100644 (file)
@@ -1,3 +1,3 @@
-PATH_prepend = "${STAGING_BINDIR_NATIVE}/perl-native:"
+EXTRANATIVEPATH += "perl-native"
 DEPENDS += "perl-native"
 OECMAKE_PERLNATIVE_DIR = "${STAGING_BINDIR_NATIVE}/perl-native"
index bc346da58d803f7d7b57d66b0018b427a8b8535b..7886207d0687733451c77b1b808b24911cd7f7cf 100644 (file)
@@ -1,3 +1,3 @@
 PYTHON="${STAGING_BINDIR_NATIVE}/python-native/python"
-PATH_prepend = "${STAGING_BINDIR_NATIVE}/python-native:"
+EXTRANATIVEPATH += "python-native"
 DEPENDS += " python-native "