From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6615476053044363264 X-Received: by 2002:a50:c982:: with SMTP id w2-v6mr2107223edh.12.1540298243920; Tue, 23 Oct 2018 05:37:23 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:906:55d1:: with SMTP id z17-v6ls710397ejp.12.gmail; Tue, 23 Oct 2018 05:37:23 -0700 (PDT) X-Google-Smtp-Source: ACcGV60EyPqnH0giLKmYcd0lixGIV7TpHW0Zc+MaVGube7lidojk8M4O9cY61ZDQ5ue8EmiWpqEQ X-Received: by 2002:a17:906:4591:: with SMTP id t17-v6mr1867345ejq.6.1540298243517; Tue, 23 Oct 2018 05:37:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540298243; cv=none; d=google.com; s=arc-20160816; b=U98+Xbct68OBSjGTjdrJrV2nM9aQEZPmob1r9fCeS5EU4n8ADRO3kCAy+bH4J5dpul BYEQT88DUm7ofBwGAxd+yPzG0GX8jUIh0U5UkI6Sdzl83sL6ENsiVOrKLVU5x0t4lkDJ vR2uVHCAl0IS951qABW0JaBiyKTN9Yf0KoeYrtMezU6tQagbIzszLSRRkqk29vJkCFJz zYd85esDDvACH84mzPUE/AwSfLPZiID1UpgzlO0g6rThtcbrC925rTTfzzu7O6jqTPIS 2bC0XMLEFpDSZtHNUuK83EAwD8QObUhKt7Z0wtTLnFXEdTNhQaPOffPwiN7B5nbqXzSf qtOw== 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=DNDaNoHbK53GUhlc8VJIOZDIY2DYYYhF1uxYEwDqRa0=; b=UZeOgxGiChlEinNwQ22LVwKBFMqV6BDB5naeX3bHP3Mau4SrqPieIl6jh8atf1Mt2B 6/qVtBkP8fyd5KnBRfeTPPGnvNqkFDkkJm2XdkqOoGYDpvdDYjOIzJ2mrlGxKuRIR6Kj OQneOyn9QGw9yaNGjjSPHyq1oQ2cmox2i/RTO+/eAKOoQPDVEKXIoq1EwexiQOzfGFKl vbu3YGF0zJpoNuvkVqE7oiexNkaZIz1gGM9SdIXvYXSK4kfOdACx6iTZVAwM0nRZc4K+ cAYOvwHpfyR0pcQyEncgyBWTQmS/Nvax0UsrtzcTHd9YxTiPVKPzNAggCFnGeS73Jzpv /nxQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 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.10]) by gmr-mx.google.com with ESMTPS id o10-v6si59404ejc.0.2018.10.23.05.37.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Oct 2018 05:37:23 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of hws@denx.de) client-ip=212.18.0.10; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 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 42fXw31ShFz1rs1n; Tue, 23 Oct 2018 14:37:23 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 42fXw31FvLz1qr2n; Tue, 23 Oct 2018 14:37:23 +0200 (CEST) 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 vnQ8rqotlwaQ; Tue, 23 Oct 2018 14:37:22 +0200 (CEST) X-Auth-Info: Rtne1kCfDykcvLZ28m/1d20zB3NxpIio1Y6cwrVS+ls= Received: from sandvich (p5B04CE13.dip0.t-ipconnect.de [91.4.206.19]) (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, 23 Oct 2018 14:37:22 +0200 (CEST) Message-ID: Subject: Re: DISTRO is set too late From: Harald Seiler To: "Maxim Yu. Osipov" , isar-users@googlegroups.com Date: Tue, 23 Oct 2018 14:37:21 +0200 In-Reply-To: <84dbc16b-4273-07f3-846d-88a2aab1848c@ilbers.de> References: <56972bf2e66e3d979a1ce1c332594fee59e4ba8f.camel@denx.de> <485248d7-c66f-8d84-093c-1b74c90dfe8d@ilbers.de> <21866f1be8507deb16d968b3d209656327d5eb4c.camel@denx.de> <84dbc16b-4273-07f3-846d-88a2aab1848c@ilbers.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUID: FSTK5DrWi7X9 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" -- 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