From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6761340396568051712 X-Received: by 2002:a17:906:f209:: with SMTP id gt9mr12585364ejb.241.1574330048957; Thu, 21 Nov 2019 01:54:08 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:907:2175:: with SMTP id rl21ls2582682ejb.3.gmail; Thu, 21 Nov 2019 01:54:08 -0800 (PST) X-Google-Smtp-Source: APXvYqxTj4BZ3wcP3lxWgKm20qoAumb0vtHRuTaS+Pw1UxxtpcuwfhVf5mPd2dGreWvSe9m1o6zw X-Received: by 2002:a17:906:2552:: with SMTP id j18mr12974500ejb.244.1574330048311; Thu, 21 Nov 2019 01:54:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574330048; cv=none; d=google.com; s=arc-20160816; b=jzifWj3Mcq0i/B/PDF2qHA3Vi0pR7sDO3uTKEMe+X33GheZq13GeZkkmmwDMCGDgWp 9xydLF0rZWaHaQW0i1fQ9ga6MVTO9Fj6rQ4vCzZ0S8V6Qn5VbJGH3MS4ky1gA/koniDI cH23GOjEp+gv0hybjtRjhlxyCbIMDo2p+Ecz4lAJOpFmIuLyW981HotPzSf2ZKqZABvd 0TEiFNpTe2ewJYlZJAL4gIRoNzslhR7plmxYZWfP5mwvZxlCcgSDaTJoKM8JzcpRVQDN wLV03H7sVczKHZ72KaUynuf067dlDtKGsvRhLL4rwNNwjdyqf58uD3b3tM6+691RKCza gjzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:date:from:dkim-signature; bh=Bp3dIp8i1xCW8IaCpGbl7MhQ4mCFaXkk1k5GvquFI0I=; b=SPGb0E5oqEsM0dup3zHA6tqGMKDABBrCM2gmuB9V34RxuS5Vz6Viw1HnJlHCaRWGd/ wHNsip9S9w+X2qhm/9BEtvo6jxggAvXARd6EIjRhYil7/WFZCzT+5V/PPmT1EMG4QC7O mv4fFYkiv3yi+KqItdNVMCvlRE5TystMXUDNipZG6RyURGyfkGlvfFLU6SQHU6eZYoXs FGyElLAQuk0cEtZgsQC19w2wa2rDXuLQwfAQ9abRdknhKbEEaO3+x1UqPsWWCOwhizMe zg5/5kONqezHb/IZ1seT1T+pzEFSUy6eF5IsJSxdq/avZ7Jg5KZ6cAOl31aSdEQ+mJxJ qvQQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=G3QKidqW; spf=pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2a00:1450:4864:20::343 as permitted sender) smtp.mailfrom=vijaikumar.kanagarajan@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com. [2a00:1450:4864:20::343]) by gmr-mx.google.com with ESMTPS id c31si170027edb.0.2019.11.21.01.54.08 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 Nov 2019 01:54:08 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2a00:1450:4864:20::343 as permitted sender) client-ip=2a00:1450:4864:20::343; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=G3QKidqW; spf=pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2a00:1450:4864:20::343 as permitted sender) smtp.mailfrom=vijaikumar.kanagarajan@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: by mail-wm1-x343.google.com with SMTP id x26so2683907wmk.4 for ; Thu, 21 Nov 2019 01:54:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Bp3dIp8i1xCW8IaCpGbl7MhQ4mCFaXkk1k5GvquFI0I=; b=G3QKidqW2D2RAa3w0voCWxILRV4LhlmRpgeI/yMGGGblRE27Eq1cDtOxUJRx7bmLaV uWBZ7J2x7tkyAsuqM2DqswXfhEcJhpbalFVX7hFL16Zq13SXDIGpw4rUl1g31/+WG61G WosistI/9M2m+Wzm1D73ygn587W0Ni/g0JBTzEnIfVgmR95JibY3HlWROC6aUm/HHbPK l6+sBKl4aI8Mm3RisWU5eSF0VUWQBMlB8OwlMoDWUiywLwEfeQSqb+xps4urbptXYQzH 8w5OMBMEor2xXh1cvVk/IeECHR0eqmdJqaQbr3G1pSgTQDm77MUpmx03OLQtAokamYu/ IdIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Bp3dIp8i1xCW8IaCpGbl7MhQ4mCFaXkk1k5GvquFI0I=; b=OYe9Yv7829/TOre49vVIU2Rjc5ik0qEJh9qOoYwZrspNWA/DmR7B++2NYdqKjUEU5Q m341WpUWPlLnM6C9ZS2fI3dzZVn0RniUdiwwJFSHMH5cYBtMnqNnjpUTkPBMhCiRIQhH 7OPCkVA8+xz3KXLLPHB20wj6jVhY4sMYDsehaBvjuuxD6Cwc+RghcXwGDqYvjPxW1HCg zUvxysVH81BYR/bzG/JzqRWDQ9NBt2rFXCLOQ+PbKAtsVRAPZmGvs151RopQS+Fa3HUw WdFcPNSntAwb8GUH4Vmaqr58uSGBOA8TcznjcVrczymJFxVAgac527Men6VYgDXFVh3b XQFA== X-Gm-Message-State: APjAAAVowNc+gGq/v18beQkXsGKeXgqy64srkPm4blHgxSYuPnl0iP+b qxIdbi47D/wXOdCu1md40CQJM9TC6R8= X-Received: by 2002:a05:600c:2201:: with SMTP id z1mr3801776wml.68.1574330047780; Thu, 21 Nov 2019 01:54:07 -0800 (PST) Return-Path: Received: from oxygen (nat-sch.mentorg.com. [139.181.36.34]) by smtp.gmail.com with ESMTPSA id s82sm2369418wms.28.2019.11.21.01.54.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Nov 2019 01:54:07 -0800 (PST) From: Vijai Kumar K X-Google-Original-From: Vijai Kumar K Date: Thu, 21 Nov 2019 15:24:01 +0530 To: Henning Schild Cc: vijaikumar.kanagarajan@gmail.com, isar-users@googlegroups.com Subject: Re: [PATCH] isar-bootstrap: Clear local apt state information Message-ID: <20191121095401.GA15048@oxygen> References: <20191120105340.26844-1-Vijaikumar_Kangarajan@mentor.com> <20191121102218.5458a734@md1za8fc.ad001.siemens.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191121102218.5458a734@md1za8fc.ad001.siemens.net> User-Agent: Mutt/1.9.4 (2018-02-28) X-TUID: L5sQD/DUQ0xA On Thu, Nov 21, 2019 at 10:22:18AM +0100, Henning Schild wrote: > Hi, > > i am not sure i fully get the problem. With the first stage you > probably mean "debootstrap" and the second stage the isar bootstrap on > top. In case of crossdebootstrap, the bootstrapping runs in two stages. Basically qemu-debootstrap takes care of that and calls debootstrap --second-stage when it identifies the build as crossbuild. The apt url passed in is not used in the second stage. Instead, it uses deb.debian.org/debian and reuses the state information like below(log from debootstrap --second-stage) + mv debootstrap.invalid_dists_stretch_InRelease deb.debian.org_debian_dists_stretch_InRelease + mv debootstrap.invalid_dists_stretch_Release deb.debian.org_debian_dists_stretch_Release + mv debootstrap.invalid_dists_stretch_Release.gpg deb.debian.org_debian_dists_stretch_Release.gpg The debootstrap.invalid_* has the InRelease contents of my custom repo(a minimal debian repo) passed in as a argument to qemu-debootstrap. Post second stage the apt-state information is messed up. Has the name of deb.debian.org but contents of my local apt mirror. So, if apt-get update is called with this state, it would fail when I have both deb.debian.org and the custom repo mentioned in my DEBIAN_APT_SOURCES file. > > The first stage should be using the primary entry from the > sources.list, so as far as i remember we are just adding more entries. > Meaning the state information should stay valid. Maybe in the offline > "base-apt" case we have a flow that actually switches the upstream > mirror. > > Maybe you can go into detail how to reproduce the issue at hand, > possibly add a test-case for it. It is one such corner case. Adding a test case for such a unique situation is difficult since it involves custom repos. > > If the files should be deleted, my guess is that the deletion is > related to the deletion of sources.list in line 282. So it might be a > good idea to add your deletion right after or before that. Yes. I can move it over there. Thanks, Vijai Kumar K > > Henning > > Am Wed, 20 Nov 2019 16:23:40 +0530 > schrieb : > > > From: Vijai Kumar K > > > > Debootstrap's second stage switches to using the default debian > > mirror. But the apt state information is renamed and used from the > > first stage. This might cause apt-get update to fail with the below > > error when the sources list contain both custom and upstream repos. > > > > | Reading package lists... > > | E: Failed to fetch > > http://deb.debian.org/debian/dists/stretch/InRelease \ | > > Unable to find expected entry 'contrib/source/Sources' in Release > > file \ | (Wrong sources.list entry or malformed file) > > > > Clear the apt state information before apt-get update. > > > > Signed-off-by: Vijai Kumar K > > --- > > meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc > > b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc index > > d614d9a..5a379f7 100644 --- > > a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc +++ > > b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc @@ -320,6 > > +320,7 @@ isar_bootstrap() { chroot "${ROOTFSDIR}" /usr/bin/dpkg > > --add-architecture ${DISTRO_ARCH} fi > > > > + rm -rf "${ROOTFSDIR}/var/lib/apt/lists/"* > > chroot "${ROOTFSDIR}" /usr/bin/apt-get update -y > > chroot "${ROOTFSDIR}" /usr/bin/apt-get install -y -f > > chroot "${ROOTFSDIR}" /usr/bin/apt-get dist-upgrade -y \ >