Debtags Frequently Asked Questions

Table of contents:

General

What is Debtags?

Debtags is a set of categories to describe Debian packages.

It provides a vocabulary of categories as well as tag information for the packages.

Where can I find information about debtags?

On Debtags you can find an index.

Where are debtags used?

Higher-level package managers such as software-center, synaptic and aptitude all supports debtags in some way.

If you would like to create some high level package tool, you could build on apt-xapian-index, which is a package information backend which supports debtags and much more.

Why aren't debtags integrated with apt?

They probably don't need to be integrated with apt, whose main purpose is to resolve dependencies and figure out what packages to install.

apt-cache, however, does show the tags of a package.

What are future plans and perspectives?

debtags is rather mature, and not much is expected to happen besides regular maintenance.

If you are looking for exciting new work you can look at the Appstream project.

Is there a debtags mailinglist?

Yes: debtags-devel, on Alioth can be used for anything about debtags, not just development. You are more than welcome to subscribe to it.

Using the data

What is a facet?

A facet is a group of tags which describe the same quality of a package. For more informations, see Debtags/FacetedClassification.

What does a notation such as "works-with::image:raster" mean?

It means that the facet (the point of view from which we look at the packages) is works-with, and that the tag (what kind of data this package can handle) tag: image:raster.

In other words, works-with::image:raster should be read as "Looking at what kind of data a package can handle, this package handles raster images".

Is debtags a hierarchy of tags?

No, there are only 2 levels: the facets and the tags. Some tags are written with a colon (:) in them, such as image:raster in the works-with facet, but that is just part of the tag name.

Tag names are ugly. Are there nice descriptions?

Yes, the debtags vocabulary contains short and long descriptions for each tag. In its raw form it can be downloaded at http://debtags.alioth.debian.org/tags/vocabulary.gz

If you have debtags installed in your system, you can also access the tag vocabulary locally at /var/lib/debtags/vocabulary

Providing new data

Where can I add tags in my packages?

Everyone can add tags in every package, using the interface at http://debtags.alioth.debian.org/todo.html and http://debtags.alioth.debian.org/edit.html

What if I feel like I need a new tag?

You post to ?debtags-devel@lists.alioth.debian.org asking for it to be added.

Before doing that, please read What makes a tag good for being added to the vocabulary?

Is there a debtags-policy?

No, there hasn't been a need for it yet.

Can I create my own set of tags and add them to all the packages I want?

Yes: see Debtags/CustomTags. This has been used, for example, for parental ratings for games

What makes a tag good for being added to the vocabulary?

This is a list of rule-of-thumb criteria:

Remember that categorisation in Debtags happens with a combination of tags; this means that instead of having a "dvdplayer" tag, we have the combination use::playing, works-with::video, hardware::storage:dvd.

These combinations also allow to create reasonable approximations of tags that should not be added because they are not yet used by many packages. For example, the tag devel::lang:brainfuck should not yet be added because the corresponding packages in Debian are too few, but it can be reasonably approximated using combinations of devel::interpreter, devel::compiler and use::entertaining.

Do you have tips for tagging?

Justin says:

Any reason why there are no ``license::`` tags in debtags?

It has been tried, but we had discouraging replies.

The main problem is that licensing information for a package are too complex to be represented in a single tag.

Please also read this thread in debian-devel for a discussion of other ways to implement this.

Integration in Debian

How can maintainers tag their packages?

They can go in their DDPO page and click on the "Reports: debtags" link to view the Debtags situation of their packages and edit their tags.

When does a new package get tagged?

New packages automatically get tagged using a set of heuristics. That is better than nothing, but obviously it is not enough, so they are marked with special::not-yet-tagged tags in the web interface, waiting for a human to have a look.

Once a human does proper tagging of a package and removes the special::not-yet-tagged tags, the automatic tagging heuristics will not touch it anymore.

How do the tags reach the Debian archives?

Good tags are copied in the Packages file by means of an "override" file, which is a file that adds or overrides a field from the control file written by the package maintainers.

Tags are added to the override file after manual review, which should happen about once a month.

You can think of the tags in the override file as the "stable" tags and the ones in the debtags database as the "unstable" tags.

Why don't you just ask the maintainers to tag their own packages?

Giving the maintainers ultimate responsibility over the tags of their packages is difficult for many reasons:

Is there any plan to drop "Section:" ?

No, because they are useful for some archive management purposes.

How come there can be different sets of tags in the Packages file and in {{{/var/lib/debtags}}}?

Debtags supports merging different tag sources: for example, http://www.miriamruiz.es/weblog/?p=155 is an effort to provide parental rating for games in Debian, as tags to be downloaded and merged into the system. Tag sources are listed in /etc/debtags/sources.list. This also allows some of us to use the unreviewed tags on Alioth instead of the ones in the Package database.

Have the Packages file as the primary tag storage has never been the main idea, although it's turned out to be useful to allow tags to be useable in software such as apt-cache, aptitude and grep-dctrl without them having to be modified to access an extra database.

Why do I see mangled tags in the Packages file like "network::{client,server,service}"?

Those tags are compressed because APT does not like long lines.

You can use debtags dumpavail to feed data to grep-dctrl without the compressed tags.

debtags dumpavail also supports tag expressions, so you can even run commands like:

        debtags dumpavail 'role::program && game::*' | grep-dctrl <options>

Web interface

How does the web interface work?

It is explained in the web interface itself: go to http://debtags.alioth.debian.org/todo.html or http://debtags.alioth.debian.org/edit.html, choose a package, then click on the help link on top of the page.

Where do the tags added through the web interface get stored?

They are stored in a file on Alioth, which you can download at http://debtags.alioth.debian.org/tags/tags-current.gz

Enrico regularly fetches the updates to that file, does a manual review, then commits the reviewed updates to svn://svn.debian.org/debtags/tagdb/tags, which gets uploaded to Debian.

Development

How can I experiment writing applications that use debtags?

The best way is to look at apt-xapian-index, which is accessible from most programming languages via the Xapian libraries.

You can find a tutorial published as a series of blog posts, each post links to the next one.

For Python, the python-debian_ package has a debtags module and various code examples.

Otherwise, you just access the data files directly: when the debtags package is installed, you can find them in /var/lib/debtags.

And of course don't forget to subscribe to the debtags-devel mailing list, where you can ask for help.

How can I help?

You can help tagging packages.

You can write cool package interfaces using Debtags.

You can help to take care of this wiki.

If you have knowledge of some specific field, you can help improving the vocabulary.