From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6517599416265736192 X-Received: by 10.28.87.194 with SMTP id l185mr4190159wmb.9.1517518061105; Thu, 01 Feb 2018 12:47:41 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.223.144.41 with SMTP id h38ls88892wrh.11.gmail; Thu, 01 Feb 2018 12:47:40 -0800 (PST) X-Google-Smtp-Source: AH8x226kT2TrW9hO4W9QmnvP8xOPkiR02+TFhMVjid/wkyeGqp4SGUS55yvQiHcawnbBcpm3MHal X-Received: by 10.223.144.49 with SMTP id h46mr3768877wrh.8.1517518060662; Thu, 01 Feb 2018 12:47:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517518060; cv=none; d=google.com; s=arc-20160816; b=DRC+rQXaTwzoqw27a7KY7EK6E9APZgXOXjIZrJKSs0ye01t1Um0C5pN3WIWHph0/Uj qTiB0CmTrT4TaUyT8xFExmIyzRxxP5jEC/c4G2zhS398pbsdLCmr4jusJjfnpCiD06KD zpdAH/8jamThG/yR8h5e9WgRJvkNA2auIWiztQBpgHihvTY9ujkCbGlYDixRPdNzZoDX ivYok4e6k01vUGnnqFWk4s/mfFkn1tQ5SxuKYHeOx3VI3nXERgETke3P/xH2GUxlbozB A2SSnNWkvgpPYZnvd53uSzniRJPgtjQMMJUbQJz9XsHOn52BhPY5pR82oBzI2+hbxo0C qeZg== 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:cc:to:subject :arc-authentication-results; bh=CTUX51Gohu7qcJGcHMtrNOp/aKRjBt8vD/hLfTxV0vU=; b=sJCA8m3rACKNbcJDAVegdIiNs0K1cbExU6gAp7ah6XDw2TRBs6kp38My6u1CPlTQpo nW6MpoSKstmIvXzq9uBiIvlWIufL9dy6exnE3oQ5JswlbP36P+mTzXXpf/u0DST0ZHr6 7jKXbps1euJfUBvxJ7VMGLlJkAA5g2+SZCSDh2GFz7yI0Bi6PavMF7jz5oUA+8+LzxBG 1+OyIFOGQPlQfNDQx7NLcF9N1+De89CtOMvfzUdccph8t8fX/pgJ2X2Cefte9TUqT/mU EV+WTnAyB6TtnJe9kJ7F8H5TZpVKTuj8zIfvohgYCLIVNk95BbAZ2Q4cxg4hTO/E8l8D 1mHg== 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 f6si12162wre.4.2018.02.01.12.47.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Feb 2018 12:47:40 -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 w11Kla9Y012958 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 1 Feb 2018 21:47:38 +0100 Subject: Re: Multi repo support To: Claudius Heine , Henning Schild , "[ext] Claudius Heine" Cc: isar-users References: <7714f0e1-aaca-add2-eabc-738d4043c21c@siemens.com> <20180201161658.6b0af973@mmd1pvb1c.ad001.siemens.net> <20180201193458.24b6ac3f@mmd1pvb1c.ad001.siemens.net> <1517511108.2646.24.camel@denx.de> From: Alexander Smirnov Message-ID: Date: Thu, 1 Feb 2018 23:47:31 +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: <1517511108.2646.24.camel@denx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: y9Nfypdeeor1 On 02/01/2018 09:51 PM, Claudius Heine wrote: > Hi, > > On Thu, 2018-02-01 at 19:34 +0100, Henning Schild wrote: >> Am Thu, 1 Feb 2018 16:16:58 +0100 >> schrieb "[ext] Henning Schild" : >> >>> Am Thu, 1 Feb 2018 15:54:26 +0100 >>> schrieb "[ext] Claudius Heine" : >>> >>>> Hi, >>>> >>>> I would like to start the discussion about how to best implement >>>> muti repository support in isar. >>>> >>>> Does someone already has some ideas or even something in the >>>> pipeline for this? >>>> >>>> If not then I do have an idea that was outlined together with >>>> Jan: >>>> >>>> Adding and configuring apt repositories should be done via config >>>> files. It should be possible to define own multiconfigs while >>>> including multiconfigs from other layers. These configs then >>>> append >>>> filepaths to a global variable. >>>> >>>> Every file that is added this way contains 'sources.list' >>>> compatible repository definitions. So one repo each line. >>>> >>>> For every line in those files a repository entry for >>>> multistrap.conf >>>> is created. Here we might need some more complex code to convert >>>> such a apt repo tripel to the right format multistrap expects. >>>> But >>>> by using the 'sources.lists' format we would be independent of >>>> multistrap and become more future proof. >> >> We will also need a way to tell apt the priorities of these repos. >> Multistrap just adds them and apt-get installs packages according to >> its default behavior. >> That means that a package with the same name and version will get >> picked from a "random" repo. Overlays will need to make sure to >> always >> have a greater version or we will need apt configuration. >> https://wiki.debian.org/AptPreferences >> The big question here is how/whether multistrap will handle apt >> preference. >> >> Alex already ran into that when he wanted to modify "hello". Renaming >> packages - like Alex suggested - is not the way to go. Because the >> ones >> we do overlay could be deps of packages we do not overlay. > The version collision could be avoided by using epoch, and if I understand it correctly - this is the preferable way to assign apt priority. https://www.debian.org/doc/debian-policy/#s-f-version Regarding renaming 'hello' there was a bit different case, our 'hello' has nothing common with the upstream one, moreover I've already modified it to use 'libhello'. So this is not the case when we patch the upstream package. So I decided to rename it, to avoid confusion. In case of patching the upstream package, we could just add epoch to version, so our package will be always in first prio. Also I'm not sure that when there are 2 packages with the same names and versions available in source.list - is a good practice. In this case you have no way to easily check if your rootfs contains correct package, 'dpkg -l' won't be enough. Alex > Thanks, yes that is a very good point. > > I would prefer the apt preferences settings. Maybe handle it similar to > how I proposed the multi-repo support. A global variable where apt > preference file paths are appended. > > If multistrap cannot support them with a reasonable complex conversion > script then it might be time to say multistrap goodbye. > > Claudius >