From: Roland Hieber <rhi@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Roland Hieber <rhi@pengutronix.de>
Subject: [ptxdist] [PATCH v1] ptxdist: print a note when calling ptxdist inside 'ptxdist bash'
Date: Sun, 6 Jun 2021 15:53:50 +0200 [thread overview]
Message-ID: <20210606135350.22150-1-rhi@pengutronix.de> (raw)
In-Reply-To: <20210114225149.3181-1-rhi@pengutronix.de>
For debugging purposes it might be useful to run ptxdist inside a
'ptxdist bash' session, but under normal conditions this will not work
out of the box. Mention the fact to prevent confusion and useless
debugging sessions:
$ ptxdist
FATAL didn't find /scripts/ptxdist_vars.sh
Note: PTXdist was called inside 'ptxdist bash' – things may be broken.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
RFC -> PATCH v1:
- bailout instead of printing a notice (Michael Olbrich)
- check for PTXDIST_TOPDIR directly in main because it will already be
defined in ptxdist_trap_exit_handler (and also I don't know anymore
what significance ptxdist_trap_exit_handler holds that I used it
previously…)
RFC was at https://lore.ptxdist.org/ptxdist/20210114225149.3181-1-rhi@pengutronix.de
---
bin/ptxdist | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/bin/ptxdist b/bin/ptxdist
index 13f81674f4fd..c41065311f0c 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -2641,6 +2641,10 @@ setup_export() {
########################################################################
main() {
+ if [ -n "${PTXDIST_TOPDIR}" ]; then
+ ptxd_bailout "Calling PTXdist inside 'ptxdist bash' is not supported."
+ fi
+
check_uid &&
check_path &&
--
2.29.2
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
next prev parent reply other threads:[~2021-06-06 13:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-14 22:51 [ptxdist] [RFC 1/2] " Roland Hieber
2021-01-14 22:51 ` [ptxdist] [RFC 2/2] ptxd_lib_dgen: recompile when certain global kconfig options change Roland Hieber
2021-01-15 7:02 ` Michael Olbrich
2021-01-15 10:09 ` Roland Hieber
2021-01-15 6:35 ` [ptxdist] [RFC 1/2] ptxdist: print a note when calling ptxdist inside 'ptxdist bash' Michael Olbrich
2021-01-15 6:43 ` Michael Olbrich
2021-06-06 13:53 ` Roland Hieber [this message]
2021-06-16 10:35 ` [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=20210606135350.22150-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