Rewriting the debtags package

Enrico Zini enrico at enricozini.org
Sat Oct 25 13:09:05 UTC 2014


Hello,

I've recently uploaded a new version of debtags, in view of jessie, that
disables merging tag sources. I feel that debtags is rather
overengineered, and 10 years after it was started as an experiment I
want to scale it down to match the actual reality.

So, with regards to tag data inside an installed system, tags are
distributed within the apt Packages files, and "debtags update" only
copies tag data from apt to /var/lib/debtags/package-tags, so that
applications that want to load the entire tag database in memory can do
so quickly without needing to scan the entire package database.

This means that the debtags command itself can be simplified a lot:

  debtags cat   -> can be replaced by cat /var/lib/debtags/package-tags
  debtags check -> was never used afaict, it can be removed
  debtags diff  -> was never used afaict, it can be removed
  debtags dumpavail -> can be replaced by apt-cache dumpavail
  debtags show  -> can be replaced by apt-cache show
  debtags vocfilter -> was never used afaict, it can be removed
  debtags grep  -> can be reimplemented using apt-xapian-index
  debtags search -> can be replaced by axi-cache search

What is left is:

 - "debtags tag {add|rm|ls}" and "debtags submit" that can be used to
   submit patches to debtags.debian.net via the command line.
 - tagcat, tagshow, tagsearch that query the tag vocabulary
 - "debtags update"

Rather than refactoring the C++ code of debtags (which depends on
libept, and I'd like to get rid of libebt), I'd just rewrite everything
in python3, so that we get an "Architecture: all" package to ship with
the rest of the vocabulary:

 - debtags update -> can be implemented running "apt-cache dumpavail"
   or "grep-aptavail -sTag ." via subprocess.Popen and parsing its
   output.
 - debtags grep -> can be implemented in axi-cache instead of debtags
 - tagcat, tagshow, tagsearch -> can be implemented with the module
   debian.deb822 in python3-debian
 - "debtags tag {add|rm|ls}" and "debtags submit" can be reimplemented
   as-is or rewritten with a better interface

And then Enrico Rossi pointed out that it needn't necessarily be me
doing the rewrite.

Please reply to this message if you're interested. I'm excited at the
idea of not being the only one writing/maintaining bits of debtags.


Enrico

-- 
GPG key: 4096R/E7AD5568 2009-05-08 Enrico Zini <enrico at enricozini.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/debtags-devel/attachments/20141025/756712a8/attachment.sig>


More information about the Debtags-devel mailing list