Patchwork native.bbclass: Properly define directories

login
register
mail settings
Submitter Matthieu CRAPET
Date June 12, 2014, 3:49 p.m.
Message ID <1402588172-13738-1-git-send-email-Matthieu.Crapet@ingenico.com>
Download mbox | patch
Permalink /patch/73673/
State Accepted
Commit a08ef9a3a3c3541a4dac6de6c395ba9e193fa41b
Headers show

Comments

Matthieu CRAPET - June 12, 2014, 3:49 p.m.
For most users this commit will have no effect. But if you come across the idea of giving
different names for paths, you'll get some troubles.

When a recipe inherit native, properly define bindir, sbindir, includedir, sysconfdir, datadir
(using xxxdir_native definitions from meta/conf/bitbake.conf).

For example, edit "${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}/quilt-native/temp/log.do_configure"
and see what are the arguments given by oe_runconf.

Notice that ${docdir}, ${mandir}, ${infodir}, ${localstatedir} have no associated _native definition.

Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
---
 meta/classes/native.bbclass | 7 ++++++-
 meta/conf/bitbake.conf      | 3 ++-
 2 files changed, 8 insertions(+), 2 deletions(-)

Patch

diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index 31f1c41..9dec318 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -77,7 +77,12 @@  base_prefix = "${STAGING_DIR_NATIVE}"
 prefix = "${STAGING_DIR_NATIVE}${prefix_native}"
 exec_prefix = "${STAGING_DIR_NATIVE}${prefix_native}"
 
-libdir = "${STAGING_DIR_NATIVE}${libdir_native}"
+bindir = "${STAGING_BINDIR_NATIVE}"
+sbindir = "${STAGING_SBINDIR_NATIVE}"
+libdir = "${STAGING_LIBDIR_NATIVE}"
+includedir = "${STAGING_INCDIR_NATIVE}"
+sysconfdir = "${STAGING_ETCDIR_NATIVE}"
+datadir = "${STAGING_DATADIR_NATIVE}"
 
 baselib = "lib"
 
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 1d70d3c..50f5028 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -24,11 +24,11 @@  export base_libdir = "${base_prefix}/${baselib}"
 export nonarch_base_libdir = "${base_prefix}/lib"
 
 # Architecture independent paths
-export datadir = "${prefix}/share"
 export sysconfdir = "${base_prefix}/etc"
 export servicedir = "${base_prefix}/srv"
 export sharedstatedir = "${base_prefix}/com"
 export localstatedir = "${base_prefix}/var"
+export datadir = "${prefix}/share"
 export infodir = "${datadir}/info"
 export mandir = "${datadir}/man"
 export docdir = "${datadir}/doc"
@@ -358,6 +358,7 @@  STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${TARGET_ARCH}
 STAGING_LIBDIR_NATIVE = "${STAGING_DIR_NATIVE}${libdir_native}"
 STAGING_LIBEXECDIR_NATIVE = "${STAGING_DIR_NATIVE}${libexecdir_native}"
 STAGING_BASE_LIBDIR_NATIVE = "${STAGING_DIR_NATIVE}${base_libdir_native}"
+STAGING_SBINDIR_NATIVE = "${STAGING_DIR_NATIVE}${sbindir_native}"
 STAGING_INCDIR_NATIVE = "${STAGING_DIR_NATIVE}${includedir_native}"
 STAGING_ETCDIR_NATIVE = "${STAGING_DIR_NATIVE}${sysconfdir_native}"
 STAGING_DATADIR_NATIVE = "${STAGING_DIR_NATIVE}${datadir_native}"