From: Roland Hieber <rhi@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Roland Hieber <rhi@pengutronix.de>
Subject: [ptxdist] [PATCH] image-rauc: improve error detection for hook script
Date: Tue, 20 Feb 2024 11:19:09 +0100 [thread overview]
Message-ID: <20240220101909.1090342-1-rhi@pengutronix.de> (raw)
If config/images/rauc-hooks.sh is not found, genimage will instead try
to copy a file with an empty file name from the temporary build folder,
resulting in the less helpful error message about "cp: -r not specified;
omitting directory". Catch this case early and error out with a better
message.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
rules/image-rauc.make | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/rules/image-rauc.make b/rules/image-rauc.make
index def2ade1e237..a05c19f61de2 100644
--- a/rules/image-rauc.make
+++ b/rules/image-rauc.make
@@ -41,6 +41,10 @@ IMAGE_RAUC_BUNDLE_FORMAT := "crypt"
endif
ifdef PTXCONF_IMAGE_RAUC_HOOK
+ifndef IMAGE_RAUC_HOOK_FILE
+$(error IMAGE_RAUC_HOOK is enabled, but config/images/rauc-hooks.sh was not \
+ found in any component of PTXDIST_PATH)
+endif
IMAGE_RAUC_ENV_HOOK = \
RAUC_HOOK_FILE="file hooks.sh { image = \\"$(IMAGE_RAUC_HOOK_FILE)\\" }" \
RAUC_HOOK_MANIFEST="filename=hooks.sh"
--
2.39.2
next reply other threads:[~2024-02-20 10:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-20 10:19 Roland Hieber [this message]
2024-03-15 4:06 ` [ptxdist] [APPLIED] " Michael Olbrich
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=20240220101909.1090342-1-rhi@pengutronix.de \
--to=rhi@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/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