From: Christoph Berg Date: Sat, 20 Jun 2009 12:01:22 +0000 (+0200) Subject: Remove maildir-mtime patch, upstream has a different implementation (though with... X-Git-Tag: debian/1.5.20-2~4 X-Git-Url: https://git.llucax.com/software/mutt-debian.git/commitdiff_plain/460f7ef5018d2c01af1e13ef02bd3e77e29b8364?hp=40dcc70d7c9189c0a005a79b9d5c0af31debd3a5 Remove maildir-mtime patch, upstream has a different implementation (though with different results; Closes: 533471) --- diff --git a/debian/changelog b/debian/changelog index 13287b2..b849d8f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ mutt (1.5.20-2) unstable; urgency=low + [ Antonio Radici ] * debian/patches/series: + upstream/533209-mutt_perror.patch: better error reporting if a mailbox cannot be opened (Closes: 533209) @@ -16,8 +17,12 @@ mutt (1.5.20-2) unstable; urgency=low + Debian policy bumped to 3.8.2 * debian/mutt.install and debian/extra/lib/mailto-mutt: + added the firefox mailto handler (Closes: 406850) - - -- Antonio Radici Tue, 16 Jun 2009 23:20:32 +0100 + + [ Christoph Berg ] + * Remove maildir-mtime patch, upstream has a different implementation + (though with different results; Closes: 533471) + + -- Christoph Berg Sat, 20 Jun 2009 13:55:09 +0200 mutt (1.5.20-1) unstable; urgency=low diff --git a/debian/patches/features/maildir-mtime b/debian/patches/features/maildir-mtime deleted file mode 100644 index 490fb7b..0000000 --- a/debian/patches/features/maildir-mtime +++ /dev/null @@ -1,176 +0,0 @@ -# vi: ft=diff -This is the maildir mtime patch by Dale Woolridge. - -The home page for this patch is: - - http://www.mutt.ca/maildir-mtime.html - -* Patch last synced with upstream: - - Date: 2004-08-10 - - File: http://www.mutt.ca/patches/patch-1.5.6.dw.maildir-mtime.1 - -* Changes made: - - removed a spurious const in add_folder() definition. - - added a $maildir_mtime option to allow this patch to be disabled at - runtime (see Bug#253261, comments from Zephaniah E. Hull). - - 2007-04-03 myon: resolved conflict in browser.c - -== END PATCH ---- a/buffy.c -+++ b/buffy.c -@@ -257,6 +257,7 @@ - (*tmp)->new = 0; - (*tmp)->notified = 1; - (*tmp)->newly_created = 0; -+ (*tmp)->mtime = 0; - - /* for check_mbox_size, it is important that if the folder is new (tested by - * reading it), the size is set to 0 so that later when we check we see -@@ -285,6 +286,7 @@ - { - BUFFY *tmp; - struct stat sb; -+ struct stat smd; - struct dirent *de; - DIR *dirp; - char path[_POSIX_PATH_MAX]; -@@ -333,6 +335,7 @@ - if (tmp->magic != M_IMAP) - #endif - tmp->new = 0; -+ tmp->mtime = 0; - - #ifdef USE_IMAP - if (tmp->magic != M_IMAP) -@@ -415,10 +418,20 @@ - if (*de->d_name != '.' && - (!(p = strstr (de->d_name, ":2,")) || !strchr (p + 3, 'T'))) - { -- /* one new and undeleted message is enough */ -- BuffyCount++; -- tmp->new = 1; -- break; -+ if (!tmp->new) -+ { -+ /* one new and undeleted message is enough */ -+ BuffyCount++; -+ tmp->new = 1; -+ -+ if (! option (OPTMAILDIRMTIME)) /* prevent stat calls */ -+ break; -+ } -+ snprintf (path, sizeof (path), "%s/new/%s", tmp->path, de->d_name); -+ if (!stat (path, &smd) && smd.st_mtime > tmp->mtime) -+ { -+ tmp->mtime = smd.st_mtime; -+ } - } - } - closedir (dirp); ---- a/init.h -+++ b/init.h -@@ -1350,6 +1350,16 @@ - ** \fBDON'T CHANGE THIS SETTING UNLESS YOU ARE REALLY SURE WHAT YOU ARE - ** DOING!\fP - */ -+ { "maildir_mtime", DT_BOOL, R_NONE, OPTMAILDIRMTIME, 0 }, -+ /* -+ ** .pp -+ ** If set, the sort-by-date option in the browser will sort maildirs -+ ** smartly, not using the mtime of the maildir itself but that of the -+ ** newest message in the new subdirectory, making the sorting by -+ ** reverse date much more useful. People with maildirs over NFS may -+ ** wish to leave this option unset. -+ ** -+ */ - #ifdef USE_HCACHE - { "maildir_header_cache_verify", DT_BOOL, R_NONE, OPTHCACHEVERIFY, 1 }, - /* ---- a/mutt.h -+++ b/mutt.h -@@ -384,6 +384,7 @@ - OPTINCLUDEONLYFIRST, - OPTKEEPFLAGGED, - OPTMAILCAPSANITIZE, -+ OPTMAILDIRMTIME, - OPTMAILDIRTRASH, - OPTMARKERS, - OPTMARKOLD, ---- a/browser.c -+++ b/browser.c -@@ -32,6 +32,7 @@ - #ifdef USE_IMAP - #include "imap.h" - #endif -+#include "mx.h" - - #include - #include -@@ -308,8 +309,10 @@ - } - - static void add_folder (MUTTMENU *m, struct browser_state *state, -- const char *name, const struct stat *s, int new) -+ const char *name, /*DEB const IAN*/ struct stat *s, BUFFY *mbuf) - { -+ int new = (mbuf) ? mbuf->new : 0; -+ - if (state->entrylen == state->entrymax) - { - /* need to allocate more space */ -@@ -321,6 +324,9 @@ - m->data = state->entry; - } - -+ if (mbuf && mbuf->magic == M_MAILDIR && mbuf->mtime) -+ s->st_mtime = mbuf->mtime; -+ - if (s != NULL) - { - (state->entry)[state->entrylen].mode = s->st_mode; -@@ -415,7 +421,7 @@ - tmp = Incoming; - while (tmp && mutt_strcmp (buffer, tmp->path)) - tmp = tmp->next; -- add_folder (menu, state, de->d_name, &s, (tmp) ? tmp->new : 0); -+ add_folder (menu, state, de->d_name, &s, tmp); - } - closedir (dp); - browser_sort (state); -@@ -443,14 +449,15 @@ - if (mx_is_imap (tmp->path)) - { - imap_mailbox_state (tmp->path, &mbox); -- add_folder (menu, state, tmp->path, NULL, mbox.new); -+ tmp->new = mbox.new; -+ add_folder (menu, state, tmp->path, NULL, tmp); - continue; - } - #endif - #ifdef USE_POP - if (mx_is_pop (tmp->path)) - { -- add_folder (menu, state, tmp->path, NULL, tmp->new); -+ add_folder (menu, state, tmp->path, NULL, tmp); - continue; - } - #endif -@@ -479,7 +486,7 @@ - strfcpy (buffer, NONULL(tmp->path), sizeof (buffer)); - mutt_pretty_mailbox (buffer, sizeof (buffer)); - -- add_folder (menu, state, buffer, &s, tmp->new); -+ add_folder (menu, state, buffer, &s, tmp); - } - while ((tmp = tmp->next)); - browser_sort (state); ---- a/buffy.h -+++ b/buffy.h -@@ -25,6 +25,7 @@ - char path[_POSIX_PATH_MAX]; - off_t size; - struct buffy_t *next; -+ time_t mtime; /* for maildirs...time of newest entry */ - short new; /* mailbox has new mail */ - short notified; /* user has been notified */ - short magic; /* mailbox type */ diff --git a/debian/patches/mutt-patched/sidebar-compat-apply.debian b/debian/patches/mutt-patched/sidebar-compat-apply.debian deleted file mode 100644 index ee9324d..0000000 --- a/debian/patches/mutt-patched/sidebar-compat-apply.debian +++ /dev/null @@ -1,30 +0,0 @@ -# vim:ft=diff: -[continued from sidebar-compat-revert] - -After having applied the sidebar patch, we now re-apply the relevant part of -the maildir-mtime patch. The hunk is considerably shorter as we are always -counting messages; the if..break part has been dropped. ---- a/buffy.c -+++ b/buffy.c -@@ -444,6 +444,11 @@ - tmp->has_new = tmp->new = 1; - tmp->msgcount++; - tmp->msg_unread++; -+ snprintf (path, sizeof (path), "%s/new/%s", tmp->path, de->d_name); -+ if (!stat (path, &smd) && smd.st_mtime > tmp->mtime) -+ { -+ tmp->mtime = smd.st_mtime; -+ } - } - } - if(tmp->msg_unread) ---- a/buffy.h -+++ b/buffy.h -@@ -26,6 +26,7 @@ - off_t size; - struct buffy_t *next; - struct buffy_t *prev; -+ time_t mtime; /* for maildirs...time of newest entry */ - short new; /* mailbox has new mail */ - short has_new; /* set it new if new and not read */ - int msgcount; /* total number of messages */ diff --git a/debian/patches/mutt-patched/sidebar-compat-revert.debian b/debian/patches/mutt-patched/sidebar-compat-revert.debian deleted file mode 100644 index 7e7eeae..0000000 --- a/debian/patches/mutt-patched/sidebar-compat-revert.debian +++ /dev/null @@ -1,48 +0,0 @@ -# vim:ft=diff: -The sidebar and maildir-mtime patches touch the same part of buffy.c and -generate a non-trivial conflict. This patch reverts the affected hunk from the -maildir-mtime patch so we can cleanly apply the sidebar patch from the patch -upstream site. While we are at it, we also revert the trivial buffy.h change. - -Previously, the mutt maintainer would manually re-resolve the conflict for each -new sidebar patch version which turned out to be too error-prone. -(cf. #484537, #484538) - -[see sidebar-compat-apply for part 2] ---- a/buffy.c -+++ b/buffy.c -@@ -418,20 +418,10 @@ - if (*de->d_name != '.' && - (!(p = strstr (de->d_name, ":2,")) || !strchr (p + 3, 'T'))) - { -- if (!tmp->new) -- { -- /* one new and undeleted message is enough */ -- BuffyCount++; -- tmp->new = 1; -- -- if (! option (OPTMAILDIRMTIME)) /* prevent stat calls */ -- break; -- } -- snprintf (path, sizeof (path), "%s/new/%s", tmp->path, de->d_name); -- if (!stat (path, &smd) && smd.st_mtime > tmp->mtime) -- { -- tmp->mtime = smd.st_mtime; -- } -+ /* one new and undeleted message is enough */ -+ BuffyCount++; -+ tmp->new = 1; -+ break; - } - } - closedir (dirp); ---- a/buffy.h -+++ b/buffy.h -@@ -25,7 +25,6 @@ - char path[_POSIX_PATH_MAX]; - off_t size; - struct buffy_t *next; -- time_t mtime; /* for maildirs...time of newest entry */ - short new; /* mailbox has new mail */ - short notified; /* user has been notified */ - short magic; /* mailbox type */ diff --git a/debian/patches/series b/debian/patches/series index 6955698..0dc2ae4 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -6,7 +6,6 @@ debian-specific/sort-patchlist # features features/ifdef -features/maildir-mtime features/xtitles features/trash-folder features/purge-message @@ -42,9 +41,7 @@ misc/smime_keys-manpage.patch mutt.org # extra patches for mutt-patched -mutt-patched/sidebar-compat-revert.debian mutt-patched/sidebar -mutt-patched/sidebar-compat-apply.debian mutt-patched/sidebar-dotted mutt-patched/sidebar-sorted