1 |
commit: e67308394f12801aae8b004f2753a55c26f59635 |
2 |
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Aug 30 21:49:01 2019 +0000 |
4 |
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Aug 30 21:49:01 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=e6730839 |
7 |
|
8 |
Fix version comparison for Emacs 26.1 and later. |
9 |
|
10 |
* emacs-updater (action_rebuild): Drop the last component, |
11 |
i.e., the build number, from Emacs versions below 26 only. |
12 |
|
13 |
Bug: https://bugs.gentoo.org/693140 |
14 |
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> |
15 |
|
16 |
ChangeLog | 6 ++++++ |
17 |
emacs-updater | 5 ++++- |
18 |
2 files changed, 10 insertions(+), 1 deletion(-) |
19 |
|
20 |
diff --git a/ChangeLog b/ChangeLog |
21 |
index 45a594e..25f549d 100644 |
22 |
--- a/ChangeLog |
23 |
+++ b/ChangeLog |
24 |
@@ -1,3 +1,9 @@ |
25 |
+2019-08-30 Ulrich Müller <ulm@g.o> |
26 |
+ |
27 |
+ * emacs-updater (action_rebuild): Drop the last component, |
28 |
+ i.e., the build number, from Emacs versions below 26 only. |
29 |
+ Fixes bug 693140. |
30 |
+ |
31 |
2016-06-08 Ulrich Müller <ulm@g.o> |
32 |
|
33 |
* emacs-updater: Update URLs to use https. |
34 |
|
35 |
diff --git a/emacs-updater b/emacs-updater |
36 |
index 3133316..0bca953 100755 |
37 |
--- a/emacs-updater |
38 |
+++ b/emacs-updater |
39 |
@@ -237,6 +237,8 @@ action_rebuild() { |
40 |
ret=$? |
41 |
[[ ${ret} -eq 0 ]] || { failure "Error running Emacs"; exit ${ret}; } |
42 |
[[ ${active} ]] || { failure "Cannot determine Emacs version"; exit 1; } |
43 |
+ # Drop last component (build number) from versions below 26 |
44 |
+ [[ ${active%%.*} -lt 26 ]] && active=${active%.*} |
45 |
message "Currently selected GNU Emacs version: ${active}" |
46 |
|
47 |
for elc in $(find "${ROOT}${SITELISP}" -name "*.elc") |
48 |
@@ -245,8 +247,9 @@ action_rebuild() { |
49 |
ret=$? |
50 |
[[ ${ret} -eq 0 ]] || { failure "Error running sed"; exit ${ret}; } |
51 |
version=${version:-unknown} |
52 |
+ [[ ${version%%.*} -lt 26 ]] && version=${version%.*} |
53 |
|
54 |
- if [[ -z ${MAJOR} && ${version%.*} != "${active%.*}" ]] \ |
55 |
+ if [[ -z ${MAJOR} && ${version} != "${active}" ]] \ |
56 |
|| [[ ${version%%.*} != "${active%%.*}" ]] \ |
57 |
|| [[ $1 = all ]] |
58 |
then |