[Debtags-devel] What about the lonely tags?

Enrico Zini enrico at enricozini.org
Mon Nov 14 12:35:46 UTC 2005


On Sat, Nov 12, 2005 at 05:42:50PM +0100, Torsten Marek wrote:

> what is happening with the lonely tags (= tags without facets)?
> I just had a look at the new package browser and the tagging interface, and they
> were taking up some space.
> Currently, these are (grep "Tag: [0-9a-z\-]*$" debian-packages)
> Tag: educational
...
> Tag: vi
> As it seems, no packages use these tags. Can they be removed?

Almost.  Here's what is happening:

 - Those tags are still available in Erich's packagebrowser: you can see
   them in the tag database at
   http://debtags.alioth.debian.org/tags/tags-current.gz
 - Since the various debtags code assumes tags to have a facet, during
   "debtags update" those tags are automatically assigned the facet
   "legacy".  This is why you don't see any package using those tags.

What would need to be done would be to rename those tags into their
faceted counterparts.  Unfortunately, this is not always easy to do:

 - some of them are too broad: "netcomm, protocols"
 - some of them don't have a place in the vocabulary, like "office"
   (for office, the idea is that "office" is more like a marketing thing
   and categories should be more meaningful, such as editing, drawing
   and so on)

So, what would need to be done would be to check the packages that have
those tags, and try to replace those tags with one of the other faceted
ones, or to remove them when all the information they convey is already
expressed by the other faceted tags.  For example, one could remove
'protocols' when a package already has one of the 'protocol::*' tags.

To do this work, tagcoll and tagcolledit may come useful.  Here is an
exaple:

  # Fetch the unmangled archive
  wget http://debtags.alioth.debian.org/tags/tags-current.gz
  gunzip tags-current.gz

  # Find the 'protocols' tags of packages that don't have a
  # corresponding protocol::*
  taggrep 'protocols && !protocol::*' tags-current  > protocols

  # Make a working copy, keeping the original around
  cp protocols protocols.edited

  # Edit the subcollection
  #  - right click opens useful context menus pretty much anywhere
  #  - remember to save: there's no autosave like in debtags-edit
  #  - Edit/Undo works
  tagcolledit protocols.edited

  # Create a patch.
  tagcoll diff protocols protocols.edited > patch

  # Submit the patch.  This cannot be submitted using "debtags submit"
  # as debtags will mangle the unfaceted tags.
  (echo "-- DEBTAGS DIFF V0.1 --"; cat patch) > attachment
  echo "" | mutt -a attachment -s "Tag patch" debtags-submit at vitavonni.de
  

Ciao,

Enrico

--
GPG key: 1024D/797EBFAB 2000-12-05 Enrico Zini <enrico at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/debtags-devel/attachments/20051114/2a403e5c/attachment.pgp


More information about the Debtags-devel mailing list