public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/emacs:master commit in: eclass/
Date: Mon, 12 Apr 2021 19:09:00 +0000 (UTC)	[thread overview]
Message-ID: <1618254061.ed7745256875f460578f0ecd8adbf9724cede1ae.ulm@gentoo> (raw)

commit:     ed7745256875f460578f0ecd8adbf9724cede1ae
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 12 19:01:01 2021 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Mon Apr 12 19:01:01 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/emacs.git/commit/?id=ed774525

elisp-common.eclass: Add timeout to version detection

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 eclass/elisp-common.eclass | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/eclass/elisp-common.eclass b/eclass/elisp-common.eclass
index 832fc19..bdf97f4 100644
--- a/eclass/elisp-common.eclass
+++ b/eclass/elisp-common.eclass
@@ -219,7 +219,9 @@ _ELISP_EMACS_VERSION=""
 # Output version of currently active Emacs.
 
 elisp-emacs-version() {
-	local version ret
+	local version ret tmout="timeout -k 5 55"
+	# Run without timeout if the command is not available
+	${tmout} true &>/dev/null || tmout=""
 	# The following will work for at least versions 18-24.
 	echo "(princ emacs-version)" >"${T}"/emacs-version.el
 	version=$(
@@ -228,7 +230,7 @@ elisp-emacs-version() {
 		# Redirecting stdin and unsetting TERM and DISPLAY will cause
 		# most of them to exit with an error.
 		unset TERM DISPLAY
-		${EMACS} ${EMACSFLAGS} -l "${T}"/emacs-version.el </dev/null
+		${tmout} ${EMACS} ${EMACSFLAGS} -l "${T}"/emacs-version.el </dev/null
 	)
 	ret=$?
 	rm -f "${T}"/emacs-version.el


             reply	other threads:[~2021-04-12 19:09 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12 19:09 Ulrich Müller [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-09-02 15:31 [gentoo-commits] repo/proj/emacs:master commit in: eclass/ Ulrich Müller
2024-09-02 15:18 Ulrich Müller
2024-09-02 15:18 Ulrich Müller
2023-10-22 10:01 Ulrich Müller
2023-10-20 12:18 Ulrich Müller
2022-10-20  8:05 Ulrich Müller
2022-10-20  8:05 Ulrich Müller
2022-04-03 18:29 Ulrich Müller
2022-04-03 18:02 Ulrich Müller
2022-03-24  6:44 Ulrich Müller
2021-07-28  7:53 Ulrich Müller
2021-04-20 18:13 Ulrich Müller
2021-04-13  7:43 Ulrich Müller
2021-04-13  7:27 Ulrich Müller
2021-04-13  7:15 Ulrich Müller
2021-04-13  7:15 Ulrich Müller
2021-04-13  7:12 Ulrich Müller
2021-04-13  7:12 Ulrich Müller
2021-04-12 19:09 Ulrich Müller
2021-03-22  9:00 Ulrich Müller
2020-09-25 17:58 Ulrich Müller
2020-08-04 14:37 Ulrich Müller
2020-02-22 11:42 Ulrich Müller
2019-12-22 12:34 Ulrich Müller
2019-12-21 18:54 Ulrich Müller
2019-12-21 18:30 Ulrich Müller
2019-09-09  8:25 Ulrich Müller
2019-08-17 22:08 Ulrich Müller
2018-06-01 18:07 Ulrich Müller
2018-06-01 18:07 Ulrich Müller
2018-02-22 13:25 Ulrich Müller

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=1618254061.ed7745256875f460578f0ecd8adbf9724cede1ae.ulm@gentoo \
    --to=ulm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /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