From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6522397978051739648 X-Received: by 10.25.113.16 with SMTP id m16mr185841lfc.3.1518701963201; Thu, 15 Feb 2018 05:39:23 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.46.21.23 with SMTP id s23ls215705ljd.15.gmail; Thu, 15 Feb 2018 05:39:22 -0800 (PST) X-Google-Smtp-Source: AH8x224/C37Jf4z0ixF5dMWn8XmGO8YsFwzggMSei6nvbK8oi/QJfleMTxYXYehqQE9RvzTu0Hmw X-Received: by 10.46.84.66 with SMTP id y2mr90592ljd.5.1518701962597; Thu, 15 Feb 2018 05:39:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518701962; cv=none; d=google.com; s=arc-20160816; b=Y+RMsVWyA9/XP8ZLyEr0D9I7EZwPWkQP5FX1uS7KYmh5IPrLlL0zFHPlUVRd94qPoL DKeTsgbGww8c0W3AvlxE1m6vl6jyRyYsBL31VkpIh/smh/V1Yw4ae72SmwvsJWyCCCEH L9lLyP943UqD+TTCzSDKSLTsL1rmkU8EMCFfWvoRg2yBxB6WMrIINgQSB6uyV/nLFbyl hh/noxOrHP/dRceXcNgJ863oi9RG0UPFzW5oxEYQoasbybVzUE/YApbG9jB0tAVYn4wq b99Qrdlrv2K1MvQhNnx+IYPw7QeTLrkp77tgqckjqw1THnBoBnLdbXNRtsoQfLwPRcXW oCHg== 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=vfUGK4Q3VPc055UwpKI+OOEqRhrTUiad3a8ZVBA7Ujg=; b=A6uD7dT5SCILxZc+aUO66JVWkAsLnOveWbH58B5DwZ/GOvLvLzhVqKoZA8s43/rrN+ CzIj659MHssoe3nrWDTwfUdQ74aVmWW1Qv0tbbCcEEsN4mVzu3A+eTmMfV9N5SfBjHbE YuaWvv7u2y3URjNEUhEf/ZHksVRhJPTPUif5S/GjqZtEBp/ZpHgtZ5tU8sji20iLeTop VvHzgDE7KnNso+wJi+6PbQmIk/Cyz1juuIYeytpAuF7BgOyeTM1klh56XXwD8YM7m5M2 vaUMGINvUIPGhM8PmjSzlKWe5eM27vYo4WecdgO/Gs81j0kUMfrDr6T+Ky6yTvegAiB0 RKeQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id w7si400960ljw.4.2018.02.15.05.39.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Feb 2018 05:39:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) client-ip=85.214.62.211; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Received: from [10.0.2.15] ([188.227.110.165]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id w1FDdJ6C014461 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 15 Feb 2018 14:39:20 +0100 Subject: Re: [PATCH 2/2] centralize multistrap configuration generation To: Claudius Heine , 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> <1619976eb38.27ac.034a6b0541ed39b7fb4e17f4ac219eaa@ilbers.de> From: Alexander Smirnov Message-ID: <22e22642-dc3d-4a08-19ac-69ac37423d86@ilbers.de> Date: Thu, 15 Feb 2018 16:39:14 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TUID: SQnPJ/3VVLzx On 02/15/2018 04:20 PM, Claudius Heine wrote: > On 02/15/2018 01:37 PM, Alexander Smirnov wrote: >> >> Claudius Heine 15 февраля 2018 г. >> 15:08:50 написал: >> >>> 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. >> >> The difference that I see IMHO: now you need to feed multistrap by >> community-standardized input, you propose to add custom tool that eats >> proprietary input. > > I don't get this point. What do you mean by that? You've introduced new language, like: +MULTISTRAP_ISAR_SOURCE = "copy:///${DEPLOY_DIR_APT}/${DISTRO}" +MULTISTRAP_ISAR_INSTALL = "${IMAGE_INSTALL}" +MULTISTRAP_ISAR_SUITE = "${DEBDISTRONAME}" So to have working multistrap config I *have* to write pre-config in this new language, what it's the simplification here, one set of options is replaced by another... > >> >>> >>> 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? >>> >> >> AFAIK the key idea is to have the only single multistrap that works >> with upstream repos. Other multistraps fetch packages from local >> cache. So after this is done, the problem with duplicacations in >> configs will go. >> >>> 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. >> >> What is the use case to have them "on the fly"? > > See: Also this patch is only an intermediate step of the way for > multi-repo support. > > Use-case for multi-repo: docker-ce repository available. Sorry, don't know what is docker-ce. Could you please describe whole repositories layout, just to understand the topic? > >> >> Alex >> >> It might be possible to extent the multiconfig with >>> shell scripting, but I prefer using python for such advanced logic. >> >> I don't care about python or bash > > At least Baurzhan seems to care, because he doesn't like debootstrap > because of it being in shell. Aghr, sent the mail on interrupted line, sorry. :-( I meant I don't care whether python or bash is used, my concern what is the input for they. If you prefer to parse multistrap config with python instead of bash, I could understand this. But here you want to introduce another language for doing the same things. So at least for me, it would be much easier to take some template for multistrap config (which syntax is well known and available in man page) and create the custom layout that I need. Alex > > Cheers, > Claudius > >> >>> >>> 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 >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "isar-users" group. >>> To unsubscribe from this group and stop receiving emails from it, >>> send an email to isar-users+unsubscribe@googlegroups.com. >>> To post to this group, send email to isar-users@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/isar-users/d58343b9-c284-81e7-f743-2672c1f5f8ef%40siemens.com. >>> >>> For more options, visit https://groups.google.com/d/optout. >> >> >> > -- With best regards, Alexander Smirnov ilbers GmbH Baierbrunner Str. 28c D-81379 Munich +49 (89) 122 67 24-0 http://ilbers.de/ Commercial register Munich, HRB 214197 General manager: Baurzhan Ismagulov