Created attachment 413012 [details, diff] xdg-mime_awk_length.patch Busybox awk doesn't support syntactic abbreviation: length xdg-mime use this syntax, so when busybox is set as main shell or busybox awk set as main awk (following gentoo way through eselect sh and awk), personnal mime default application won't be considered. eselect awk set busybox xdg-mime query default x-scheme-handler/http awk: cmd. line:13: Unexpected token spacefm.desktop eselect awk set gawk xdg-mime query default x-scheme-handler/http firefox.desktop Seems to be an upstream bug, but as I don't have an account on freedesktop bug tracker, I'd like to ask another gentoo folk already having such account, to open one bug there. May be it's better this way, as known folks may have their issues more considered than newly registered account. P.S.: to track the wrong behavior of the script, I used root account as I needed to play with eselect (and was to lazy to switch window for every single test, or add sudo entry), this led me to another bug within xdg-mime: xdg-mime default firefox.desktop x-scheme-handler/https touch: cannot touch '/root/.local/share/applications/mimeapps.list': No such file or directory /usr/bin/xdg-mime: line 804: /root/.local/share/applications/mimeapps.list.new: No such file or directory
Comment on attachment 413012 [details, diff] xdg-mime_awk_length.patch we don't patch programs to work around tools that violate POSIX. this is a bug in busybox's awk implementation. http://pubs.opengroup.org/onlinepubs/9699919799/utilities/awk.html length[([s])] Return the length, in characters, of its argument taken as a string, or of the whole record, $0, if there is no argument.
hmm, it does support "length()" (i.e. omitting the $0), but it doesn't support omitting the paren altogether. moved to the upstream bugzilla tracker.
I already felt that checking if it was standard syntax was needed. Thanks, for all precisions.