Hello,

I just updated to mutt 1.5.24-1 and noticed that NNTP is still broken even
though there's an updated version of the patch that should fix it.  I'm
forwarding a message from the author that I realized was sent to me only, not
to this Debian bug.

I'll build the package with the updated patch myself, but you (the maintainer)
might want to update the patch too.

Thanks.

-- 
Tomáš Janoušek, a.k.a. Pivník, a.k.a. Liskni_si, http://work.lisk.in/
--- Begin Message ---
Hello,

I've just released nntp patch for mutt 1.5.24. Now LISTGROUP
range is limited by nntp_context. Newsgroup gmane.linux.kernel
is loaded much more quickly.

Moreover, you can disable LISTGROUP by new option nntp_listgroup.

On Wed, May 14, 2014 at 07:37:45PM +0200, Tomas Janousek wrote:
TJ> Package: mutt-patched
TJ> Version: 1.5.23-1.0.1
TJ> Severity: normal
TJ> Tags: upstream, patch

TJ> Hello,

TJ> I used to use an old version of mutt and the NNTP patch, but recently the 
NNTP
TJ> patch was added to Debian's mutt-patched package so I decided to update and
TJ> use that instead.  My main use case is reading gmane.linux.kernel via
TJ> news.gmane.org (a newsgroup with millions of messages) and mutt-patched 
takes
TJ> ages to open that newsgroup.

TJ> I had problems with LISTGROUP in the past [1], so I tried disabling it just 
as
TJ> I did with the old version, because, well, it does seem like a really bad 
idea
TJ> to LISTGROUP a newsgroup with millions of messages.  Doing this the naive 
way
TJ> broke header caching, since any gap in the sequence of message numbers
TJ> triggers immediate XOVER for the rest of them.  This happens a lot on gmane.
TJ> So I implemented a simple heuristic -- skip the gaps if there are cached
TJ> headers with greater message ids and use XOVER only for the last "gap" with 
no
TJ> cached messages following it.  This seems to work fairly well on gmane, but 
I
TJ> have no idea whether it's safe in general.  (It seems worth mentioning that
TJ> the old version of the patch that used its own header caching mechanism did
TJ> exactly that, which is why it worked for me all those years.)

TJ> [1] http://thread.gmane.org/gmane.discuss/12188/

TJ> I'm no expert on NNTP, so I'll leave it at that.  The patch author is Cc'd.

TJ> Thanks. :-)

TJ> -- System Information:
TJ> Debian Release: jessie/sid
TJ>   APT prefers testing
TJ>   APT policy: (980, 'testing'), (980, 'stable'), (500, 'unstable'), (500, 
'stable'), (200, 'experimental')
TJ> Architecture: i386 (x86_64)
TJ> Foreign Architectures: amd64

TJ> Kernel: Linux 3.15.0-rc5-lis64+ (SMP w/4 CPU cores)
TJ> Locale: LANG=cs_CZ.UTF-8, LC_CTYPE=cs_CZ.UTF-8 (charmap=UTF-8)
TJ> Shell: /bin/sh linked to /bin/bash

TJ> Versions of packages mutt-patched depends on:
TJ> ii  libassuan0        2.1.1-1
TJ> ii  libc6             2.18-5
TJ> ii  libcomerr2        1.42.9-3
TJ> ii  libgnutls26       2.12.23-15
TJ> ii  libgpg-error0     1.12-0.2
TJ> ii  libgpgme11        1.4.3-0.1
TJ> ii  libgssapi-krb5-2  1.12.1+dfsg-1
TJ> ii  libidn11          1.28-2
TJ> ii  libk5crypto3      1.12.1+dfsg-1
TJ> ii  libkrb5-3         1.12.1+dfsg-1
TJ> ii  libncursesw5      5.9+20140118-1
TJ> ii  libsasl2-2        2.1.26.dfsg1-9
TJ> ii  libtinfo5         5.9+20140118-1
TJ> ii  libtokyocabinet9  1.4.48-2
TJ> ii  mutt              1.5.23-1.0.1

TJ> mutt-patched recommends no packages.

TJ> mutt-patched suggests no packages.

TJ> -- no debconf information

TJ> -- 
TJ> Tomáš Janoušek, a.k.a. Liskni_si, http://work.lisk.in/

TJ> Index: mutt/nntp.c
TJ> ===================================================================
TJ> --- mutt.orig/nntp.c        2014-05-13 23:26:12.880828218 +0200
TJ> +++ mutt/nntp.c     2014-05-14 00:14:43.927504715 +0200
TJ> @@ -109,7 +109,7 @@
TJ>      else if (!mutt_strcmp ("READER", buf))
TJ>      {
TJ>        nserv->hasDATE = 1;
TJ> -      nserv->hasLISTGROUP = 1;
TJ> +      //nserv->hasLISTGROUP = 1;
TJ>      }
TJ>      else if (!mutt_strncmp ("AUTHINFO ", buf, 9))
TJ>      {
TJ> @@ -152,7 +152,7 @@
TJ>    mutt_str_replace (&nserv->authenticators, buf);
TJ>  
TJ>    /* current mode is reader */
TJ> -  if (nserv->hasLISTGROUP)
TJ> +  if (nserv->hasDATE)
TJ>      return 0;
TJ>  
TJ>    /* server is mode-switching, need to switch to reader mode */
TJ> @@ -191,11 +191,13 @@
TJ>      if (mutt_strncmp ("500", buf, 3))
TJ>        nserv->hasDATE = 1;
TJ>  
TJ> +#if 0
TJ>      if (mutt_socket_write (conn, "LISTGROUP\r\n") < 0 ||
TJ>     mutt_socket_readln (buf, sizeof (buf), conn) < 0)
TJ>        return nntp_connect_error (nserv);
TJ>      if (mutt_strncmp ("500", buf, 3))
TJ>        nserv->hasLISTGROUP = 1;
TJ> +#endif
TJ>  
TJ>      if (mutt_socket_write (conn, "LIST NEWSGROUPS +\r\n") < 0 ||
TJ>     mutt_socket_readln (buf, sizeof (buf), conn) < 0)
TJ> @@ -1186,7 +1188,7 @@
TJ>    char buf[HUGE_STRING];
TJ>    int rc = 0;
TJ>    int oldmsgcount = ctx->msgcount;
TJ> -  anum_t current;
TJ> +  anum_t current, last_ok = first - 1;
TJ>  #ifdef USE_HCACHE
TJ>    void *hdata;
TJ>  #endif
TJ> @@ -1304,7 +1306,7 @@
TJ>  
TJ>      /* fallback to fetch overview */
TJ>      else if (nntp_data->nserv->hasOVER || nntp_data->nserv->hasXOVER)
TJ> -      break;
TJ> +      continue; //break;
TJ>  
TJ>      /* fetch header from server */
TJ>      else
TJ> @@ -1378,8 +1380,12 @@
TJ>      }
TJ>      if (current > nntp_data->lastLoaded)
TJ>        nntp_data->lastLoaded = current;
TJ> +
TJ> +    last_ok = current;
TJ>    }
TJ>  
TJ> +  current = last_ok + 1;
TJ> +
TJ>    /* fetch overview information */
TJ>    if (current <= last && rc == 0) {
TJ>      char *cmd = nntp_data->nserv->hasOVER ? "OVER" : "XOVER";

-- 
Vsevolod Volkov
mailto:[email protected]
http://mutt.org.ua/download

--- End Message ---

Reply via email to