From: Jan Kiszka <jan.kiszka@siemens.com>
To: Harald Seiler <hws@denx.de>,
"Maxim Yu. Osipov" <mosipov@ilbers.de>,
isar-users@googlegroups.com
Subject: Re: DISTRO is set too late
Date: Thu, 25 Oct 2018 14:21:32 +0100 [thread overview]
Message-ID: <30bb5a44-53ee-90fd-7740-27111ff01b83@siemens.com> (raw)
In-Reply-To: <d161648ac06a1b26f51314b8e6e7829dbbbfb5d4.camel@denx.de>
On 23.10.18 13:37, Harald Seiler wrote:
> On Tue, 2018-10-23 at 14:34 +0300, Maxim Yu. Osipov wrote:
>> On 10/23/18 1:10 PM, Harald Seiler wrote:
>>> On Tue, 2018-10-23 at 12:48 +0300, Maxim Yu. Osipov wrote:
>>>> Hi Harald,
>>>>
>>>> The list of supported distros is under isar/meta-isar/conf/distro/*.conf
>>>> (debian-wheezy is officially not supported but still present for
>>>> convenience).
>>>
>>> We are using `debian-stretch`. If I add
>>>
>>> DISTRO = "debian-stretch"
>>>
>>> to `local.conf`, I can build. But this should not be necessary as
>>> $DISTRO is also set from multiconf. The issue is that this happens
>>> too late, so when $DISTRO_SUITE is expanded, it hasn't happened yet.
>>>
>>>> How did you get the value `poky` for DISTRO in your environment?
>>>
>>> Hmm, apparently this is kas adding
>>>
>>> DISTRO ??= "poky"
>>>
>>> to `local.conf` if no distro is supplied in its config. This should,
>>> again, not be an issue, because the multiconf sets
>>>
>>> DISTRO ?= "debian-stretch"
>>>
>>> What seems to go wrong is that the multiconf is read too late, so
>>> that base-apt-helper.bb tries to expand $DISTRO before is has gotten
>>> its final value. I don't think this is the intended behavior ...
>>>
>>
>> I don't use kas.
>>
>> I've ran `bitbake -e multiconfig:qemuarm-stretch:isar-image-base` and
>> DISTRO/DISTRO_SUITE are expanded properly:
>>
>> # $DISTRO [2 operations]
>> # set /home/myo/work/isar/src/trunk/isar/build/conf/local.conf:30
>> # [_defaultval] "debian-stretch"
>> # set?
>> /home/myo/work/isar/src/trunk/isar/meta-isar/conf/multiconfig/qemuarm-stretch.conf:6
>> # "debian-stretch"
>> # pre-expansion value:
>> # "debian-stretch"
>> DISTRO="debian-stretch"
>>
>> ...
>>
>> #
>> # $DISTRO_SUITE
>> # set?
>> /home/myo/work/isar/src/trunk/isar/meta/classes/base-apt-helper.bbclass:5
>> # "${@ d.getVar('DISTRO', True).split('-')[1]}"
>> DISTRO_SUITE="stretch"
>>
>>
>>
>> If I set in local.conf
>>
>> DISTRO ??= "debian-jessie"
>>
>> DISTRO/DISTRO_SUITE are also expanded properly:
>>
>> # $DISTRO [2 operations]
>> # set /home/myo/work/isar/src/trunk/isar/build/conf/local.conf:30
>> # [_defaultval] "debian-jessie"
>> # set?
>> /home/myo/work/isar/src/trunk/isar/meta-isar/conf/multiconfig/qemuarm-stretch.conf:6
>> # "debian-stretch"
>> # pre-expansion value:
>> # "debian-stretch"
>> DISTRO="debian-stretch"
>>
>> ...
>>
>> #
>> # $DISTRO_SUITE
>> # set?
>> /home/myo/work/isar/src/trunk/isar/meta/classes/base-apt-helper.bbclass:5
>> # "${@ d.getVar('DISTRO', True).split('-')[1]}"
>> DISTRO_SUITE="stretch"
>
> I did a little more testing. Apparently, it works fine if the weak default value
> contains at least one `-`. The rest of the value can be anything (though I do get
> some warnings if it is not a valid distro).
>
> So this works:
>
> DISTRO ??= "invalid-distro"
>
> But this doesn't:
>
> DISTRO ??= "invalid_distro"
>
>
I didn't dig into all details, and maybe this is actually resolving the issue
better, but I had to fix a similar issue with my kas-driven layer lik this:
https://github.com/siemens/jailhouse-images/commit/e595c6d62ddc6e8a608b199dc767dab9bc12f216
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2018-10-25 13:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-23 9:05 Harald Seiler
2018-10-23 9:48 ` Maxim Yu. Osipov
2018-10-23 10:10 ` Harald Seiler
2018-10-23 11:34 ` Maxim Yu. Osipov
2018-10-23 12:37 ` Harald Seiler
2018-10-25 13:21 ` Jan Kiszka [this message]
2018-10-30 15:56 ` Harald Seiler
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=30bb5a44-53ee-90fd-7740-27111ff01b83@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=hws@denx.de \
--cc=isar-users@googlegroups.com \
--cc=mosipov@ilbers.de \
/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