Auto-propagation of tags for packages with versions in the name

Enrico Zini enrico at enricozini.org
Fri Dec 7 13:02:49 UTC 2007


Hello,

I added a module to the autotagger that tries to propagate tags for
those packages that have a version in the name, and therefore change
regularly.

The way it works is:

 1. It uses some regular expressions to derive a canonical name for
    every package.  Currently it's these two:

    # Shared libraries
    s/^lib(.+?)[0-9.]+$/\1/

    # Kernel modules
    s/^(.+)-modules-2.6.[0-9.-]+/\1/

 2. All packages that have a canonical name different than their
    original name, are grouped by canonical name.
 
 3. For every such group with more than 1 package in it, merge all the
    tags of all the packages in the group

 4. For every package in the group that has only special tags and no
    other tag, add all the packages from the merged tagset computed at
    step 3.

Just for this operation, the tag database is merged with an older
version, so that packages that just disappered from the archive still
contribute tags to the new ones.

This means that, *at every maintenance run* (every 6 hours):

 - new packages such as shlibs or kernel modules get tags from the old
   ones
 - if you have tagged only one of the many foo-module-2.6.22-*, all the
   other similar modules that are not yet tagged automatically get tags
   from it.


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/20071207/4e6e80c2/attachment.pgp 


More information about the Debtags-devel mailing list