~ubuntu-branches/ubuntu/jaunty/debtags/jaunty

« back to all changes in this revision

Viewing changes to doc/faq.rst

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2007-06-14 12:25:35 UTC
  • Revision ID: james.westby@ubuntu.com-20070614122535-m6bjawdvw9e6lfuk
Tags: 1.7.0ubuntu1
* Merge with Debian, remaining changes:
 - edit sources.list to use /usr/share/debtags instead of apt:/
 - include vocabulary.gz installed to /usr/share/debtags (edit Makefile.am)
 - edit get_tabs and get_vocabulary to use anonymous svn and rerun autogen.sh

Show diffs side-by-side

added added

removed removed

Lines of Context:
135
135
 
136
136
 
137
137
What does a notation such as "works-with::image:raster" mean?
138
 
------------------------------------------------------
 
138
-------------------------------------------------------------
139
139
 
140
140
It means that the facet (the point of view from which we look at the packages)
141
141
is "works-with", and that the tag (what kind of data this package can handle) 
271
271
ignored by package managers, using debtags instead.
272
272
 
273
273
 
 
274
How come there are different sets of tags in the Packages file and in ``/var/lib/debtags``?
 
275
-------------------------------------------------------------------------------------------
 
276
 
 
277
There are a few reasons:
 
278
 
 
279
 * Debtags supports merging different tag sources: for example, iterating.org
 
280
   provides a tag source with package rankings and debtags is able to download
 
281
   it and merge it to the other tags.  Tag sources are listed in
 
282
   ``/etc/debtags/sources.list``.  This also allows some of us to use the
 
283
   unreviewed tags on Alioth instead of the ones in the Package database.
 
284
 * For many applications the tags are easier to access when aggregated on a
 
285
   small file rather than by parsing the very large package database
 
286
 * Finally, the debtags database in ``/var/lib/debtags`` is also indexed for
 
287
   fast access.
 
288
 
 
289
Have the Packages file as the primary tag storage has never been the main idea,
 
290
although it's turned out to be useful to allow tags to be useable in
 
291
software such as apt-cache, aptitude and grep-dctrl without them having to be
 
292
modified to access an extra database.
 
293
 
 
294
 
 
295
The Packages file has tags like ``network::{client,server,service}`` and this breaks ``grep-dctrl``
 
296
---------------------------------------------------------------------------------------------------
 
297
 
 
298
Those compressed tags are there because APT does not like long lines.
 
299
 
 
300
You can use ``debtags dumpavail`` to feed data to grep-dctrl without the
 
301
compressed tags.
 
302
 
 
303
``debtags dumpavail`` also supports tag expressions, so you can even run
 
304
commands like::
 
305
 
 
306
        debtags dumpavail 'role::program && game::*' | grep-dctrl <options>
 
307
 
 
308
 
274
309
-----------
275
310
Development
276
311
-----------
278
313
How can I experiment writing applications using debtags?
279
314
--------------------------------------------------------
280
315
 
281
 
You can have a look at `libapt-front-dev`_, which allows access to both debtags
282
 
and apt package data and is a really good C++ library.  Thanks to the work of
283
 
Torsten Marek, it may soon have Python bindings.
 
316
For C++, have a look at `libept-dev`_, which allows access to both
 
317
debtags and apt package data.
 
318
 
 
319
For Python, the `python-debian`_ package has a good ``debtags`` module and
 
320
various interesting code examples.
284
321
 
285
322
..
286
323
 , which also has python__ and perl__
337
374
.. _libapt-front: http://libapt-front.alioth.debian.org/
338
375
.. _libdebtags1-dev: http://packages.debian.org/libdebtags1-dev
339
376
.. _libapt-front-dev: http://packages.debian.org/libapt-front-dev
 
377
.. _libept-dev: http://packages.debian.org/libept-dev
340
378
.. _packagebrowser: http://debian.vitavonni.de/packagebrowser/
341
379
.. _packagesearch: http://packagesearch.sourceforge.net/
342
380
.. _theorical foundation: http://debtags.alioth.debian.org/faceted.html
343
381
.. _Alioth project: http://debtags.alioth.debian.org/
 
382
.. _python-debian: http://packages.debian.org/python-debian