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

Thanks for incorporating my patch to handle missing real-names in m_vcf!
Unfortunately the final released version doesn't actually handle missing
real-names, which I think is because of madduck's patches applied at the
same time to vcquery.

The attached patch makes m_vcf handle missing names again. It should be
more robust and IMO easier to read than my original approach. Also, I
believe it re-incorporates the effect of madduck's patches to drop any
nickname columns before returning query results, though I haven't tested
that claim since I don't have any nicknames set.

My general description of the issues, in #624590, still applies.

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

Kernel: Linux 2.6.39+ (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages lbdb depends on:
ii  libc6                         2.13-7     Embedded GNU C Library: Shared lib
ii  libvformat0                   1.13-7     library to read and write vcard fi
ii  perl                          5.12.4-1   Larry Wall's Practical Extraction 

lbdb recommends no packages.

Versions of packages lbdb suggests:
pn  abook                         <none>     (no description available)
pn  finger                        <none>     (no description available)
pn  libnet-ldap-perl              <none>     (no description available)
pn  libpalm-perl                  <none>     (no description available)
ii  mutt                          1.5.21-5   text-based mailreader supporting M
pn  procmail                      <none>     (no description available)

-- no debconf information
--- /usr/lib/lbdb/m_vcf	2011-06-25 07:39:51.000000000 -0700
+++ m_vcf	2011-07-14 17:50:13.367298747 -0700
@@ -39,6 +39,9 @@
       fi
     fi
 
-    $cmd | grep -ie "$QUERY" | sed 's/(null)$/ /; s/	$/	(VCF)/'
+    $cmd | grep -ie "$QUERY" | awk '
+      BEGIN { FS = OFS = "\t" }
+      $2 == "(null)" { $2 = " " }
+      { NF = 2; $3 = "(VCF)"; print }'
   done
 }

Attachment: signature.asc
Description: Digital signature

Reply via email to