aura
aura copied to clipboard
--reason
Sometimes I need to install a dependency that's not marked as such (with Pacman's --asdeps), or otherwise install something that I'm only using indirectly. It's easy to forget why these are installed when I go back and look. This means I either leave things installed that I no longer need, or I uninstall things only to realise I actually needed them later on.
I wonder if an option like --reason="why I did this" could be useful to alleviate this? It'd just be stored somewhere by Aura and somehow displayed to the user when they're pondering why something is installed.
Not sure if this already exists (did have a quick look), and if not whether it really belongs here or wherever Pacman handles feature requests. :slightly_smiling_face:
Aura piggybacks on the Pacman database for all things related to actual installation of packages. In alpm.h we find the following install reasons:
/** Package install reasons. */
typedef enum _alpm_pkgreason_t {
/** Explicitly requested by the user. */
ALPM_PKG_REASON_EXPLICIT = 0,
/** Installed as a dependency for another package. */
ALPM_PKG_REASON_DEPEND = 1
} alpm_pkgreason_t;
So unfortunately only two, and with no extra associated information like a custom string, as you're looking for.
Aura could have its own side database, but that would be a very new thing. I could consider it for the upcoming Aura 4.0, but would need to put some serious thought into it. For now we can leave this issue open.
I like the idea. Let's try ping pacman/libalpm team first, shall we? I don't think such extension would be a breaking change for their database scheme.
Do you mean extending the _alpm_pkgreason_t enum? That would indeed be breaking in a number of places, since a number of places in their code assumes a reason of only one or the other.
No way. Just throw one more key-value table at it. As well as separate pair of getter/setter for such extended info.
I was actually just looking for this feature. Old issue, but definitely +1 on this from me.