Package: lbdb
Version: 0.35.1
Severity: normal
Tags: patch

When using m_evolution, I get no results to any query. I have investigated and found that m_evolution expects FN (full name) entries to come before EMAIL entries; however, evolution does not currently export them in this order, so no entries are ever emitted.

A patch is attached to fix this. It collects all the information, and then outputs it at the end of each vCard. It also corrects a few spelling errors.

HTH.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.24-rc8-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages lbdb depends on:
ii  libc6                         2.7-6      GNU C Library: Shared libraries
ii  libvformat1                   1.13-4     Library to read and write vcard fi
ii perl 5.8.8-12 Larry Wall's Practical Extraction
lbdb recommends no packages.

-- no debconf information

--
brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
troff on top of XML: http://crustytoothpaste.ath.cx/~bmc/code/thwack
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
--- m_evolution.orig	2008-01-25 19:22:07.000000000 +0000
+++ m_evolution	2008-01-25 19:34:24.000000000 +0000
@@ -2,11 +2,12 @@
 #
 # -*-sh-*-
 #
-#     m_evoltuion - Evoltuion Address book module for lbdb
+#     m_evolution - Evolution Address book module for lbdb
 #     Copyright (C) 2004 Guido Guenther <[EMAIL PROTECTED]>
 #     Copyright (C) 2004-2006 Roland Rosenfeld <[EMAIL PROTECTED]>
+#     Copyright (C) 2008 brian m. carlson <[EMAIL PROTECTED]>
 #
-#     losely based on m_gnomecard
+#     loosely based on m_gnomecard
 #
 #     This program is free software; you can redistribute it and/or modify
 #     it under the terms of the GNU General Public License as published by
@@ -31,11 +32,12 @@
     if [ -x $EVOLUTION_ADDRESSBOOK_EXPORT ]; then
     	$EVOLUTION_ADDRESSBOOK_EXPORT 2>/dev/null \
         | $AWK 'BEGIN {FS=":"; RS="\r\n"; name=""} \
-	      /^END:VCARD/ {name=""; fileas=""} \
+		  /^END:VCARD/ { if ((name!="" || fileas!="") && email!="") \
+		    printf("%s\t%s\tEV:%s\n",email,name,fileas); \
+			name=""; fileas=""; email=""} \
 	      /^FN:/ {name=$2; } \
 	      /^X-EVOLUTION-FILE-AS:/ {fileas=$2; gsub("\\\\", "", fileas)} \
-	      ( name!="" || fileas!="" ) && /^EMAIL[;:]/ \
-		    {email=$2; printf ("%s\t%s\tEV:%s\n",email,name,fileas)}'\
+	      /^EMAIL[;:]/ {email=$2;}'\
 	| grep -ia "$@"
     fi
 }

Attachment: signature.asc
Description: Digital signature

Reply via email to