public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] meta-isar: Allow to include isar-image-base from external layers
@ 2017-07-06  5:08 Jan Kiszka
  2017-07-06  5:26 ` Jan Kiszka
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2017-07-06  5:08 UTC (permalink / raw)
  To: isar-users

From: Jan Kiszka <jan.kiszka@siemens.com>

THISDIR is expanded immediately which makes the including file define
the path rather than the file that contains this variable. Use
FILE_DIRNAME instead which has the required late evaluation property.

This allows to "require recipes-core/images/isar-image-base.bb" from
out-of-tree layers in order to derive an image from the base version.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 meta-isar/recipes-core/images/isar-image-base.bb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta-isar/recipes-core/images/isar-image-base.bb b/meta-isar/recipes-core/images/isar-image-base.bb
index 66d3cb9..f36fdc4 100644
--- a/meta-isar/recipes-core/images/isar-image-base.bb
+++ b/meta-isar/recipes-core/images/isar-image-base.bb
@@ -27,10 +27,10 @@ do_rootfs() {
     install -d -m 755 ${WORKDIR}/hooks_multistrap
 
     # Copy config file
-    install -m 644 ${THISDIR}/files/multistrap.conf.in ${WORKDIR}/multistrap.conf
-    install -m 755 ${THISDIR}/files/${DISTRO_CONFIG_SCRIPT} ${WORKDIR}/configscript.sh
-    install -m 755 ${THISDIR}/files/setup.sh ${WORKDIR}
-    install -m 755 ${THISDIR}/files/download_dev-random ${WORKDIR}/hooks_multistrap/
+    install -m 644 ${FILE_DIRNAME}/files/multistrap.conf.in ${WORKDIR}/multistrap.conf
+    install -m 755 ${FILE_DIRNAME}/files/${DISTRO_CONFIG_SCRIPT} ${WORKDIR}/configscript.sh
+    install -m 755 ${FILE_DIRNAME}/files/setup.sh ${WORKDIR}
+    install -m 755 ${FILE_DIRNAME}/files/download_dev-random ${WORKDIR}/hooks_multistrap/
 
     # Adjust multistrap config
     sed -i 's|##IMAGE_PREINSTALL##|${IMAGE_PREINSTALL}|' ${WORKDIR}/multistrap.conf
-- 
2.12.3

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] meta-isar: Allow to include isar-image-base from external layers
  2017-07-06  5:08 [PATCH] meta-isar: Allow to include isar-image-base from external layers Jan Kiszka
@ 2017-07-06  5:26 ` Jan Kiszka
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kiszka @ 2017-07-06  5:26 UTC (permalink / raw)
  To: isar-users

On 2017-07-06 07:08, [ext] Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> THISDIR is expanded immediately which makes the including file define
> the path rather than the file that contains this variable. Use
> FILE_DIRNAME instead which has the required late evaluation property.
> 
> This allows to "require recipes-core/images/isar-image-base.bb" from
> out-of-tree layers in order to derive an image from the base version.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  meta-isar/recipes-core/images/isar-image-base.bb | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/meta-isar/recipes-core/images/isar-image-base.bb b/meta-isar/recipes-core/images/isar-image-base.bb
> index 66d3cb9..f36fdc4 100644
> --- a/meta-isar/recipes-core/images/isar-image-base.bb
> +++ b/meta-isar/recipes-core/images/isar-image-base.bb
> @@ -27,10 +27,10 @@ do_rootfs() {
>      install -d -m 755 ${WORKDIR}/hooks_multistrap
>  
>      # Copy config file
> -    install -m 644 ${THISDIR}/files/multistrap.conf.in ${WORKDIR}/multistrap.conf
> -    install -m 755 ${THISDIR}/files/${DISTRO_CONFIG_SCRIPT} ${WORKDIR}/configscript.sh
> -    install -m 755 ${THISDIR}/files/setup.sh ${WORKDIR}
> -    install -m 755 ${THISDIR}/files/download_dev-random ${WORKDIR}/hooks_multistrap/
> +    install -m 644 ${FILE_DIRNAME}/files/multistrap.conf.in ${WORKDIR}/multistrap.conf
> +    install -m 755 ${FILE_DIRNAME}/files/${DISTRO_CONFIG_SCRIPT} ${WORKDIR}/configscript.sh
> +    install -m 755 ${FILE_DIRNAME}/files/setup.sh ${WORKDIR}
> +    install -m 755 ${FILE_DIRNAME}/files/download_dev-random ${WORKDIR}/hooks_multistrap/
>  
>      # Adjust multistrap config
>      sed -i 's|##IMAGE_PREINSTALL##|${IMAGE_PREINSTALL}|' ${WORKDIR}/multistrap.conf
> 

Forget this, I was testing the wrong version. We need to define COREBASE
and derive the path from that.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-06  5:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-06  5:08 [PATCH] meta-isar: Allow to include isar-image-base from external layers Jan Kiszka
2017-07-06  5:26 ` Jan Kiszka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox