You are not logged in.

#1 2015-08-30 20:38:58

null_radix
Member
Registered: 2015-08-30
Posts: 2

annotate/tag packages

Hi,
I would like to be able to annotate packages that I install so I can remember why I installed the later. For example; let say im working on a QT project and have to install a bunch of dependence to build.  Lets say I annotate those packages "QTproject" After I'm done with the project I would like to easly clean up and uninstall all the packages with the tag "QTproject". Is this possible some how?

Thanks

Offline

#2 2015-08-31 05:54:10

mauritiusdadd
Member
From: Benevento, Italy
Registered: 2013-10-27
Posts: 776

Re: annotate/tag packages

From what I know, that is not possible using pacman, but an easy way to do it is to keep track of the packages using plain text files which act as tags, for example:

# saving packages list to a file
echo "dependecy1 dependency2 dependency3" > ~/QTproject.pkgs

# installing packages "tagged" as QTproject
cat ~/QTproject.pkgs | pacman -Syu -

# removing packages "tagged" as QTproject and their dependencies
cat ~/QTproject.pkgs | pacman -Rns -

About me - github

-- When you have eliminated the impossible, whatever remains, however improbable, must be the truth -- Spock | Sherlock Holmes

Offline

#3 2015-08-31 14:32:54

null_radix
Member
Registered: 2015-08-30
Posts: 2

Re: annotate/tag packages

Thanks mauritiusdadd,
That works but it would be really nice if the tag info could be stored in pacman's db. That way I don't have to worry about cleaning up old files, ect. I havn't looked into it yet but if it is using leveldb or sqlight it shouldn't be hard to write a script  to do this.

Offline

#4 2015-08-31 19:13:51

runical
Member
From: The Netherlands
Registered: 2012-03-03
Posts: 896

Re: annotate/tag packages

Make a feature request against pacman if you think this would be a useful feature smile

On the other hand, a way to do it is to create a dummy package for projects and add the packages you need for that as a dependency. If by install reason you mean installing optdepends of other packages and having to manage them, Xyne made a nice script that can add dependencies to existing packages: https://aur.archlinux.org/packages/makedep/

Offline

#5 2015-09-08 18:05:54

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: annotate/tag packages

Offline

Board footer

Powered by FluxBB