On Estonian locale this can happen: xdg-desktop-menu: filename 'Uss-vm.directory' does not have a proper vendor prefix A vendor prefix consists of alpha characters ([a-zA-Z]) and is terminated with a dash ("-"). An example filename is 'example-Uss--vm.directory' Use --novendor to override or 'xdg-desktop-menu --manual' for additional info. The reason is usage of [a-zA-Z] in check_vendor_prefix function, without specifying explicit locale. In case of Estonian, 'z' isn't the last letter... Simple check: $ echo 'w' | LC_COLLATE=C grep -q '[a-zA-Z]'; echo $? 0 $ echo 'w' | LC_COLLATE=et_EE grep -q '[a-zA-Z]'; echo $? 1 It should either use explicit locale, or use '[[:alpha:]]' instead. Not sure which is better (and more compliant with the standard).
Thanks for the excellent report and diagnosis. In a perfect world [[:alpha:]] would be the way to go, but for compatibility's sake, LC_COLLATE=C may be safer and more portable. I'll try to review the whole code base this coming week, to ensure there are no other gotcha's like this one.
The code in question: check_vendor_prefix() { file_label="$2" [ -n "$file_label" ] || file_label="filename" file=`basename "$1"` case "$file" in [a-zA-Z]*-*) return ;; esac
Considering this code, (re)setting LC_ vars doesn't seem viable without rewriting. Replacing [a-zA-Z]*-*) with [[:alpha:]]*-*) seems to work. Re-reading http://standards.freedesktop.org/menu-spec/menu-spec-latest.html#merge-algorithm where it mentions vendor prefix, I see no mention of locale either. :(
http://cgit.freedesktop.org/xdg/xdg-utils/commit/?id=20649064301a06016af0e44060d771e058e033b3
is the [[:alpha:]] construct posix? do all shells support it? what shells you tested with?
Yes (according to bash man page at least), I don't know, bash, respectively
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.