[Debtags-devel] debtags swallowing tag?

Enrico Zini enrico at enricozini.org
Thu Nov 10 15:41:09 UTC 2005


On Thu, Nov 10, 2005 at 01:58:34PM +0100, Torsten Marek wrote:

> Everything is all right so far, and /var/lib/debtags/vocabulary is correct. But
> now, "debtags" (the binary) does not know "langdevel::c" anymore, although it is
> in the vocabulary.
> It does not show up with "debtags tagcat", nor with "debtags cat" or "debtags
> show <package-tagged-with-langdevel::c>". Therefore, langdevel::c is not changed
> into devel::lang:c (which is visible).
> (BTW: the langdevel::c tags are in /var/lib/debtags/package-tags and the indices !)

Doh!  I can reproduce it here as well.  It's superweird.

> I did not have time to debug code yet, but then again were should I start?

Let's see if other tags disappeared:

  $ debtags tagcat | grep '^Tag\|^Facet'|sort > /tmp/z

(doh! another bug: facets are printed as 'Tag:'.  Fixed in svn, in the
 meantime I'll work around it:)

  $ cat /var/lib/debtags/vocabulary | grep '^Tag\|^Facet'| sed 's/Facet:/Tag:/' | sort > /tmp/z1
  $ diff /tmp/z /tmp/z1
  205a206
  > Tag: langdevel::c
  219a221
  > Tag: langdevel::r

Two tags disappeared, both have names of one letter only...

  $ grep '::.$' /var/lib/debtags/vocabulary
  Tag: langdevel::c
  Tag: langdevel::r
  Tag: special::not-yet-tagged::a
  ...
  Tag: special::not-yet-tagged::z

...and they are the only tags with names of one letter only!  (the
special tags are named "not-yet-tagged::a", not "a")

The index contains the tags:

  $ strings /var/lib/debtags/vocabulary.idx |grep langdevel::[cr]
  &Tlangdevel::c
  &Tlangdevel::c++
  &Tlangdevel::r
  &Tlangdevel::ruby

So I suspect that cache/component/tags.{h,cpp} or
cache/entity/tag.{h,cpp} could be at fault, since libtagcoll, that
merged the vocabulary and created the index, handled the tag just fine.
Also, the code there is quite fresh, relatively less tested and maybe in
need of refactoring.

I'd add some test cases to catch this to that code in libapt-front, and
proceed from there.

I have to leave now.  If you want to give it a try keep us posted, else
I'll pick it up tomorrow.


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/20051110/0b6b96bb/attachment.pgp


More information about the Debtags-devel mailing list