Author: baggins Date: Wed Mar 9 20:18:31 2011 GMT Module: packages Tag: HEAD ---- Log message: - rel 3 - use IMAP 'UID COPY' instead of fetch+upload to move messages to trash
---- Files affected: packages/mutt: mutt.spec (1.235 -> 1.236) , mutt-imap_fast_trash.patch (NONE -> 1.1) (NEW) ---- Diffs: ================================================================ Index: packages/mutt/mutt.spec diff -u packages/mutt/mutt.spec:1.235 packages/mutt/mutt.spec:1.236 --- packages/mutt/mutt.spec:1.235 Wed Mar 9 14:30:45 2011 +++ packages/mutt/mutt.spec Wed Mar 9 21:18:25 2011 @@ -23,7 +23,7 @@ Summary(uk.UTF-8): Поштова клієнтська програма Mutt Name: mutt Version: 1.5.21 -Release: 2 +Release: 3 Epoch: 6 License: GPL v2+ Group: Applications/Mail @@ -60,6 +60,7 @@ Patch21: %{name}-smime.rc.patch Patch22: %{name}-ac.patch Patch23: %{name}-sidebar.patch +Patch24: %{name}-imap_fast_trash.patch URL: http://www.mutt.org/ BuildRequires: autoconf BuildRequires: automake @@ -167,6 +168,7 @@ %patch21 -p1 %patch22 -p1 %patch23 -p1 +%patch24 -p1 # force regeneration (manual.sgml is modified by some patches) rm -f doc/{manual*.html,manual.txt} @@ -270,6 +272,10 @@ All persons listed below can be reached at <cvs_login>@pld-linux.org $Log$ +Revision 1.236 2011/03/09 20:18:25 baggins +- rel 3 +- use IMAP 'UID COPY' instead of fetch+upload to move messages to trash + Revision 1.235 2011/03/09 13:30:45 baggins - rel 2 - added sidebar patch (http://lunar-linux.org/index.php?page=mutt-sidebar) ================================================================ Index: packages/mutt/mutt-imap_fast_trash.patch diff -u /dev/null packages/mutt/mutt-imap_fast_trash.patch:1.1 --- /dev/null Wed Mar 9 21:18:31 2011 +++ packages/mutt/mutt-imap_fast_trash.patch Wed Mar 9 21:18:25 2011 @@ -0,0 +1,100 @@ +http://marc.info/?l=mutt-dev&m=128045511126422 + +Make "move to trash folder" use IMAP COPY. + +by Paul Miller (jettero) + +--- a/imap/imap.c ++++ b/imap/imap.c +@@ -893,6 +893,12 @@ static int imap_make_msg_set (IMAP_DATA* + if (hdrs[n]->deleted != HEADER_DATA(hdrs[n])->deleted) + match = invert ^ hdrs[n]->deleted; + break; ++ case M_EXPIRED: /* imap_fast_trash version of M_DELETED */ ++ if (hdrs[n]->purged) ++ break; ++ if (hdrs[n]->deleted != HEADER_DATA(hdrs[n])->deleted) ++ match = invert ^ hdrs[n]->deleted; ++ break; + case M_FLAG: + if (hdrs[n]->flagged != HEADER_DATA(hdrs[n])->flagged) + match = invert ^ hdrs[n]->flagged; +@@ -2028,3 +2034,54 @@ int imap_complete(char* dest, size_t dle + + return -1; + } ++ ++int imap_fast_trash() { ++ ++ if( Context->magic == M_IMAP && mx_is_imap(TrashPath) ) { ++ IMAP_MBOX mx; ++ IMAP_DATA *idata = (IMAP_DATA *) Context->data; ++ char mbox[LONG_STRING]; ++ char mmbox[LONG_STRING]; ++ int rc; ++ dprint(1, (debugfile, "[itf] trashcan seems to be on imap.\n")); ++ ++ if ( imap_parse_path(TrashPath, &mx) == 0 ) { ++ if( mutt_account_match(&(idata->conn->account), &(mx.account)) ) { ++ dprint(1, (debugfile, "[itf] trashcan seems to be on the same account.\n")); ++ ++ imap_fix_path (idata, mx.mbox, mbox, sizeof (mbox)); ++ if (!*mbox) ++ strfcpy (mbox, "INBOX", sizeof (mbox)); ++ imap_munge_mbox_name (mmbox, sizeof (mmbox), mbox); ++ ++ rc = imap_exec_msgset (idata, "UID COPY", mmbox, M_EXPIRED, 0, 0); ++ if (!rc) { ++ dprint (1, (debugfile, "imap_copy_messages: No messages del-tagged\n")); ++ rc = -1; ++ goto old_way; ++ ++ } else if (rc < 0) { ++ dprint (1, (debugfile, "could not queue copy\n")); ++ goto old_way; ++ ++ } else { ++ mutt_message (_("Copying %d messages to %s..."), rc, mbox); ++ return 0; ++ } ++ ++ } else { ++ dprint(1, (debugfile, "[itf] trashcan seems to be on a different account.\n")); ++ } ++ ++ old_way: ++ FREE (&mx.mbox); /* we probably only need to free this when the parse works */ ++ ++ } else { ++ dprint(1, (debugfile, "[itf] failed to parse TrashPath.\n" )); ++ } ++ ++ dprint(1, (debugfile, "[itf] giving up and trying old fasioned way.\n" )); ++ } ++ ++ return 1; ++} +--- a/imap/imap.h ++++ b/imap/imap.h +@@ -72,4 +72,7 @@ void imap_keepalive (void); + + int imap_account_match (const ACCOUNT* a1, const ACCOUNT* a2); + ++/* trash */ ++int imap_fast_trash(); ++ + #endif +--- a/mx.c ++++ b/mx.c +@@ -802,6 +802,11 @@ static int trash_append (CONTEXT *ctx) + && stc.st_dev == st.st_dev && stc.st_rdev == st.st_rdev) + return 0; /* we are in the trash folder: simple sync */ + ++ #ifdef USE_IMAP ++ if( !imap_fast_trash() ) ++ return 0; ++ #endif ++ + if ((ctx_trash = mx_open_mailbox (TrashPath, M_APPEND, NULL)) != NULL) + { + for (i = 0 ; i < ctx->msgcount ; i++) ================================================================ ---- CVS-web: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mutt/mutt.spec?r1=1.235&r2=1.236&f=u _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit