public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] Fix wrong inline python in isar-image.bbclass
@ 2019-01-10 12:33 Andreas J. Reichel
  2019-01-10 13:31 ` Henning Schild
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas J. Reichel @ 2019-01-10 12:33 UTC (permalink / raw)
  To: isar-users; +Cc: Andreas Reichel

From: Andreas Reichel <andreas.reichel.ext@siemens.com>

The inline python string used a mixture of python
and shell, which failed while parsing recipes with:

The URL: '${@' is invalid and cannot be interpreted

Problem is that in

SRC_URI += "${@ 'file://${DISTRO_CONFIG_SCRIPT}' if '${DISTRO_CONFIG_SCRIPT}' else '' }"

${DISTRO_CONFIG_SCRIPT} is not interpreted correctly.
Use d.getVar instead.

Signed-off-by: Andreas Reichel <andreas.reichel.ext@siemens.com>
---
 meta/classes/isar-image.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/isar-image.bbclass b/meta/classes/isar-image.bbclass
index 754e896..b6f8848 100644
--- a/meta/classes/isar-image.bbclass
+++ b/meta/classes/isar-image.bbclass
@@ -7,7 +7,7 @@ inherit image
 inherit isar-bootstrap-helper
 
 FILESPATH =. "${LAYERDIR_isar}/conf/distro:"
-SRC_URI += "${@ 'file://${DISTRO_CONFIG_SCRIPT}' if '${DISTRO_CONFIG_SCRIPT}' else '' }"
+SRC_URI += "${@ d.getVar('DISTRO_CONFIG_SCRIPT', True) or '' }"
 
 DEPENDS += "${IMAGE_INSTALL} ${IMAGE_TRANSIENT_PACKAGES}"
 
-- 
2.20.1


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

end of thread, other threads:[~2019-01-10 13:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-10 12:33 [PATCH] Fix wrong inline python in isar-image.bbclass Andreas J. Reichel
2019-01-10 13:31 ` Henning Schild
2019-01-10 13:45   ` Andreas Reichel

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