Subject: [sup-talk] unable to sup-sync (new install)

From: [email-masked] (Kevin Mark)
Date: Sun, 16 Sep 2007 23:26:44 -0400

Hi Sup folks,
I'm using:
Ubuntu gutsy
Sup 0.1
ruby 1.8, 1.9

Tried to install sup with errors.

I later did this:

sudo aptitude install libncurses5-dev ruby1.8-dev rake libopenssl-ruby

and then was able to:

sudo gem install sup -y

To run 'sup', I needed to add 'export PATH=/var/lib/gems/1.8/bin:"${PATH}"' to .bashrc

When I used 'sup-config' it failed on 'sup-sync'.
I tried 'sup-sync' by itself with these errors:

[Sun Sep 16 23:23:08 -0400 2007] locking /home/kevin/.sup/lock...
[Sun Sep 16 23:23:08 -0400 2007] loading index...
[Sun Sep 16 23:23:08 -0400 2007] loaded index of 0 messages
Scanning sup://drafts...
Scanned 0, added 0, updated 0 messages from sup://drafts.
Scanning maildir:/home/kevin/Maildir...
[Sun Sep 16 23:23:08 -0400 2007] saving index and sources...
[Sun Sep 16 23:23:08 -0400 2007] unlocking /home/kevin/.sup/lock...
/var/lib/gems/1.8/gems/sup-0.1/lib/sup/source.rb:80:in `done?': undefined method `>=' for nil:NilClass (NoMethodError)
        from /var/lib/gems/1.8/gems/sup-0.1/lib/sup/util.rb:437:in `send'
        from /var/lib/gems/1.8/gems/sup-0.1/lib/sup/util.rb:437:in `__pass'
        from /var/lib/gems/1.8/gems/sup-0.1/lib/sup/util.rb:426:in `method_missing'
        from /var/lib/gems/1.8/gems/sup-0.1/lib/sup/poll.rb:99:in `add_messages_from'
        from /var/lib/gems/1.8/gems/sup-0.1/lib/sup/util.rb:401:in `send'
        from /var/lib/gems/1.8/gems/sup-0.1/lib/sup/util.rb:401:in `method_missing'
        from /var/lib/gems/1.8/gems/sup-0.1/bin/sup-sync:133
        from /var/lib/gems/1.8/gems/sup-0.1/bin/sup-sync:128:in `each'
        from /var/lib/gems/1.8/gems/sup-0.1/bin/sup-sync:128
        from /var/lib/gems/1.8/bin/sup-sync:16:in `load'
        from /var/lib/gems/1.8/bin/sup-sync:16

My home directory is '/home/kevin'
My Maildir is '/home/kevin/Maildir'
Any hints to fix this?
-Kev
-- 
|  .''`.  == Debian GNU/Linux == |       my web site:           |
| : :' :      The  Universal     |mysite.verizon.net/kevin.mark/|
| `. `'      Operating System    | go to counter.li.org and     |
|   `-    http://www.debian.org/ |    be counted! #238656       |
|  my keyserver: subkeys.pgp.net |     my NPO: cfsg.org         |
|join the new debian-community.org to help Debian!              |
|_______  Unless I ask to be CCd, assume I am subscribed _______|

---

From: [email-masked] (William Morgan)
Date: Mon, 17 Sep 2007 10:12:15 -0700

> To run 'sup', I needed to add 'export PATH=/var/lib/gems/1.8/bin:"${PATH}"' to

This is a symptom of how Ubuntu deals with gems. Unfortunately there's
not a lot I can do about it from my end.

> /var/lib/gems/1.8/gems/sup-0.1/lib/sup/source.rb:80:in `done?': undefined method `>=' for nil:NilClass (NoMethodError)

Is your maildir empty? If so, this is lousy programming on my part.
Sorry! If a maildir has no messages, Sup dies in this horrific way. I've
just committed a patch to SVN to fix this. You can either pull down the
SVN head, or just add a message to your maildir directory. :)

If the maildir isn't empty, then I need to think of another reason why
this would happen.

-- 
William <wmorgan-sup at masanjin.net>

---

From: [email-masked] (Kevin Mark)
Date: Mon, 17 Sep 2007 14:07:10 -0400

> not a lot I can do about it from my end.

That sounds like what I expected, as I think Debian, more or less
upstream,  may have a similar 'gem' status, although I have not checked.

> Is your maildir empty? 

No.

> If so, this is lousy programming on my part.  Sorry! If a maildir has
> no messages, Sup dies in this horrific way.  I've just committed a
> patch to SVN to fix this. You can either pull down the SVN head, or
> just add a message to your maildir directory. :)

Hmm. No, my maildir has more than a GB. It includes a few subdirectories
of gziped mbox. And most of the maildir mail boxes start with '.', as in
'~/Maildir/.floss.sup_talk/'

> If the maildir isn't empty, then I need to think of another reason why

Here is a sample:
/home/kevin/Maildir/.people.cothrige
/home/kevin/Maildir/.people.cothrige/cur
/home/kevin/Maildir/.people.cothrige/new
/home/kevin/Maildir/.people.cothrige/tmp
/home/kevin/Maildir/.people.dallas_a_clement
/home/kevin/Maildir/.people.dallas_a_clement/cur
/home/kevin/Maildir/.people.dallas_a_clement/new
/home/kevin/Maildir/.people.dallas_a_clement/tmp
/home/kevin/Maildir/.people.dana_spiegel
/home/kevin/Maildir/.people.dana_spiegel/cur
/home/kevin/Maildir/.people.dana_spiegel/new
/home/kevin/Maildir/.people.dana_spiegel/tmp
/home/kevin/Maildir/.people.david_weinehall
/home/kevin/Maildir/.people.david_weinehall/cur
/home/kevin/Maildir/.people.david_weinehall/new
/home/kevin/Maildir/.people.david_weinehall/tmp
/home/kevin/Maildir/.people.enrico_zini

I just have one thought as to the error:
there are many mail directories and some of them are empty. I archive
them every month. So '/home/kevin/Maildir/.david_weinehall/*' does not
have any messages.

I just thought of a second issue. In sup-config, you ask to define each
individual mailbox. What I did in the program 'mairix' is to define a
group of mail boxes with some kind of 'glob' so that I can say
'maildir/...' and mean all maildir's in that subdirectory.

cheers,
Kev

---

From: [email-masked] (William Morgan)
Date: Mon, 17 Sep 2007 11:59:40 -0700

> /home/kevin/Maildir/.people.enrico_zini

Ah, maildir folders. I will have to write some code to support this.
Sorry!

---

From: [email-masked] (Kevin Mark)
Date: Tue, 18 Sep 2007 02:26:53 -0400

> Ah, maildir folders. I will have to write some code to support this.

I made some progress on understanding what the config files wanted. I
added a single maildir and that worked. So until I create a small script
to 'find /home/kevin/Maildir/ -type d| create_sup_config', I will add a
few folders. With mutt I have a script that, upon startup, generates
what maildirs it sees:
mailboxes `echo -n "+ "; cd ~/Maildir; for mb in $(find .|grep "/new/" |rev|cut -d/ -f3-|rev|sort|uniq); do echo -n "+'$mb' "; done`

One more thing, is there a way to read one message and go to the next
one. In mutt, when you read one message, you can hit 'space' at the
bottom of a message and then proceed to the next.

The only thing I need to research is how to set up my 'mail sending'
config. On mutt, I did nothing to set it up with exim on ubuntu/debian.
So I can't send yet.

Keep up the good work! So far, I think this is going in an interesting
direction and I'm waiting to see where its going to end up.
-K
-- 
|  .''`.  == Debian GNU/Linux == |       my web site:           |
| : :' :      The  Universal     |mysite.verizon.net/kevin.mark/|
| `. `'      Operating System    | go to counter.li.org and     |
|   `-    http://www.debian.org/ |    be counted! #238656       |
|  my keyserver: subkeys.pgp.net |     my NPO: cfsg.org         |
|join the new debian-community.org to help Debian!              |
|_______  Unless I ask to be CCd, assume I am subscribed _______|

---

From: [email-masked] (Magnus Therning)
Date: Tue, 18 Sep 2007 07:27:23 +0100

On Mon, Sep 17, 2007 at 14:07:10 -0400, Kevin Mark wrote:
[..]
>'maildir/...' and mean all maildir's in that subdirectory.

If support for maildir++ is added (that's the extension to maildir that
allows sub-folders) then it would make sense to just add
maildir:~/Maildir and have all sub folders added as well.

For the time being I would suggest not configuring any mailboxes in
sup-config.  Use sup-add instead and you'll have access to all the
globbing your shell supports.

/M

-- 
Magnus Therning                             (OpenPGP: 0xAB4DFBA4)
magnus?therning?org             Jabber: magnus?therning?gmail?com
http://therning.org/magnus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20070918/c3d88829/attachment.bin

---

From: [email-masked] (Magnus Therning)
Date: Tue, 18 Sep 2007 07:38:52 +0100

On Mon, Sep 17, 2007 at 10:12:15 -0700, William Morgan wrote:
>> To run 'sup', I needed to add 'export
>> PATH=/var/lib/gems/1.8/bin:"${PATH}"' to .bashrc
>

There is one thing you _can_ do--make sup easy to package by providing a
setup.rb or install.rb for installation.

Ruby gems and Python eggs seem to suffer from the same problem; they
don't just deal with packaging but also with versioning and they do it
in a way that makes packaging in Linux distros difficult.

See http://pkg-ruby-extras.alioth.debian.org/rubygems.html for Debian's
position on gems.

/M

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20070918/4facb50f/attachment.bin

---

From: [email-masked] (Kevin Mark)
Date: Tue, 18 Sep 2007 02:54:57 -0400

> See http://pkg-ruby-extras.alioth.debian.org/rubygems.html for Debian's
If my understanding is correct, these 'gems' thingies are packages which
are outside of the perview of dpkg or other packaging system. Which
means it would be great if someone found a way for their status to be
communicated to the packaging system?

---

From: [email-masked] (William Morgan)
Date: Tue, 18 Sep 2007 16:18:59 -0700

Excerpts from Magnus Therning's message of Mon Sep 17 23:27:23 -0700 2007:
> If support for maildir++ is added (that's the extension to maildir
> that allows sub-folders) then it would make sense to just add

I've received a similar request for IMAP (add all folders at once). In
the mean time, as you point out, you can sup-add each Maildir folder
individually and take advantage of shell globbing to do it one command
if desired. I'm content to leave it at that for the near future and not
invest time in explicit Maildir++ support.

---

From: [email-masked] (Kevin Mark)
Date: Tue, 18 Sep 2007 21:39:16 -0400

On Tue, Sep 18, 2007 at 04:18:59PM -0700, William Morgan wrote:
> _______________________________________________
> sup-talk mailing list
> sup-talk at rubyforge.org
> http://rubyforge.org/mailman/listinfo/sup-talk
> 
I used this to add my maildir:
======================================
find ~/Maildir -type d|grep "/cur$"|rev|cut -d"/" -f2-|rev|grep -vi mfolder|while read line; do
        N=$(ls $line/cur/|wc -l)
	#find the number of messages
	#only add if non-zero (otherwise error?)
        if [ "$N" != "0" ]; then
                sup-add maildir:$line/;
        fi
done
======================================
sup-add noted duplicates, which is good.
-K
-- 
|  .''`.  == Debian GNU/Linux == |       my web site:           |
| : :' :      The  Universal     |mysite.verizon.net/kevin.mark/|
| `. `'      Operating System    | go to counter.li.org and     |
|   `-    http://www.debian.org/ |    be counted! #238656       |
|  my keyserver: subkeys.pgp.net |     my NPO: cfsg.org         |
|join the new debian-community.org to help Debian!              |
|_______  Unless I ask to be CCd, assume I am subscribed _______|