Description
Hi all,
This is not a bug report, because practice has prove that XDG specs, linux users and common sense are ignored by Arduino project.
So, like in arduino/Arduino#7651, I'll just provide a patch that fixes the issue for linux users seeking to keep their home directories clean.
NOTE: This patch does not make any sense for Windows and Mac users. Sorry.
Some info about XDG base directory specification:
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html#introduction
Updated version: https://github.com/Perlovka/portage-overlay/blob/eeb083c401b7c2d45fcdbb08f0fe5e7b426ff15f/dev-embedded/arduino-cli/files/arduino-cli-0.19.3-xgd-compliance.patch
This version uses arduino for all directory names instead of arduino-cli
Also, used built in Go functions for UserConfigDir and UserCacheDir, which works also for Mac and Win users.
Latest version of the patch could always be found here: https://github.com/Perlovka/portage-overlay/tree/master/dev-embedded/arduino-cli/files
Directory layout after applying the patch:
~ $ ls -1 ~/.cache/arduino/
staging
tmp
~ $ ls -1 --group-directories-first ~/.local/share/arduino/
libraries
packages
inventory.yaml
library_index.json
library_index.json.sig
package_index.json
package_index.json.sig
This patch also fixed configDir path, that is mentioned here:
But seems that this value is currently not used elsewhere in the code.
Cheers, may Linux be with you.