public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Alexander Smirnov <asmirnov@ilbers.de>, isar-users@googlegroups.com
Subject: Re: [PATCH 3/4] build.sh: Update apt sources
Date: Thu, 1 Feb 2018 15:28:12 +0100	[thread overview]
Message-ID: <d228eafb-a9a7-4761-0228-aa3f6913cb27@siemens.com> (raw)
In-Reply-To: <846567dc-92de-8dc6-e532-342dcc00b26c@ilbers.de>

On 2018-02-01 14:43, Alexander Smirnov wrote:
> On 02/01/2018 04:13 PM, Jan Kiszka wrote:
>> On 2018-02-01 12:48, Alexander Smirnov wrote:
>>> On 02/01/2018 02:40 PM, Jan Kiszka wrote:
>>>> On 2018-02-01 12:29, Alexander Smirnov wrote:
>>>>> Trigger apt sources update before building the package to be sure that
>>>>> we are in sync with isar-apt content.
>>>>>
>>>>> Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
>>>>> ---
>>>>>    meta/recipes-devtools/buildchroot/files/build.sh | 3 +++
>>>>>    1 file changed, 3 insertions(+)
>>>>>
>>>>> diff --git a/meta/recipes-devtools/buildchroot/files/build.sh
>>>>> b/meta/recipes-devtools/buildchroot/files/build.sh
>>>>> index 77e0fdd..5c59193 100644
>>>>> --- a/meta/recipes-devtools/buildchroot/files/build.sh
>>>>> +++ b/meta/recipes-devtools/buildchroot/files/build.sh
>>>>> @@ -3,6 +3,9 @@
>>>>>    # This software is a part of ISAR.
>>>>>    # Copyright (C) 2015-2017 ilbers GmbH
>>>>>    +# Make sure that we have latest isar-apt content
>>>>> +apt-get update
>>>>> +
>>>>
>>>> Can we confine this to the isar-apt repo? Or is there no risk that an
>>>> upstream repo update will result in a buildchroot change that is
>>>> inconsistent with an earlier build stage?
>>>
>>> That's a good point, I've already checked it, it seems to be possible
>>> like:
>>>
>>> sudo apt-get update -o Dir::Etc::sourcelist="sources.list.d/${source}" \
>>> -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
>>>
>>> [https://askubuntu.com/questions/65245/apt-get-update-only-for-a-specific-repository]
>>>
>>>
>>>
>>> But I decided that it makes no sense, because target image will be
>>> generated later and use upstream apt. So if something has been changed
>>> during buildchroot operating, this will affect target image anyway.
>>
>> buildchroot shall not deviate from target rootfs. We will eventually
>> (rather sooner than later) have to provide it for SDK use, and than you
>> definitely don't want surprises, but actually already earlier.
>>
> 
> I mean that the issue is not in buildchroot, I'll fix this line to
> update isar-apt only, but this doesn't solve the issue of atomic
> upstream fetch. You can't generate target image using only buildchroot.
> So for example:
> 
>  - You've generated buildchroot SDK in Feb.
>  - You want to use this SDK and build target image in March.
> 
> No warranty that this will work until you prefetch packages for *both*
> target image and buildchroot.

That... is true. :)

> 
>>>
>>> Again I think this should be handled outside buildchroot by caching
>>> upstream apts.
>>
>> Well, do you plan to /always/ cache them? Last time I asked you said we
>> need both cases, cached and "live" ;). But even when live, we must keep
>> things atomic over a single build at least.
> 
> No, I meant a bit different thing: if build_rep assumes to cache
> *everything* exists in Isar tree, I'd like to have an option to disable
> it, I don't want to waste the time by downloading tons of unneeded
> packages.
> 
> In my opinion reproducibility should be always enabled and should cache
> everything needed for *the current* bitbake target, i.e.:
> 
> 1. $ bitbake example-hello
> Isar prefetches everything needed to build example-hello (buildchroot +
> build deps) and use local cache only.
> 
> 2. $ bitabke isar-image-base
> Isar prefetches everything needed to build target image (buildchroot +
> build deps + target image packages) and use local cache only.
> 
> 
> Without this Isar reproducibility and build correctness will be based on
> user's hopes and prays :-)

We don't disagree.

> 
>>
>> So, if you can avoid pulling from upstream here, please add that. We can
>> still drop it again when the external infrastructure can always
>> guarantee atomicity in the repo state.
>>
> 
> Ok.

Let's consider it a "mitigation" measure for "improving" consistency,
not able to guarantee it. As you correctly said, as long as we do not
cache and freeze our fetches, we are lost with the two rootfs'es we
create asynchronously.

Thanks,
Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

  reply	other threads:[~2018-02-01 14:28 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-01 11:29 [PATCH 0/4] Rework isar-apt Alexander Smirnov
2018-02-01 11:29 ` [PATCH 1/4] isar-apt: Introduce separate recipe Alexander Smirnov
2018-02-01 11:29 ` [PATCH 2/4] buildchroot: Enable isar-apt Alexander Smirnov
2018-02-04 12:06   ` Jan Kiszka
2018-02-01 11:29 ` [PATCH 3/4] build.sh: Update apt sources Alexander Smirnov
2018-02-01 11:40   ` Jan Kiszka
2018-02-01 11:48     ` Alexander Smirnov
2018-02-01 13:13       ` Jan Kiszka
2018-02-01 13:43         ` Alexander Smirnov
2018-02-01 14:28           ` Jan Kiszka [this message]
2018-02-01 11:29 ` [PATCH 4/4] build.sh: Force 'yes' for apt Alexander Smirnov
2018-02-01 11:41   ` Jan Kiszka
2018-02-01 12:27     ` Alexander Smirnov
2018-02-01 16:14 ` [PATCH 0/4] Rework isar-apt Jan Kiszka
2018-02-01 16:22   ` Alexander Smirnov
2018-02-01 16:25     ` Jan Kiszka
2018-02-01 16:54       ` Alexander Smirnov
2018-02-01 17:03         ` Jan Kiszka
2018-02-01 20:32           ` Alexander Smirnov
2018-02-01 18:37       ` Claudius Heine
2018-02-01 19:37         ` Alexander Smirnov
2018-02-01 20:09           ` Claudius Heine
2018-02-01 20:13             ` Claudius Heine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d228eafb-a9a7-4761-0228-aa3f6913cb27@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=asmirnov@ilbers.de \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox