From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 67B61138334 for ; Fri, 30 Aug 2019 22:02:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5F97EE07F9; Fri, 30 Aug 2019 22:02:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4620FE07F9 for ; Fri, 30 Aug 2019 22:02:11 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AC29D34A6F9 for ; Fri, 30 Aug 2019 22:02:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1873B471 for ; Fri, 30 Aug 2019 22:02:07 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1567201741.e67308394f12801aae8b004f2753a55c26f59635.ulm@gentoo> Subject: [gentoo-commits] proj/emacs-tools:emacs-updater commit in: / X-VCS-Repository: proj/emacs-tools X-VCS-Files: ChangeLog emacs-updater X-VCS-Directories: / X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: e67308394f12801aae8b004f2753a55c26f59635 X-VCS-Branch: emacs-updater Date: Fri, 30 Aug 2019 22:02:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: cc2294a3-2494-45b2-bb95-26e0e1eecc48 X-Archives-Hash: 3d70a39ed4f0a8588759c194d8edb814 commit: e67308394f12801aae8b004f2753a55c26f59635 Author: Ulrich Müller gentoo org> AuthorDate: Fri Aug 30 21:49:01 2019 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Fri Aug 30 21:49:01 2019 +0000 URL: https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=e6730839 Fix version comparison for Emacs 26.1 and later. * emacs-updater (action_rebuild): Drop the last component, i.e., the build number, from Emacs versions below 26 only. Bug: https://bugs.gentoo.org/693140 Signed-off-by: Ulrich Müller gentoo.org> ChangeLog | 6 ++++++ emacs-updater | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 45a594e..25f549d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2019-08-30 Ulrich Müller + + * emacs-updater (action_rebuild): Drop the last component, + i.e., the build number, from Emacs versions below 26 only. + Fixes bug 693140. + 2016-06-08 Ulrich Müller * emacs-updater: Update URLs to use https. diff --git a/emacs-updater b/emacs-updater index 3133316..0bca953 100755 --- a/emacs-updater +++ b/emacs-updater @@ -237,6 +237,8 @@ action_rebuild() { ret=$? [[ ${ret} -eq 0 ]] || { failure "Error running Emacs"; exit ${ret}; } [[ ${active} ]] || { failure "Cannot determine Emacs version"; exit 1; } + # Drop last component (build number) from versions below 26 + [[ ${active%%.*} -lt 26 ]] && active=${active%.*} message "Currently selected GNU Emacs version: ${active}" for elc in $(find "${ROOT}${SITELISP}" -name "*.elc") @@ -245,8 +247,9 @@ action_rebuild() { ret=$? [[ ${ret} -eq 0 ]] || { failure "Error running sed"; exit ${ret}; } version=${version:-unknown} + [[ ${version%%.*} -lt 26 ]] && version=${version%.*} - if [[ -z ${MAJOR} && ${version%.*} != "${active%.*}" ]] \ + if [[ -z ${MAJOR} && ${version} != "${active}" ]] \ || [[ ${version%%.*} != "${active%%.*}" ]] \ || [[ $1 = all ]] then