Subject: [sup-talk] sources.yaml labels

From: [email-masked] (Ben Walton)
Date: Sat, 05 Sep 2009 20:19:06 -0400

Hi All,

After still requiring modifications to the LabelManager to manage my
xapian conversion, I'm wondering if I've done something wrong in my
sources.yaml (most of which was put together by hand instead of via
sup-add).  What format should a labels definition be using?  On of my
sources looks like:

--snip--
- !masanjin.net,2006-10-01/Redwood/Maildir 
  uri: maildir:///u/bwalton/Maildir/.systemtap/
  cur_offset: 12264068440005086
  usual: true
  archived: false
  id: 6
  labels: 
  - systemtap
  mtimes: 
    cur: 2008-10-23 13:22:54 -04:00
    new: 2008-11-11 07:34:04 -05:00
--snip--

Should the '- systemtap' be '- :systemtap'?

Thanks
-Ben
-- 
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302

GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu
Contact me to arrange for a CAcert assurance meeting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20090905/7dc9994f/attachment.bin>

---

From: [email-masked] (William Morgan)
Date: Sun, 06 Sep 2009 06:22:21 -0700

> Should the '- systemtap' be '- :systemtap'?

The former is "correct". But if you put in the latter, it should be
converted automatically, and written out as the former when you exit
Sup.

I'm a little disturbed that you're still seeing problems with this. Can
you confirm that SerializeLabelsNicely#after_unmarshal! (source.rb circa
line 167) is being run in your sources after they're loaded from
sources.yaml? That should ensure that you end up with a Set of symbols
when Sup's running, regardless of what's in the file.

The other source of bad labels is the serialized version of the messages
stored by Xapian, if you use Xapian. But if you've regenerated your
Xapian index recently, this shouldn't be a problem...

It strikes me now that the other possible source of non-symbol labels is
a hook like before-add. Are you using that to call Message#add_label
with a string argument, by any chance?

If none of the above, can you post the latest version of the exceptions
you're seeing?
-- 
William <wmorgan-sup at masanjin.net>

---

From: [email-masked] (Ben Walton)
Date: Sun, 06 Sep 2009 09:47:06 -0400

> converted automatically, and written out as the former when you exit

Ok, so my sources.yaml is 'good.'

> when Sup's running, regardless of what's in the file.

Yes, I added a debug in that method and saw a message for each source.

> Xapian index recently, this shouldn't be a problem...

I generated this about 2 days ago with a current (at the time) head of
next.

> with a string argument, by any chance?

I was doing this.  I had a hook from my very early sup days still in
play.  Since it was actually completely redundant (procmail filtering
and autolabelling via sources) now, I've simply removed it.

> If none of the above, can you post the latest version of the exceptions

I still can't load sup without coercing strings to symbols in the <<
method though.  The exception log is attached (from a clean startup).

Thanks
-Ben

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: exception-log.txt
URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20090906/8e8d8383/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20090906/8e8d8383/attachment.bin>

---

From: [email-masked] (Ben Walton)
Date: Sun, 06 Sep 2009 10:07:55 -0400

> Xapian index recently, this shouldn't be a problem...

Since I had a bad hook and imported to Xapian with that hook live,
should I reimport my dumpfile after having the hook removed?  I'm
thinking that I did the damage in a permanent fashion while doing the
import...

Thanks
-Ben

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20090906/e357aff1/attachment.bin>

---

From: [email-masked] (Ingmar Vanhassel)
Date: Sun, 06 Sep 2009 16:16:56 +0200

> method though.  The exception log is attached (from a clean startup).

That looks like you're using labels as strings, or at least not as
symbols, in one of your hooks.

-- 
Exherbo KDE, X.org maintainer

---

From: [email-masked] (William Morgan)
Date: Sun, 06 Sep 2009 08:06:16 -0700

> thinking that I did the damage in a permanent fashion while doing the

I suspect that would fix it. I've just pushed a change to to make
Message#add_label coerce arguments to symbols, anyways, so that writing
your hook wrong won't destroy your index for all eternity.

Sorry about all this. The silver lining is that it's a side effect of
lots of development activity. :)
-- 
William <wmorgan-sup at masanjin.net>

---

From: [email-masked] (Ben Walton)
Date: Sun, 06 Sep 2009 11:26:26 -0400

> your hook wrong won't destroy your index for all eternity.

Ok, that's cool.  I was going to write the same change but with a
'raise ArgumentError' similar to the one in << to stick with the fail
fast approach you prefer.

> lots of development activity. :)

Hey, it's not a problem.  I don't mind guinea pigging this stuff at
all.  Sup has steadily improved since I've been using it, so I'm a
happy camper.  [Plus, I'm running next, so I 'get what I get.']

Thanks
-Ben

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20090906/26890640/attachment.bin>

---

From: [email-masked] (Ben Walton)
Date: Sun, 06 Sep 2009 12:41:48 -0400

> your hook wrong won't destroy your index for all eternity.

Verified.  I've re-imported my dump file after removing my hook.  The
import ran successfully with an unmodified sup.

I think this makes me a full-time xapian convert.

Thanks for all your effort on this William and Rich!
-Ben

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20090906/6eddaa77/attachment.bin>