You are not logged in.

#1 2024-02-09 07:18:39

jcarrete
Member
Registered: 2020-03-09
Posts: 12

Pacman custom installation reason

Anyone know if there is a way to manually specify a reason for installing a package? If not, I think this would be a neat idea.

The problem I have:
I will install a package, X, for some obscure reason e.g. building a software package manually. Time will pass and I will forget why I had package X installed. When I go to clean my system of unneeded packages, I'll look at package X and wonder if I should uninstall it.

In this scenario, it would be cool if at the time I installed that package, I could type out a reason for installing the package e.g. "KDE dev dependency". This reason would be custom and more detailed than just saying "explicitly installed" or "installed as a dependency". Of course I could just make a text file and keep track there but it would be cool if pacman would track it for me.

What do you think?

Offline

#2 2024-02-09 08:03:11

mpan
Member
Registered: 2012-08-01
Posts: 1,536
Website

Re: Pacman custom installation reason

pacman has not such feature. The reason can be set only to “dependency” (--asdeps) or “explicit” (--asexplicit).

The closest you can get with the current version of pacman is creating a metapackage (e.g. named kde-dev-deps) with your packages as dependencies (`depends` array). You can then see a package among its dependencies. That’s inconvenient, though. Both for installing and removing packages.


Paperclips in avatars? | Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#3 2024-02-28 20:20:33

jcarrete
Member
Registered: 2020-03-09
Posts: 12

Re: Pacman custom installation reason

The meta package idea is interesting. I think I'll stick with that for now.

Offline

#4 2024-02-28 20:40:09

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,438
Website

Re: Pacman custom installation reason

As an alternative, you can just periodically review what's installed.  First, remove any orphans (covered in wiki), then get a list of explicitly installed packages that are not required by any other packages.  Every item on this list should be something you explicitly want / use - you shouldn't need to know *why* it was installed: if you don't still use it, then why it was installed is irrelevant, remove it.

Last edited by Trilby (2024-02-28 20:40:52)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2024-02-28 20:49:39

jcarrete
Member
Registered: 2020-03-09
Posts: 12

Re: Pacman custom installation reason

Yea, that's basically how I was currently handling the situation. But for things like developing KDE applications, I could easily see myself looking at a package and thinking it's okay to remove, but it's actually a build requirement for an application which might not be so easy to reinstall depending the time between when I removed the package and when it was needed again.

Offline

#6 2024-02-28 20:56:36

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,438
Website

Re: Pacman custom installation reason

Why would this be a concern?  When you rebuild the package that requires it, makepkg will pull in any build time dependencies automatically.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2024-02-28 21:03:30

jcarrete
Member
Registered: 2020-03-09
Posts: 12

Re: Pacman custom installation reason

I wouldn't be using makepkg to build the KDE application. I am using kdesrc-build. I suppose I don't have to use this tool though. I was following the guide on their wiki

Offline

#8 2025-11-16 15:37:49

SmallAndSimple
Member
Registered: 2015-11-25
Posts: 52

Re: Pacman custom installation reason

Trilby wrote:

As an alternative, you can just periodically review what's installed.  First, remove any orphans (covered in wiki), then get a list of explicitly installed packages that are not required by any other packages.  Every item on this list should be something you explicitly want / use - you shouldn't need to know *why* it was installed: if you don't still use it, then why it was installed is irrelevant, remove it.

This idea seems to work but falls sort of flat. For example, I have a custom OpenWeatherMap plugin for py3status. This is dependend on python-requests. Every now and again I go trough the list uninstall what I dont need and then break the plugin. Then I have to figure out again why.

I would still really like the custom install reason thingy.

Offline

#9 2025-11-16 16:09:24

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 71,532

Re: Pacman custom installation reason

Why is python-requests not listed as dependency for "a custom OpenWeatherMap plugin"?

Offline

#10 2025-11-16 21:21:56

SmallAndSimple
Member
Registered: 2015-11-25
Posts: 52

Re: Pacman custom installation reason

Ah, you are proposing that I turn my script into an actual package? That is not a bad suggestion indeed, thanks.

Offline

Board footer

Powered by FluxBB