Dear Maintainer,
Thank you for maintaining aptitude for as long as you have. For
reasons unknown, aptitude hasn't used free desktop basedir
specifications while quite a few desktops and other software has
moved.
See https://specifications.freedesktop.org/basedir-spec/basedir-spec-0.6.html
for the latest spec.
The one which I am concerned about is in the environment variables -
$XDG_CONFIG_HOME defines the base directory relative to which user
specific configuration files should be stored. If $XDG_CONFIG_HOME is
either not set or empty, a default equal to $HOME/.config should be
used.
I can understand that there exists a possibility of breakage if the
change is introduced in the next release or something.
I am basing this from the info. in the manpage at the bottom -
FILES
/var/lib/aptitude/pkgstates
The file in which stored package states and some package
flags are stored.
/etc/apt/apt.conf, /etc/apt/apt.conf.d/*, ~/.aptitude/config
The configuration files for aptitude. ~/.aptitude/config
overrides /etc/apt/apt.conf. See apt.conf(5) for documentation of the
format and contents of these files.
Hi shirish, shirish शिरीष wrote: That's not completely true. Aptitude already cares about $XDG_CACHE_HOME. A cache is easy to throw away and rebuilt, so changing that directory was easy. Moving around config files is way more difficult to do right. And we're not developers of a desktop environment who don't care if the user's configuration from the last release still works with our next release. So I'm rather reluctant to change anything on the configuration paths. Yes. Yes. aptitude currently does not use $XDG_CONFIG_HOME, just $XDG_CACHE_HOME. Please note that this is not a user-specific file but a system-specific file and has nothing to do with user settings. These are APT's system-wide configuration files. The same applies here. That's the only file affected and changing it means: * to adapt code to look for aptitude's configuration file in more than one location. * to decide to which file aptitude writes its configuration when the user changes something inside aptitude and multiple files exist. * to potentially have code inside aptitude which _reliably_ moves $HOME/.aptitude/config to $XDG_CONFIG_HOME/aptitude/config. * to potentially remove $HOME/.aptitude/ if empty. * to educate users about that change. I'm not sure if that's really worth the effort. IIRC we discussed that already once in the past when $XDG_CACHE_HOME got implemented and decided against it at least back then. Regards, Axel
Reply in-line :- True, didn't think about that part. True as well, The only problem is every time I do a new installation for someone or even myself I do tend to look for aptitude config file in ~/.config/aptitude rather than ~/.aptitude/config. Also from what I can gather or understand and correct me if I'm wrong - ~/.aptitude/config is also a user created file . I double checked by removing aptitude and installing aptitude . That conversation probably happened in 2015 as that is when I was trying to get some info. on why apt, aptitude are the way they are - https://unix.stackexchange.com/questions/308567/how-do-i-find-out-where-the-configuration-file-for-apt-is-located https://unix.stackexchange.com/questions/235667/till-what-depth-can-aptitude-v-verbose-work I do understand where you are coming from. I wish I had more data points, the only other culprit I know is .mozilla which also tends to have its own configuration file rather than being in ~/.config/$PKG as most are doing irrespective of whether or not they are part of desktop environments or not. Even mpv (a shell based media player) has changed its configuration file from ~/.mpv/config to ~/.config/mpv but as shared by you aptitude has its own users and its own history. The only way forward is maybe to have baby steps moving in that direction goading people to move to ~/.config/aptitude but both as upstream contributor and a packager it's really your call. You could use NEWS to share that upcoming change if you so wish. I probably will open a thread on debian-devel just to have a feel of what people think. I'm sure there will be backlash but who knows, let's see.
Hi, I support the idea of aptitude using XDG_CONFIG_HOME for its configuration. Its been a while since this bug has been reported, and now, a few years later down the line many programs use XDG_CONFIG_HOME and there's not many programs left that pollute the home directory with their config files. I appreciate Axel's concern about moving configuration files around and want to propose a workflow that might work: - try to read from the $XDG_CONFIG_HOME location first, and fallback to the old location if it does not exist - in case the old location has been used: migrate config to new location and notify users about - Eventually deprecate old location Migration timeline suggestion: - Version "stable": use migration logic from above. Prefer new location, fallback to old, migrate silently or with a warning - Version "next stable": warn more explicitly - Version "next next stable": drop support for the old location entirely I'm not suggesting this "stable" of course, as its too late for that but the general idea. What do you think? Cheers, Bastian