From: Felix Moessbauer <felix.moessbauer@siemens.com>
To: isar-users@googlegroups.com
Cc: amikan@ilbers.de, jan.kiszka@siemens.com,
quirin.gylstorff@siemens.com,
Felix Moessbauer <felix.moessbauer@siemens.com>
Subject: [PATCH 1/1] fix copy out of apt cache after sbuild
Date: Mon, 22 Jan 2024 14:26:47 +0100 [thread overview]
Message-ID: <20240122132647.779902-2-felix.moessbauer@siemens.com> (raw)
In-Reply-To: <20240122132647.779902-1-felix.moessbauer@siemens.com>
During the setup of the sbuild chroot, all packages from the
global apt cache are symlinked into the sbuild chroot. After the build,
the newly downloaded packages should be copied out from the local cache
to the global apt cache. However, the current logic tried to copy out
all packages, including the symlinks. This does not work, as the
symlinks might point to non-existing locations.
This is now fixed by only copying out the newly downloaded debs (the
ones which are not a symlink).
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
meta/classes/dpkg.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index c699a84d..3057329f 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -121,7 +121,7 @@ dpkg_runbuild() {
--chroot-setup-commands="mkdir -p ${deb_dir}" \
--chroot-setup-commands="ln -sf ${ext_deb_dir}/*.deb -t ${deb_dir}/" \
--finished-build-commands="rm -f ${deb_dir}/sbuild-build-depends-main-dummy_*.deb" \
- --finished-build-commands="[ -z \"\$(find ${deb_dir} -maxdepth 1 -name '*.deb' -print -quit)\" ] || cp ${CP_FLAGS} ${deb_dir}/*.deb -t ${ext_deb_dir}/" \
+ --finished-build-commands="find ${deb_dir} -maxdepth 1 -type f -name '*.deb' -print -exec cp ${CP_FLAGS} -t ${ext_deb_dir}/ {} \;" \
--finished-build-commands="cp /var/log/dpkg.log ${ext_root}/dpkg_partial.log" \
--debbuildopts="--source-option=-I" \
--build-dir=${WORKDIR} --dist="isar" ${DSC_FILE}
--
2.39.2
next prev parent reply other threads:[~2024-01-22 13:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-22 13:26 [PATCH 0/1] " Felix Moessbauer
2024-01-22 13:26 ` Felix Moessbauer [this message]
2024-01-22 13:47 ` Schmidt, Adriaan
2024-01-22 15:04 ` MOESSBAUER, Felix
2024-01-29 10:50 ` Uladzimir Bely
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=20240122132647.779902-2-felix.moessbauer@siemens.com \
--to=felix.moessbauer@siemens.com \
--cc=amikan@ilbers.de \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.com \
--cc=quirin.gylstorff@siemens.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