On Wed, Jul 11, 2018 at 09:24:56AM BST, Stuart Henderson wrote:
> On 2018/07/07 23:00, Raf Czlonka wrote:
> > On Sat, Jul 07, 2018 at 12:40:47AM BST, Stuart Henderson wrote:
> > > [...]
> > >
> > > +MASTER_SITES =           http://www.spinnaker.de/debian/
> 
> Oh this is a redirect to https now, might as well change that and avoid
> the extra roundtrip.

Shouldn't we change it to https://www.spinnaker.de/lbdb/download/ ?

debian -> lbdb feels more "intuitive", for a lack of a better word.

> > > +BUILD_DEPENDS =          ${RUN_DEPENDS-main}
> > > +LIB_DEPENDS-main =       converters/libiconv
> > > +RUN_DEPENDS-main =       mail/abook
> > 
> > There's not need for abook to be a run dependency - m_abook module
> > is only usable if it is both specified in METHODS *and* abook
> > executable present, ignored otherwise.
> 
> It's a really small dependency though, and the only extra thing it pulls
> in is gettext which mutt users will have anyway, so I don't see a lot of point
> in /not/ including it, it does make things more consistent.

Sure - however, I was thinking ahead.

I.e., the latest version of lbdb has goobook[0] and khard[1] modules.
Personally, I don't think each and every program which *enhances*
lbdb, should be a hard dependency.  Even in Debian all of these are
only *suggested* packages[2].  Personally, I don't even think that
the -ldap flavor is necessary - a pkg-readme with all the optional
packages, i.e.:

- Net::LDAP
- abook
- goobook
- khard, which would pull vdirsyncer
- ...

would suffice, IMO.

This would:

- remove the need for hard dependencies so no extra software, which
  otherwise would potentially not have been used, needs to be
  installed

- if LDAP support is "merged" to the main flavor, there's one less
  flavor to maintain

- any additional *enhancement* are added to the readme

It somehow feels simpler and easier.

Otherwise we'll end up with two packages, where they pull 3-4
additional programs and the only difference is that one pull an an
extra Perl module.

Don't some ports already do just that?

Or we go the other way and each and we add each and every of these as
hard dependencies but the chain grows...

Anyway, food for thought :^)

[0] https://pypi.org/project/goobook/
[1] https://github.com/scheibler/khard
[2] https://packages.debian.org/sid/lbdb

> > Now, the main issue. The m_abook module doesn't work properly due
> > to tab escape sequences (\t) being used in sed regexes - something
> > sed(1) in base does not cope well with.
> > 
> > All that module does is running the below command:
> > 
> >     abook --datafile $HOME/.abook/addressbook --mutt-query "$@" \
> >             | sed -e '1d;s/\([^\t]*\t[^\t]*\).*/\1\tabook/'
> > 
> > but, due to the above, based sed(1) cuts the result short on 2nd
> > 't' in the string, i.e.:
> > 
> >     firstname.surn...@example.org   Firstabook
> > 
> > or, if the string contains only one 't' or none at all:
> > 
> >     first.n...@example.org  My Name tabook
> > 
> > It works fine with gsed, which was obviously used when that module
> > was written/tested, but then gsed would need to become a run
> > dependency - something I am not keen on.
> > 
> > The "easiest" thing to do, would be to patch /usr/local/lib/lbdb/m_abook
> > and use literal tabs:
> > 
> > -           | sed -e '1d;s/\([^\t]*\t[^\t]*\).*/\1\tabook/'
> > +           | sed -e '1d;s/\([^     ]*      [^      ]*\).*/\1       abook/'
> > 
> > After the above change, it all seems to be working fine.
> > 
> > Thanks for looking into it.
> > 
> > Raf
> 
> Given the existing mess in m_muttalias.sh.in I think that would be ok :)

That's what I thought :^)

Thanks,

Raf

Reply via email to