Subject: Re: [sup-devel] [sup-talk] Ferret to Xapian conversion

From: Rich Lane <[email-masked]>
Date: Sun, 03 Jan 2010 15:18:35 -0500

Excerpts from Anthony Martinez's message of 2010-01-03 14:38:52 -0500:
> Speaking of not having the Xapian gem, when I tried "gem install xapian-full",
> it looked like it worked, but didn't actually install a gem on my system. Here's
> the build log: http://pastebin.com/f2d25a13c
> 
> I tried the regular 'xapian' gem, but the version available in Debian unstable
> is newer than the gem bindings, so that one outright refuses to compile.

I noticed that gem thinks the xapian compile failed, but it actually
succeeded and since it was in-place the installed gem worked fine. I've
pushed the ncursesw source to my github so please tinker and send me a
patch. I'm traveling for the next day so I won't be able to fix it soon
myself.
_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel

---

From: Anthony Martinez <[email-masked]>
Date: Sun, 03 Jan 2010 15:47:39 -0700

Excerpts from Rich Lane's message of Sun Jan 03 13:18:35 -0700 2010:
> succeeded and since it was in-place the installed gem worked fine.

I don't know enough about packaging Gems to help out, unfortunately. The way I'm
proceeding for now is to add "-I /var/lib/gems/1.8/gems/xapian-full-1.1.3/lib/"
to my Ruby command line (and in the case of the conversion script, to the
RUBY_INVOCATION environment). Life is ridiculous. :)

It appears to have worked, though, as I'm now writing this from a
Xapian-indexed sup!
_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel

---

From: William Morgan <[email-masked]>
Date: Sun, 03 Jan 2010 14:07:16 -0800

Reformatted excerpts from Anthony Martinez's message of 2010-01-03:
> Here is a patch to make it complain about not having Xapian *before* starting
> the state dump, so it doesn't get to step 3 and suddenly find out that it can't
> load Xapian.

Added to ferret-deprecation with minor editing, and remerged into next.
Thanks!
-- 
William <[email-masked]>
_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel

---

From: Anthony Martinez <[email-masked]>
Date: Sun, 03 Jan 2010 12:38:52 -0700

Excerpts from William Morgan's message of Sun Jan 03 08:18:53 -0700 2010:
> If you run this script, please report your experience, since I'd like to
> include it in the 0.10 release coming soon.

Help!

diff --git a/bin/sup-convert-ferret-index b/bin/sup-convert-ferret-index
index 96a97aa..e78ac4b 100755
--- a/bin/sup-convert-ferret-index
+++ b/bin/sup-convert-ferret-index
@@ -42,6 +42,12 @@ def run cmd
   puts
 end
 
+begin
+    require 'xapian'
+rescue LoadError
+    Trollop::die "you don't have the xapian gem installed, so this script won't do much for you. `gem install xapian' first."
+end
+
 Redwood::start
 index = Redwood::Index.init
 Trollop::die "you appear to already have a Xapian index--delete #{File.join(Redwood::BASE_DIR, "xapian")} if you really want to do this" unless Redwood::Index.is_a_deprecated_ferret_index?
_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel