Pamac Feature Request: Personal Comments

Coming from LinuxMint some years ago, they had a feature in its package manager where you could add comments to packages. I found that a little bit annoying, since there were a few users who misbehaved and littered their similar-looking comments in almost all the packages, just so they could (most likely) gain more “reputation” points. The more comments you added, the more points you got (I guess somewhat comparable to how stackoverflow works, I don’t like the idea).

This is not what I’m looking for! No thanks!

What I had in mind was if it were possible to add something to allow comments to packages that you have installed (manually or as dependencies), e.g. why you had them, or why they were, installed, what you thought about the package, et cetera and so forth. A sort of manual logging/reminder feature for your own benefit and future self.

I find that “Installed as a dependency for another package” a tad limiting. My question is: Which package? Why can’t you tell me? You should know.

If there were a commenting feature you could add this info for yourself so you don’t have to go hunting on your computer for the info (I’m sure there are ways to do so).

Three years on, it might not be so easy to remember anymore why that package found its way into your machine, but having a log telling you — in your own words — exactly why you did it, might actually come in handy.

Today I installed libvoikko to silence an error in the minimal IDE/text editor Geany (there are two similar errors left) and came up with that idea, because I have no immediate need for the features voikko adds, since I don’t speak Finnish, but Geany wants it in order to keep quiet about it.

I don’t really care where such a log file is saved, but I think it would be better to keep it under root’s control so you need sudo to change it. But that’s me. 8)

Now I hear protesters gathering in the hallway. Let me just say to them:
Yo! I know can store the info in a simple text file that I can save in my home directory and keep track of myself. It’s just that having to do so is something extra you need to remember to do. Having your own comment starring you in the face when you found that package in Pamac, makes it far easier to remember. 8)

My 2¢ worth.

Thanks for reading. 8)

You can just click on the tab Dependencies and see “Required by”.
Just saying, i know this is not your point.

1 Like

The log produced when installing something is /var/log/pacman.log.

This is in turn created by libalpm - the backend for pacman - which is provided by upstream Arch Linux.

As such the possibility of adding comments to the log file does not seem available.

I am curious though - and while I am not bored - it is peeking my interest into looking into it.

Another member is working on a project called logKonsult - which has some editing functions build-in - I have mentioned this topic at [GUI APP] logkonsult - view pacman logs (Qt6) - #5 by linux-aarhus

2 Likes

by design, logkonsult only parses the last few days!
So it usually won’t find an installation note because it’s too old.

But, indeed, writing notes in the pacman log file seems like a good idea, just duplicate the installation line and modify it. This could give :

grep '\[INFO\]' divers/pacman.local.log -B1
[2024-06-12T13:57:37+0200] [ALPM] reinstalled python-requests (2.32.3-1)
[2024-06-12T13:57:37+0200] [INFO] python-requests not nice, use .venv
--
[2024-06-14T18:28:28+0200] [ALPM] installed nuitka (2.3-1)
[2024-06-14T18:28:28+0200] [INFO] nuitka todo make a simple test and remove
--
[2024-06-15T01:13:19+0200] [ALPM] installed bottom (0.9.6-1)
[2024-06-15T01:13:19+0200] [INFO] bottom installed for test, to remove if not used

However, after uninstalling, you should also plan to delete the note, otherwise it will be confusing. So, probably another file is easier to manage.


Note / idea

with new pacman(alpm) we have a new field Extended, but is it possible to make it persistent after update ? I don’t think so.

$ pacman -Qii pacman
...
Extended Data   : None

$ pacman -Qii zstd
...
Extended Data   : pkgtype=pkg

But perhaps it’s possible to inject data in Extended from a text file automatically (hook) after updating ???
This deserves a test (and maybe pamac can display this field?).

for this moment only 2 entries exists in all database with one key :

Extended Data   : pkgtype=pkg
Extended Data   : pkgtype=split

The extended data type used to store non-standard package data fields

yes it’s possible to give several keys :

alpm_pkg_get_xdata: Gets the extended data field of a package. @param pkg a pointer to package @return a reference to a list of alpm_pkg_xdata_t objects


After edit /var/lib/pacman/local/wxwidgets-common-3.2.5-1/desc file : YES (and no errors with -Qkk )

pacman -Qii wxwidgets-common
Nom                      : wxwidgets-common
Version                  : 3.2.5-1
...
Extended Data   : pkgtype=split
                  note=I can add some infos in package ? 

3 Likes

The idea was that this feature should (preferably) not interfere with other logging features. IOW, if a user doesn’t bother with creating any comments, his comment log will be an empty file, whereas someone who comments on everything might have a log that is chock full of more or less interesting things to help investigating what needs to change, or not.

I was simply searching for a method of placing a comment next to the library I installed, telling future me why it’s there. The feature also should be easy for new users to detect, so hiding it through some command line options might be obfuscating it a bit too much. I don’t know, maybe?

Thinking more about this, of course there should be a way to tell from somewhere within Pamac, that indeed, there are comments written and for which packages, so they are easy to find again.

If it’s more cumbersome to have a separate log for comments, by all means, the coders can create whatever they want. Something is better than nothing. 8)

Recalling events from three months ago would be tricky for me if I did not have notes

having a log telling you — in your own words — exactly why you did it, might actually come in handy.

I can confirm that having a system changelog has been really useful for minimising system downtime

I store information in text files on a separate data partition

…It’s just that having to do so is something extra you need to remember to do

If remembering is a problem, write it down - make a checklist of tasks for updating:

  1. read forum announcement
  2. check mirrors are up to date
  3. open personal journal in geany
  4. update system and create notes in journal
  5. vote in forum poll and report any issues

Obviously, this is not what I had in mind. I was thinking object orientation: one place to make a change. I think it’s better to use one handler for logs and comments about those things and my idea was based on that maybe Pamac could do it.

Okay, one vote against the idea.

Nobody else got anything to say?

Every program has its purpose. A package manager does not have the task of collecting personal notes. External programs are better suited for this purpose. In addition, the more user-friendly a program becomes, the more complex it becomes, as well as the greater the administrative effort and thus the likelihood of errors. It is enough if Pamac alone takes care of the packages and displays and manages them in a user-friendly way.

2 Likes