From: Cedric Hombourger <Cedric_Hombourger@mentor.com>
To: <isar-users@googlegroups.com>
Cc: Cedric Hombourger <Cedric_Hombourger@mentor.com>
Subject: [PATCH] buildchroot: do not mk-build-deps in ${S}
Date: Fri, 25 Sep 2020 14:46:32 +0530 [thread overview]
Message-ID: <20200925091632.43333-1-Cedric_Hombourger@mentor.com> (raw)
mk-build-deps may leave .changes and/or .buildinfo files behind despite use of
the -r option (which seems to only remove the generated .deb file). Having new
files in the source tree causes dh_clean to complain (at least when the package
uses quilt to manage patches). This problem was observed while re-building some
upstream bullseye packages. Since there are no requirements to execute the
mk-build-deps tool from the source tree, create a temporary directory and run
it from there.
Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
meta/recipes-devtools/buildchroot/files/deps.sh | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-devtools/buildchroot/files/deps.sh b/meta/recipes-devtools/buildchroot/files/deps.sh
index 93bc9cf..40d4a1c 100644
--- a/meta/recipes-devtools/buildchroot/files/deps.sh
+++ b/meta/recipes-devtools/buildchroot/files/deps.sh
@@ -34,17 +34,22 @@ if ! grep "^Architecture:" debian/control | grep -qv "all"; then
fi
# Install all build deps
+srcdir=$(pwd)
+tmpdir=$(mktemp -d)
+cd ${tmpdir}
if [ "$3" = "--download-only" ]; then
# this will not return 0 even when it worked
- mk-build-deps $set_arch -t "${install_cmd}" -i -r debian/control &> \
+ mk-build-deps $set_arch -t "${install_cmd}" -i -r ${srcdir}/debian/control &> \
mk-build-deps.output || true
cat mk-build-deps.output
# we assume success when we find this
grep "mk-build-deps: Unable to install all build-dep packages" mk-build-deps.output
rm -f mk-build-deps.output
else
- mk-build-deps $set_arch -t "${install_cmd}" -i -r debian/control
+ mk-build-deps $set_arch -t "${install_cmd}" -i -r ${srcdir}/debian/control
# Upgrade any already installed packages in case we are partially rebuilding
apt-get upgrade -y --allow-downgrades
fi
+cd ${srcdir}
+rm -rf ${tmpdir}
--
2.28.0
next reply other threads:[~2020-09-25 9:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-25 9:16 Cedric Hombourger [this message]
2020-09-25 9:33 ` Cedric Hombourger
2020-09-25 16:27 ` Henning Schild
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=20200925091632.43333-1-Cedric_Hombourger@mentor.com \
--to=cedric_hombourger@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