Detect newer GCC, and quiet a desktop-file-validate warning - #2
Open
jason-c-dev wants to merge 1 commit into
Open
Detect newer GCC, and quiet a desktop-file-validate warning#2jason-c-dev wants to merge 1 commit into
jason-c-dev wants to merge 1 commit into
Conversation
The compiler search stopped at g++-15, so a machine whose only versioned compiler is g++-16 fell through to the plain-g++ fallback -- and if the default g++ happened to be older than 11, the script died with a message pointing at the wrong problem. Walking down from 30 costs a few builtin lookups and does not need touching again. Separately, desktop-file-validate warns on Categories=Office;Utility; value "Office;Utility;" for key "Categories" ... contains more than one main category; application might appear more than once in the menu Office alone is the accurate one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two small independent fixes found while reproducing the build on Arch. Split
from the checksum PR so they can be taken separately.
The compiler search stops at g++-15
GCC 16 is out, so this list is already one release stale and will go stale
again. The plain-
g++fallback rescues most systems — it's what saved my Archbox, where
g++is 16 — but it doesn't rescue the case the loop exists for:a machine whose only suitable compiler is installed under a versioned name
newer than the list, with an older default
g++. That combination dies withwhile
g++-16sits right there onPATH. The message points at the wrongproblem, which is the expensive part.
Changed to walk down from 30. It's a handful of
command -vbuiltin lookupsand won't need revisiting.
I tried deriving the list from
compgen -c 'g++-'first, which reads better,but
compgen -creturns nothing in a non-interactive shell — so it silentlyselects no compiler. Mentioning it in case it looks like the obvious cleanup
later; it isn't.
Categories=Office;Utility;trips desktop-file-validateBoth are main categories per the freedesktop menu spec, so some menu
implementations list the app twice.
Officealone is the accurate one.Testing
Full script run on Arch (gcc 16, glibc 2.42), Granola 7.522.2 / Electron
42.7.0 — builds and smoke-tests clean, compiler detection resolves to
g++ (16), anddesktop-file-validatenow passes with no hints.Unrelated, so not touched here:
StartupWMClass=granolais correct — Iconfirmed the window class really is
granolaunder Hyprland viahyprctl clients.🤖 Generated with Claude Code
https://claude.ai/code/session_01EaTeCExac9ue2MGZt7LL8a