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