From: Anton Mikanovich <amikan@ilbers.de>
To: isar-users@googlegroups.com
Cc: Anton Mikanovich <amikan@ilbers.de>
Subject: [PATCH 4/5] dpkg-base: Copy isar_apt to workdir in separate task
Date: Fri, 15 Sep 2023 21:54:38 +0300 [thread overview]
Message-ID: <20230915185439.2954192-5-amikan@ilbers.de> (raw)
In-Reply-To: <20230915185439.2954192-1-amikan@ilbers.de>
As only isar_apt copy functionality needs repo locking and dependencies
building it can be placed into separate task to simplify tasks
requirements.
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
meta/classes/dpkg-base.bbclass | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index 7b02f378..f223fc16 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -186,10 +186,10 @@ do_prepare_build() {
addtask prepare_build after do_patch do_transform_template before do_dpkg_build
# If Isar recipes depend on each other, they typically need the package
# deployed to isar-apt
-do_prepare_build[deptask] = "do_deploy_deb"
-do_prepare_build[depends] = "${SCHROOT_DEP}"
-
-do_prepare_build:append() {
+do_local_isarapt[depends] += "isar-apt:do_cache_config"
+do_local_isarapt[deptask] = "do_deploy_deb"
+do_local_isarapt[lockfiles] += "${REPO_ISAR_DIR}/isar.lock"
+do_local_isarapt() {
# Make a local copy of isar-apt repo that is not affected by other parallel builds
rm -rf "${WORKDIR}/isar-apt/${DISTRO}-${DISTRO_ARCH}/*"
mkdir -p "${WORKDIR}/isar-apt/${DISTRO}-${DISTRO_ARCH}/apt/${DISTRO}"
@@ -198,8 +198,7 @@ do_prepare_build:append() {
cp -Rlf "${REPO_ISAR_DIR}/${DISTRO}/pool" "${WORKDIR}/isar-apt/${DISTRO}-${DISTRO_ARCH}/apt/${DISTRO}/"
fi
}
-
-do_prepare_build[lockfiles] += "${REPO_ISAR_DIR}/isar.lock"
+addtask local_isarapt before do_dpkg_build
# Placeholder for actual dpkg_runbuild() implementation
dpkg_runbuild() {
@@ -324,7 +323,7 @@ python do_devshell() {
bb.build.exec_func('schroot_delete_configs', d)
}
-addtask devshell after do_prepare_build
+addtask devshell after do_local_isarapt
DEVSHELL_STARTDIR ?= "${S}"
do_devshell[dirs] = "${DEVSHELL_STARTDIR}"
do_devshell[nostamp] = "1"
@@ -336,7 +335,7 @@ python do_devshell_nodeps() {
# devshell may be placed after do_instell_builddeps in downstream classes.
# devshell_nodeps will always stay right after do_prepare_build.
-addtask devshell_nodeps after do_prepare_build
+addtask devshell_nodeps after do_local_isarapt
do_devshell_nodeps[dirs] = "${DEVSHELL_STARTDIR}"
do_devshell_nodeps[nostamp] = "1"
do_devshell_nodeps[network] = "${TASK_USE_SUDO}"
--
2.34.1
next prev parent reply other threads:[~2023-09-15 18:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-15 18:54 [PATCH 0/5] Separate prebuild activities Anton Mikanovich
2023-09-15 18:54 ` [PATCH 1/5] repository: Add source package remove function Anton Mikanovich
2023-09-15 18:54 ` [PATCH 2/5] dpkg: Limit dsc searching by workdir Anton Mikanovich
2023-09-15 18:54 ` [PATCH 3/5] meta: Implement two stage build Anton Mikanovich
2023-10-12 8:48 ` Jan Kiszka
2023-10-12 9:07 ` Anton Mikanovich
2023-10-12 11:12 ` Jan Kiszka
2023-10-12 14:39 ` Baurzhan Ismagulov
2023-10-12 14:53 ` Jan Kiszka
2023-10-12 15:20 ` Baurzhan Ismagulov
2023-10-12 9:15 ` Jan Kiszka
2023-09-15 18:54 ` Anton Mikanovich [this message]
2023-09-15 18:54 ` [PATCH 5/5] RECIPE-API-CHANGELOG.md: Note tasks separation Anton Mikanovich
2023-09-21 13:45 ` [PATCH 0/5] Separate prebuild activities Anton Mikanovich
2023-09-29 6:43 ` Uladzimir Bely
2023-10-30 4:44 ` MOESSBAUER, Felix
2023-10-30 8:00 ` Schmidt, Adriaan
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=20230915185439.2954192-5-amikan@ilbers.de \
--to=amikan@ilbers.de \
--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