From: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
To: <isar-users@googlegroups.com>
Cc: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
Subject: [PATCH v10 13/14] rootfs: Handle failures when postprocess is rerun
Date: Thu, 26 Nov 2020 23:59:52 +0530 [thread overview]
Message-ID: <20201126182953.7518-5-Vijaikumar_Kanagarajan@mentor.com> (raw)
In-Reply-To: <20201126182953.7518-1-Vijaikumar_Kanagarajan@mentor.com>
The apt state information in var/lib/apt/lists is cleared as
part of postprocessing. This makes apt-get calls in cache_deb_src
fail when rerunning the postprocess task.
Since we cannot run apt-get update again to refresh the state
information, copy the apt state information from the initial
bootstrapped image.
Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
---
meta/classes/rootfs.bbclass | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
index 99f677b..efed0f6 100644
--- a/meta/classes/rootfs.bbclass
+++ b/meta/classes/rootfs.bbclass
@@ -190,6 +190,10 @@ cache_deb_src() {
sudo mv "${ROOTFSDIR}"/etc/resolv.conf "${ROOTFSDIR}"/etc/resolv.conf.isar
fi
rootfs_install_resolvconf
+ # Note: ISAR updates the apt state information(apt-get update) only once during bootstrap and
+ # relies on that through out the build. Copy that state information instead of apt-get update
+ # which generates a new state from upstream.
+ sudo cp -Trpn "${BOOTSTRAP_SRC}/var/lib/apt/lists/" "${ROOTFSDIR}/var/lib/apt/lists/"
deb_dl_dir_import ${ROOTFSDIR} ${ROOTFS_DISTRO}
debsrc_download ${ROOTFSDIR} ${ROOTFS_DISTRO}
--
2.17.1
next prev parent reply other threads:[~2020-11-26 18:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-26 18:28 [PATCH v10 00/14] Debsrc Caching Vijai Kumar K
2020-11-26 18:28 ` [PATCH v10 01/14] rootfs: Make rootfs finalize a separate task Vijai Kumar K
2020-11-26 18:28 ` [PATCH v10 02/14] deb-dl-dir: Cache host distro debs separately Vijai Kumar K
2020-11-26 18:28 ` [PATCH v10 03/14] meta: cache deb srcs as part of postprocessing Vijai Kumar K
2020-11-26 18:28 ` [PATCH v10 04/14] deb-dl-dir: Make debsrc_download faster Vijai Kumar K
2020-11-26 18:28 ` [PATCH v10 05/14] deb-dl-dir: Download files only belonging to the current image Vijai Kumar K
2020-11-26 18:28 ` [PATCH v10 06/14] deb-dl-dir: Factor out the mounting part Vijai Kumar K
2020-11-26 18:28 ` [PATCH v10 07/14] deb-dl-dir: Fix skipping of removed files Vijai Kumar K
2020-11-26 18:28 ` [PATCH v10 08/14] repository: Add a sanity test to check missing sources Vijai Kumar K
2020-11-26 18:29 ` [PATCH v10 09/14] base-apt: Introduce BASE_REPO_FEATURES Vijai Kumar K
2020-11-26 18:29 ` [PATCH v10 10/14] repository: Fix failures due to missing section Vijai Kumar K
2020-11-26 18:29 ` [PATCH v10 11/14] scripts/ci_build.sh: Enable deb-src caching Vijai Kumar K
2020-11-26 18:29 ` [PATCH v10 12/14] rootfs: Fix possible overwrite of existing resolv.conf Vijai Kumar K
2020-11-26 18:29 ` Vijai Kumar K [this message]
2020-11-26 18:30 ` [PATCH v10 14/14] doc/user_manual.md: Document details about deb-src caching Vijai Kumar K
2020-11-27 13:46 ` [PATCH v10 00/14] Debsrc Caching Anton Mikanovich
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=20201126182953.7518-5-Vijaikumar_Kanagarajan@mentor.com \
--to=vijaikumar_kanagarajan@mentor.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