From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6522397978051739648 X-Received: by 10.25.123.3 with SMTP id w3mr164043lfc.41.1518696522711; Thu, 15 Feb 2018 04:08:42 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.25.210.77 with SMTP id j74ls874953lfg.4.gmail; Thu, 15 Feb 2018 04:08:42 -0800 (PST) X-Google-Smtp-Source: AH8x2252IWQ/1VsX/CHjzuj31lGIv2nK6L1stSJbVNizdhEdKC5vXFC1kGR8YxT+OrqV8yFFVgTp X-Received: by 10.25.150.9 with SMTP id y9mr159895lfd.7.1518696522095; Thu, 15 Feb 2018 04:08:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518696521; cv=none; d=google.com; s=arc-20160816; b=er16NSClottYyDR3DWvrTbv8HjsIvwoSepXvaSL6sDXjQMDUDK+dJYhsjZ5l6Y86Ky I8v+Oqc6Sh0FpzGdYCc/FlWY5YgDhniSH5SwR1YMUBslnirXDFTGhff7FqZfTtGQn2vW fVG8YBIveEXuyEESM1GTtC+JEeWxFoBBtvqYeufb30hTavsmY0NkK2hTMENaYpSIJpZJ XQwnB3Zxp8lHKvt5pL36THwMcNnv7NHffTsEU9GDnG4irLIXU0eEYWIf31NgDnQA4U10 Rak6f8KdB9kuMtQ1rBMZfRkb2VEQVVMcVq8tlbImb7mgNNTS8HNIOf075dCVDyKNWAYz zQlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject :arc-authentication-results; bh=u+KHFi+xsJmn/aqIT0gliJYK/7O91/+iKmf1b0OHQfg=; b=ZG+OeYPcy6MorkEEOKmyPZtSgEXEnz5vA+fs0Uwlpk0rwpBlRFA21TJMBWX7mQYvcx QK05Y2CCglsZ6/9fYXyDNoQVy73QlWtsN/iK1CISRmsbqwA5i176IFRmn58m0TPPgh3v Ka/7YGcKQniY9a3EC0PUeZ0Kaaq7CtjEkUsSSBPrOCLyVM7BMSv9irBfNgksk7uunYwi /CQxx4tn0amixmk/f0pp/uJAr0e8N/EZJBev+0l0KF9E56cnmqKI2bsX/eQWfkvpoEn+ Gy2FiNoi0y4JdrcEtQU2V1qU/7WjWSSYTQ+Gm4DJRu5FoJmQE0z6NECDUHDJfAjmQK88 +4Kg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com Return-Path: Received: from david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id m2si831114lfj.2.2018.02.15.04.08.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Feb 2018 04:08:41 -0800 (PST) Received-SPF: pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.14 as permitted sender) client-ip=192.35.17.14; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id w1FC8fMW031592 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Feb 2018 13:08:41 +0100 Received: from [139.25.68.223] (linux-ses-ext02.ppmd.siemens.net [139.25.68.223]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id w1FC8e38008889; Thu, 15 Feb 2018 13:08:41 +0100 Subject: Re: [PATCH 2/2] centralize multistrap configuration generation To: isar-users@googlegroups.com, Baurzhan Ismagulov References: <20180214131509.16361-1-claudius.heine.ext@siemens.com> <20180214131509.16361-3-claudius.heine.ext@siemens.com> <20180215114214.GC5374@yssyq.radix50.net> From: Claudius Heine Message-ID: Date: Thu, 15 Feb 2018 13:08:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180215114214.GC5374@yssyq.radix50.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: 56TwL0hPrHqa Hi Baurzhan, On 02/15/2018 12:42 PM, Baurzhan Ismagulov wrote: > On Wed, Feb 14, 2018 at 02:15:09PM +0100, claudius.heine.ext@siemens.com wrote: >> From: Claudius Heine >> >> Previous there was redundant code between the buildchroot and >> isar-image-base recipe. >> >> This patch moves the generation of the multistrap configuration to a >> central python script that can be parametrized by both recipes. >> >> Signed-off-by: Claudius Heine >> --- >> .../recipes-core/images/files/multistrap.conf.in | 38 ---------- >> meta/lib/isar/multistrap.py | 80 ++++++++++++++++++++++ >> .../buildchroot/files/multistrap.conf.in | 37 ---------- > > Could you please post two final multistrap.confs you'd like to get with your > changes? 'like to get'? I don't want to get any other multistrap.conf than before. This is not a change of the multistrap.conf files, but just how they are generated. The python configparser created ini-file format only puts spaces around the '=' characters, but the resulting deserialized objects is the same. Ok, that is not 100% true, I changed the name of the isar repository section. Now its called 'isar' in the image (previously 'Isar') and buildchroot (previously 'isar-apt') multiconfig. But that is it. It has no different effect outside of multistrap. > I'd like to understand the reasons for moving from templates to a magic > generator. > > In my experience, magic is usually poorly documented (if at all) and very > ununderstandable for users. Simple change of a line requires locating the > generator, understanding what it does (they tend to be hairy with tons of > conditions) and patching the upstream [Isar] code. Templates have their > disadvantages, but are straightforward for users. In general, I'd like to keep > the current UX and stick with templates, which is possible most of the time. You prefer duplicated code? Two slightly different templates for two buildchroot and image recipe? Also this patch is only an intermediate step of the way for multi-repo support. IMO it has value on its own, since it centralized the generation of the multistrap configuration. The current kind of 'template' does not support creating repository entries on the fly. It might be possible to extent the multiconfig with shell scripting, but I prefer using python for such advanced logic. regards, Claudius -- 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