public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Claudius Heine <claudius.heine.ext@siemens.com>
To: "[ext] Andreas J. Reichel" <andreas.reichel.ext@siemens.com>,
	isar-users@googlegroups.com
Subject: Re: [PATCH v2] Fix wrong inline python in isar-image.bbclass
Date: Thu, 10 Jan 2019 16:31:31 +0100	[thread overview]
Message-ID: <0915ae2d-f72c-34ba-1997-0b50414cb2dc@siemens.com> (raw)
In-Reply-To: <20190110150351.27270-1-andreas.reichel.ext@siemens.com>

Hi,

On 10/01/2019 16.03, [ext] Andreas J. Reichel wrote:
> 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.

For people wanting to reproduce this issue, AFAIK Andreas tried to use a 
custom distro config script. Maybe that only happens there. Would be 
nice to have a test case for that.

Cheers,
Claudius

> 
> Signed-off-by: Andreas Reichel <andreas.reichel.ext@siemens.com>
> ---
>   meta/classes/isar-image.bbclass | 8 +++++++-
>   1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/classes/isar-image.bbclass b/meta/classes/isar-image.bbclass
> index 754e896..e221ba6 100644
> --- a/meta/classes/isar-image.bbclass
> +++ b/meta/classes/isar-image.bbclass
> @@ -6,8 +6,14 @@
>   inherit image
>   inherit isar-bootstrap-helper
>   
> +def cfg_script(d):
> +    cf = d.getVar('DISTRO_CONFIG_SCRIPT', True) or ''
> +    if cf:
> +        return 'file://' + cf
> +    return ''
> +
>   FILESPATH =. "${LAYERDIR_isar}/conf/distro:"
> -SRC_URI += "${@ 'file://${DISTRO_CONFIG_SCRIPT}' if '${DISTRO_CONFIG_SCRIPT}' else '' }"
> +SRC_URI += "${@ cfg_script(d) }"
>   
>   DEPENDS += "${IMAGE_INSTALL} ${IMAGE_TRANSIENT_PACKAGES}"
>   
> 

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de

  reply	other threads:[~2019-01-10 15:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-10 15:03 Andreas J. Reichel
2019-01-10 15:31 ` Claudius Heine [this message]
2019-01-18  7:53 ` Maxim Yu. Osipov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0915ae2d-f72c-34ba-1997-0b50414cb2dc@siemens.com \
    --to=claudius.heine.ext@siemens.com \
    --cc=andreas.reichel.ext@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox