From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6615476053044363264 X-Received: by 2002:adf:b651:: with SMTP id i17-v6mr2649129wre.10.1540915013296; Tue, 30 Oct 2018 08:56:53 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:a114:: with SMTP id o20-v6ls2048748wro.16.gmail; Tue, 30 Oct 2018 08:56:52 -0700 (PDT) X-Google-Smtp-Source: AJdET5cauSJjb3LUu9eKbiaeLUNfGyYMA7nRc9PQ52ZNtlBygSw0mLUUt54qv71W+cd+rMfNKkU2 X-Received: by 2002:a5d:4349:: with SMTP id u9-v6mr1260178wrr.29.1540915012666; Tue, 30 Oct 2018 08:56:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540915012; cv=none; d=google.com; s=arc-20160816; b=XC1aLl12RcUeQkpXb/q+Bgw1nwT+Ds8T5dJcJ+fE0zYrL2UhXyAlJQIqC4xT5cvvZv AEr9xTvFLMN5NqlOmyZc+NHR8cy5dM3WsyE0rhe1M8FqNoG7wR5Ig9D4gRhVDUn7IF18 qGpZcm16jBY1ZKne4s1uepCLqRvp44LGe/n1JEV/CrZT56vVE/Dmv8dbDSupAY8OW5+E 83eCqWG5CEpMNpeWbIQiG8gQy3Dl/FkICpd8KDULNISfLYP2rZbQNBfitjfwo7tV+S8G 1aQDtt5MCo1T+T9pCIhASgiVH41CrGsddPA+NSf89+G3zoavHEWDG0aAJ4a+XgvCWSa/ g27g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:to:from:subject:message-id; bh=wfDdgxW8odbv1tUWTykkTb4eAWlPlACPr+WErUo5Dro=; b=cInuwZi7I/AtcxTrkuxAhtXcWBgc4EfeArzEu43Zz/QVlNfk2CHV80S1KzYvwUig2G exnCrUTrBFM+kS+zUfwZQttMBr1rjicqZP1/x89W9fK/RFKpqEFK2Po0jFiQUzI+XPCe L2cPDVuUXZ4tXmmGiJp0lKdshjgretku1cMJPTmLU4LTR+/dwSfhv2HBlRcjQj00ZmDw HWqRNRgXfsy5F2xKgyBjlXvuw7F1W9vN0JQkVbcc/QC+ghfkHgGgGeHBgVKJDNaF8tTl 8+eIj2O8v16+Wy7CRMLTK5GgkfVxNZjk5zp4zyUDpsZC8MerCfDWxKYLToOOCvCQE3lC NrnA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of hws@denx.de) smtp.mailfrom=hws@denx.de Return-Path: Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id n6-v6si96553wrj.4.2018.10.30.08.56.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Oct 2018 08:56:52 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of hws@denx.de) client-ip=212.18.0.9; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of hws@denx.de) smtp.mailfrom=hws@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 42kx102rdtz1r01S; Tue, 30 Oct 2018 16:56:52 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 42kx102ZVkz1qrHd; Tue, 30 Oct 2018 16:56:52 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id IIIUuht-_krR; Tue, 30 Oct 2018 16:56:48 +0100 (CET) X-Auth-Info: D+d5nmgUb6uBLTCA6IJ29x+bG7wClWP0vWUStoOgW3A= Received: from sandvich (p5B04C820.dip0.t-ipconnect.de [91.4.200.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 30 Oct 2018 16:56:48 +0100 (CET) Message-ID: Subject: Re: DISTRO is set too late From: Harald Seiler To: Jan Kiszka , "Maxim Yu. Osipov" , isar-users@googlegroups.com Date: Tue, 30 Oct 2018 16:56:47 +0100 In-Reply-To: <30bb5a44-53ee-90fd-7740-27111ff01b83@siemens.com> References: <56972bf2e66e3d979a1ce1c332594fee59e4ba8f.camel@denx.de> <485248d7-c66f-8d84-093c-1b74c90dfe8d@ilbers.de> <21866f1be8507deb16d968b3d209656327d5eb4c.camel@denx.de> <84dbc16b-4273-07f3-846d-88a2aab1848c@ilbers.de> <30bb5a44-53ee-90fd-7740-27111ff01b83@siemens.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUID: D4lZWqJ8Vtsp On Thu, 2018-10-25 at 14:21 +0100, Jan Kiszka wrote: > 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 I am also able to reproduce this behavior with poky/sumo, so this is a bitbake issue and not directly isar related. I am unsure if it makes sense to follow up on this; this bug will only ever be triggered if an invalid default value is provided, which is by itself a "bug" because a default value that is supposed to be overwritten shouldn't be set in the first place ... What do you think? -- Harald DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-62 Fax: +49-8142-66989-80 Email: hws@denx.de