Basically, this is what's happening: ``` $ euse -p x11-libs/wxGTK -E webkit ERROR: Invalid package atom. Did you forget the leading '='? $ euse -E static-libs -p media-libs/qhull Adding "media-libs/qhull[static-libs]" use flag in "/etc/portage/package.use/qhull" ``` Since it's failing consistently and only for the first atom and none others, I decided to investigate and stick a few print statements into `euse`. I've found out that the internal `${V}` is set to "GTK", which is what triggered that error handling code path. Having stared into that function long enough, I realized that the underlying issue is the regex using `a-z` to separate the name from the version. And since no capital letters matching this class, they end up in the version group. Reproducible: Always Steps to Reproduce: sudo euse -p x11-libs/wxGTK -E webkit Actual Results: ERROR: Invalid package atom. Did you forget the leading '='? Expected Results: Adding "x11-libs/wxGTK[webkit]" use flag in "/etc/portage/package.use/wxGTK" I must note that I copied all the names from the `emerge freecad` output, which added to the confusion because I *knew* it exists, but still, `euse` was gaslighting me. Here's my patch that addresses the issue to the extent it affects me. I'll send a PR on GH. ``` --- /usr/bin/euse 2024-09-10 11:15:42.000000000 +0200 +++ euse 2024-10-09 14:00:49.033925301 +0200 @@ -294,7 +294,7 @@ # Flip signs of use.mask (it's interpreted oppositely), ACTIVE_FLAGS[6]=$(reduce_incrementals_trump \ $(cat $(traverse_profile "use.mask") | sed -re "/^#.*$/{d}") \ - | sed -re "s/(^| )-[^ ]*//g" -e "s/(^| )([a-z0-9])/ -\2/g") + | sed -re "s/(^| )-[^ ]*//g" -e "s/(^| )([a-zA-Z0-9])/ -\2/g") ACTIVE_FLAGS[7]=$(reduce_incrementals \ $(cat $(traverse_profile "use.force") \ | sed -re "/^#.*$/ {d}")) @@ -1024,7 +1024,7 @@ modify_package() { get_useflags - local atom_re="^[<>]?=?([a-z][0-9a-z/-]+[0-9a-z])(-[0-9pr._*-]+)?" + local atom_re="^[<>]?=?([a-zA-Z][0-9a-zA-Z/-]+[0-9a-zA-Z])(-[0-9pr._*-]+)?" local pkg=$(echo "${PACKAGE}" | sed -re "s/${atom_re}/\1/") local V=$(echo "${PACKAGE}" | sed -re "s/${atom_re}/\2/") local pkg_re="[<>]?=?${pkg}(-[\dpr._*-]+)?" ```