We see that programs like apt-get
store information in several places:
/var/cache/apt <- cache
/var/lib/apt <- keyrings, package db, states, locks, mirrors
/etc/apt <- configuration file
~/.aptitude/config <- user configuration file
So we see four kinds of paths here:
- Cache path
- Data path
- System-wide configuration
- User configuration
Perhaps (1) can be made part of (2) for simplicity sake. Can anyone think of ways to get such appropriate paths in platform-independent way? Is there a library that does this, or does one have to invent this wheel?