From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6761340396568051712 X-Received: by 2002:a5d:4584:: with SMTP id p4mr9549968wrq.345.1574328140623; Thu, 21 Nov 2019 01:22:20 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:f417:: with SMTP id z23ls3744536wma.5.canary-gmail; Thu, 21 Nov 2019 01:22:19 -0800 (PST) X-Google-Smtp-Source: APXvYqwUXm10YMoKSA5jevATSe1qagBcY4t3XAn6p0JTaeF5kTCREiizAy1fyZZO7V8JV9aSaZj8 X-Received: by 2002:a05:600c:2102:: with SMTP id u2mr8518495wml.49.1574328139943; Thu, 21 Nov 2019 01:22:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574328139; cv=none; d=google.com; s=arc-20160816; b=DKSasQjB/q94tdDkvtJBaN4ZDtWT9rezzVJlGh15c9+DnJ8wxqkBH9Bt8Pm5bvxjJq QgUlP16M/hqi+0EMduAURCcrFkJK9m12hdFSZtxtEsG12hXb9a+k0jBWJILuGjFJnf12 5iys62o9ddyvakpsjC2OZEsetQEiVLudqTCcBeolWuYXCKH1R13cb4f7t501xuuNTXzQ OHh//sBKsGyI1W1BjDbhVynOkQloOp+YcsEpIyYvwLzZbADBPqdJGLEXaJuRTJtEMgR+ G/LC53bKBvufeO65kvPG5lf+nXWuaLYxqO1SFQFfPJ55rRX5SPOKuxwfVvb4a+8bRJj5 9l6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date; bh=qwUEcMUuCAEqJfphY/e+JIE917NlLCZV7r8mzmPwg4w=; b=udfVo1kBq6EF2PQjaH5d7zldtKckVRYRQxiwkuKMuc5w/SAV/O/4L6MkyrDjUTpaiZ +uvq4I3LTQbgLDZCs/l5FOzXDBJy/nGAFx8k/M3HpwOsLG0CPdXOJXtxn2IAk/0W3jnA D51x9qbslYrH9FIosteusb6BRpzpi22ZWixFzZZ0U0/jXNfRcxz6IHVi5v4LHL3jtHrZ NS09JdPGsz0nasK353qyDvrG9qavHjvrqfB/PdeXbToprc6vyhJ50YIonMnI0tLDjgGK z+61M+H2EQ/mh5s4L5CP04j0i01Jiqn8g3angl23MYTESOEx59C2en3RKHP+CliY7gqJ xrqA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from lizzard.sbs.de (lizzard.sbs.de. [194.138.37.39]) by gmr-mx.google.com with ESMTPS id r11si99763wrl.3.2019.11.21.01.22.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Nov 2019 01:22:19 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.39 as permitted sender) client-ip=194.138.37.39; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id xAL9MJLk010716 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Nov 2019 10:22:19 +0100 Received: from md1za8fc.ad001.siemens.net ([139.25.0.65]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id xAL9MJjT026310; Thu, 21 Nov 2019 10:22:19 +0100 Date: Thu, 21 Nov 2019 10:22:18 +0100 From: Henning Schild To: Cc: , Vijai Kumar K Subject: Re: [PATCH] isar-bootstrap: Clear local apt state information Message-ID: <20191121102218.5458a734@md1za8fc.ad001.siemens.net> In-Reply-To: <20191120105340.26844-1-Vijaikumar_Kangarajan@mentor.com> References: <20191120105340.26844-1-Vijaikumar_Kangarajan@mentor.com> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: UKeNx4JBnAQT 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. 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. 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. 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 \