Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I manage my packages with aptitude.

I occasionally go through my list of packages, removing obsolete applications (in the sense that I do not want to use them any more).

For example, while I have a limited number of development libraries on my system that I do want installed permanently, a lot were just there to allow me to compile some program from source once, and a long time ago. To make those clean-up sessions take unneeded dependencies into account, I use the markauto command of aptitude.

The problem is that I sometimes can no longer trust my memory to make the difference between packages that are transient, and things that I need to keep (because, e.g., I will need them to recompile something tomorrow). The situation is even more acute when I share administration duties over a server with another admin. Alternatively, I wish I would have the discipline to clean up all packages that are transient after use, but history proves it's too much to hope for.

Hence : is there a tool that, like markauto would let me annotate packages at installation time, not with a flag but with a simple comment string saying why they are being installed?

Ideally, that comment would be retrievable with aptitude (or synaptic, or whatever kids these days use to manage packages). Ideally, this would be something that me and another admin on the same server can collaborate on, and it would thus, for example, benefit from the same lock-management system as the package-tree already has.

share|improve this question

1 Answer 1

up vote 8 down vote accepted

Aptitude supports "user tags", see if they meet your requirements.

   add-user-tag, remove-user-tag
       Adds a user tag to or removes a user tag from the selected group of
       packages. If a package name contains a tilde ("~") or question mark
       ("?"), it is treated as a search pattern and the tag is added to or
       removed from all the packages that match the pattern (see the
       section "Search Patterns" in the aptitude reference manual).

       User tags are arbitrary strings associated with a package. They can
       be used with the ?user-tag(<tag>) search term, which will select
       all the packages that have a user tag matching <tag>.

Also see the options --add-user-tag, --add-user-tag-to, --remove-user-tag, --remove-user-tag-from. One example usage:

aptitude install cinnamon --add-user-tag "for=cinnamon; date=$(date)"

Nevertheless, I fear they are only visible/usable through aptitude.

share|improve this answer
    
Yes ! This is perfect ! Notable points : the user-tag is retrievable through aptitude show, displayed in the aptitude info dialog, and can be an arbitrary long string (with spaces, etc) –  huitseeker Aug 24 '11 at 16:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.