On 10/5/24 20:27, vixfwis wrote:
Hi all,
Is this something pacman devs would be interested in adding to pacman? I
found myself wanting such a feature a couple of times in the past, and
after a recent reddit post I tried to make it a thing
https://github.com/vixfwis/pacman <https://github.com/vixfwis/pacman>
https://github.com/vixfwis/pacman-xdata
<https://github.com/vixfwis/pacman-xdata>
Common use case - adding and searching for user notes in installed
packages. Those notes would be inside the %XDATA% field in localdb. My
current implementation has a simple --xdata <key>=<value> param for -S-U
operations, which is then added to the current transaction packages in
sync_prepare_execute. As well as -Q --xdata-search <regex> param, which
allows for searching. Changes affect pacman and libalpm, although no
existing exported libalpm functions were changed
What do you think?
I am OK with this idea.
Some immediate thoughts:
1) On -S operations, should notes be added to all packages installed or
only those specifically mentioned on the command line. I think the
latter (but potential interesting interaction with group selection?)
2) only user notes should be transferred across package upgrades. If a
package file has an xdata field for one release and not the next, it
should not be transferred. Does pacman need to add a "user:" prefix to
the xdata to handle this?
2b) should notes with a "user:" prefix be printed with -Qi and not just
-Qii?
3) we need a way to delete notes. -D seems the best place for this (and
for adding notes to already installed packages).
Allan