From: Vijai Kumar K <vijaikumar.kanagarajan@gmail.com>
To: Henning Schild <henning.schild@siemens.com>
Cc: vijaikumar.kanagarajan@gmail.com, isar-users@googlegroups.com
Subject: Re: [PATCH] isar-bootstrap: Clear local apt state information
Date: Thu, 21 Nov 2019 15:24:01 +0530 [thread overview]
Message-ID: <20191121095401.GA15048@oxygen> (raw)
In-Reply-To: <20191121102218.5458a734@md1za8fc.ad001.siemens.net>
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 <vijaikumar.kanagarajan@gmail.com>:
>
> > From: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
> >
> > 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 <Vijaikumar_Kanagarajan@mentor.com>
> > ---
> > 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 \
>
next prev parent reply other threads:[~2019-11-21 9:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-20 10:53 vijaikumar.kanagarajan
2019-11-21 9:22 ` Henning Schild
2019-11-21 9:54 ` Vijai Kumar K [this message]
2019-11-21 10:05 ` [PATCH v2] " vijaikumar.kanagarajan
2019-11-25 6:38 ` Jan Kiszka
2019-11-25 6:46 ` Vijai Kumar K
2019-11-25 7:00 ` Jan Kiszka
2019-11-28 15:21 ` Baurzhan Ismagulov
2019-11-21 11:40 ` [PATCH] " Henning Schild
2019-11-21 12:09 ` Vijai Kumar K
2019-11-21 10:01 ` Jan Kiszka
2019-11-21 10:14 ` Vijai Kumar K
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=20191121095401.GA15048@oxygen \
--to=vijaikumar.kanagarajan@gmail.com \
--cc=henning.schild@siemens.com \
--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