[mutt] 02/02: upstream/819196-disable-X-in-message-scoring.patch: to disable ~X in message scoring, as upstream requested (Closes: 819196).

Antonio Radici antonio at moszumanska.debian.org
Sun Sep 4 18:17:05 UTC 2016


This is an automated email from the git hooks/post-receive script.

antonio pushed a commit to branch master
in repository mutt.

commit 037d1557905130ecc0e5f3cd9dd220b895d40367
Author: Antonio Radici <antonio at debian.org>
Date:   Sun Sep 4 19:16:29 2016 +0100

    upstream/819196-disable-X-in-message-scoring.patch: to disable ~X in message scoring, as upstream requested (Closes: 819196).
---
 debian/changelog                                   |  2 +
 debian/patches/series                              |  1 +
 .../819196-disable-X-in-message-scoring.patch      | 56 ++++++++++++++++++++++
 3 files changed, 59 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 626006e..782078c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ mutt (1.7.0-2) UNRELEASED; urgency=medium
       (Closes: 569038, 774746, 423931, 599136, 618425).
     + upstream/833192-preserve-messageid-for-postponed-emails.patch: do not
       remove the message-id of postponed emails (Closes: 833192).
+    + upstream/819196-disable-X-in-message-scoring.patch: to disable ~X in
+      message scoring, as upstream requested (Closes: 819196).
 
  -- Antonio Radici <antonio at debian.org>  Mon, 29 Aug 2016 21:27:08 +0100
 
diff --git a/debian/patches/series b/debian/patches/series
index 577187a..08be30c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -20,3 +20,4 @@ upstream/693993-manpage-corrections.patch
 upstream/749483-conststrings.patch
 upstream/569038-interrupt-socket-read-write.patch
 upstream/833192-preserve-messageid-for-postponed-emails.patch
+upstream/819196-disable-X-in-message-scoring.patch
diff --git a/debian/patches/upstream/819196-disable-X-in-message-scoring.patch b/debian/patches/upstream/819196-disable-X-in-message-scoring.patch
new file mode 100644
index 0000000..450ae25
--- /dev/null
+++ b/debian/patches/upstream/819196-disable-X-in-message-scoring.patch
@@ -0,0 +1,56 @@
+Patch from upstream, can be dropped when mutt > 1.7.0 is released.
+
+# HG changeset patch
+# User Kevin McCarthy <kevin at 8t8.us>
+# Date 1472869959 25200
+#      Fri Sep 02 19:32:39 2016 -0700
+# Branch stable
+# Node ID ba5d900a90db3e0ef97f092f685fab4253cb2ab4
+# Parent  eef1e8abc46f5bb7d26e2ab04e2c22047b21bc93
+Disable ~X when message scoring.  (closes #3861)
+
+mutt_score_message() purposely passes a NULL context to
+mutt_pattern_exec().  The idea was to block slow patterns, and the
+scoring documentation notes this by saying:
+
+  "For efficiency reasons, patterns which scan information not
+  available in the index, such as ~b, ~B or ~h, may not be used"
+
+~X needs the context to parse the messages (during message scoring at
+least), and thus isn't suitable for message scoring either.
+
+Block ~X from being used when the context is NULL.  Add ~X to the list
+of patterns noted as unusable in the message scoring documentation.
+
+--- a/doc/manual.xml.head
++++ b/doc/manual.xml.head
+@@ -4486,8 +4486,8 @@
+ <emphasis>pattern</emphasis> is a string in the format described in the
+ <link linkend="patterns">patterns</link> section (note: For efficiency
+ reasons, patterns which scan information not available in the index,
+-such as <literal>~b</literal>, <literal>~B</literal> or
+-<literal>~h</literal>, may not be used).  <emphasis>value</emphasis> is
++such as <literal>~b</literal>, <literal>~B</literal>, <literal>~h</literal>,
++or <literal>~X</literal> may not be used).  <emphasis>value</emphasis> is
+ a positive or negative integer.  A message's final score is the sum
+ total of all matching <command>score</command> entries.  However, you
+ may optionally prefix <emphasis>value</emphasis> with an equal sign
+--- a/pattern.c
++++ b/pattern.c
+@@ -1193,6 +1193,7 @@
+       /*
+        * ctx can be NULL in certain cases, such as when replying to a message from the attachment menu and
+        * the user has a reply-hook using "~h" (bug #2190).
++       * This is also the case when message scoring.
+        */
+       if (!ctx)
+ 	      return 0;
+@@ -1286,6 +1287,8 @@
+     case MUTT_DUPLICATED:
+       return (pat->not ^ (h->thread && h->thread->duplicate_thread));
+     case MUTT_MIMEATTACH:
++      if (!ctx)
++        return 0;
+       {
+       int count = mutt_count_body_parts (ctx, h);
+       return (pat->not ^ (count >= pat->min && (pat->max == MUTT_MAXRANGE ||

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mutt/mutt.git



More information about the pkg-mutt-commits mailing list