diff options
author | Ulrich Müller <ulm@gentoo.org> | 2024-10-08 22:46:07 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2024-10-08 22:46:07 +0200 |
commit | bbd051a0cbd87e5baba9331f32ffd0b3cec430f6 (patch) | |
tree | 78d3d44a049043d6b4538f8eb974c0f1117e4661 | |
parent | Update URL in comment (diff) | |
download | ebuild-mode-bbd051a0cbd87e5baba9331f32ffd0b3cec430f6.tar.gz ebuild-mode-bbd051a0cbd87e5baba9331f32ffd0b3cec430f6.tar.bz2 ebuild-mode-bbd051a0cbd87e5baba9331f32ffd0b3cec430f6.zip |
Remove fallback to profiles.desc
* ebuild-mode.el (ebuild-mode-arch-stable-list): Don't fall back
to profiles.desc to determine whether an arch has stable keywords.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | ebuild-mode.el | 26 |
2 files changed, 9 insertions, 20 deletions
@@ -1,5 +1,8 @@ 2024-10-08 Ulrich Müller <ulm@gentoo.org> + * ebuild-mode.el (ebuild-mode-arch-stable-list): Don't fall back + to profiles.desc to determine whether an arch has stable keywords. + * Makefile (EMACSFLAGS): Use single hyphen for compatibility. * ebuild-mode.el (ebuild-mode-collect-and-split): Preserve order. diff --git a/ebuild-mode.el b/ebuild-mode.el index d0a25e0..9f4b3c2 100644 --- a/ebuild-mode.el +++ b/ebuild-mode.el @@ -150,33 +150,19 @@ Returns non-nil if A is less than B by Gentoo keyword ordering." (defvar ebuild-mode-arch-stable-list (or - ;; try to read arches.desc (GLEP 72) first, then profiles.desc + ;; try to read arches.desc (GLEP 72) first (condition-case nil (with-temp-buffer (insert-file-contents-literally (concat ebuild-mode-portdir "/profiles/arches.desc")) - (let (arch archs) + (let (archs) (while (re-search-forward "^[ \t]*\\([^ \t\n#]+\\)[ \t]+\\(stable\\|transitional\\)\\>" nil t) - (setq arch (match-string 1)) - (and (not (member arch archs)) - (member arch ebuild-mode-arch-list) - (push arch archs))) - (sort archs #'ebuild-mode-arch-lessp))) - (file-error nil)) - (condition-case nil - (with-temp-buffer - (insert-file-contents-literally - (concat ebuild-mode-portdir "/profiles/profiles.desc")) - (let (arch archs) - (while (re-search-forward - "^[ \t]*\\([^ \t\n#]+\\)[ \t]+[^ \t\n#]+[ \t]+stable\\>" - nil t) - (setq arch (match-string 1)) - (and (not (member arch archs)) - (member arch ebuild-mode-arch-list) - (push arch archs))) + (let ((arch (match-string 1))) + (and (not (member arch archs)) + (member arch ebuild-mode-arch-list) + (push arch archs)))) (sort archs #'ebuild-mode-arch-lessp))) (file-error nil)) ;; fall back to list of all architectures |