public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] isar-bootstrap: Clear local apt state information
@ 2019-11-20 10:53 vijaikumar.kanagarajan
  2019-11-21  9:22 ` Henning Schild
  2019-11-21 10:01 ` Jan Kiszka
  0 siblings, 2 replies; 12+ messages in thread
From: vijaikumar.kanagarajan @ 2019-11-20 10:53 UTC (permalink / raw)
  To: isar-users
  Cc: henning.schild, ibr, claudius.heine.ext, jan.kiszka, Vijai Kumar K

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 \
-- 
2.17.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-11-28 15:21 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-20 10:53 [PATCH] isar-bootstrap: Clear local apt state information vijaikumar.kanagarajan
2019-11-21  9:22 ` Henning Schild
2019-11-21  9:54   ` Vijai Kumar K
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox