ports/176079: [patch] mail/offlineimap: fix read-only folders

Matthew West ports at r.zeeb.org
Tue Feb 12 18:20:02 UTC 2013


>Number:         176079
>Category:       ports
>Synopsis:       [patch] mail/offlineimap: fix read-only folders
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 12 18:20:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Matthew West
>Release:        FreeBSD 8.3-RELEASE-p3 amd64
>Organization:
>Environment:

>Description:

Adds the patch from rea@ that fixes handling of read-only folders (e.g. GMail's Chat folder).

Eygene, as you're also port maintainer, would you mind adding this patch to the port?

I've been hoping for an updated version of offlineimap to be released, but it's been stuck at RC for almost 6 months now.

Thanks,

Matthew

>How-To-Repeat:
	
>Fix:

	

--- offlineimap.diff begins here ---
diff -ruN offlineimap.orig/Makefile offlineimap/Makefile
--- offlineimap.orig/Makefile	2012-11-17 07:59:07.000000000 +0200
+++ offlineimap/Makefile	2013-02-12 20:00:43.235994144 +0200
@@ -7,6 +7,7 @@
 
 PORTNAME=	offlineimap
 DISTVERSION=	6.5.4
+PORTREVISION=	1
 CATEGORIES=	mail python
 MASTER_SITES=	http://cloud.github.com/downloads/spaetz/offlineimap/ \
 		http://dist.codelabs.ru/fbsd/offlineimap/
diff -ruN offlineimap.orig/files/patch-properly-detect-readonly-folders offlineimap/files/patch-properly-detect-readonly-folders
--- offlineimap.orig/files/patch-properly-detect-readonly-folders	1970-01-01 02:00:00.000000000 +0200
+++ offlineimap/files/patch-properly-detect-readonly-folders	2012-08-05 20:43:01.000000000 +0200
@@ -0,0 +1,32 @@
+From 9ad8f76a4313b83587fc44c8c864c52f02a4692c Mon Sep 17 00:00:00 2001
+From: Eygene Ryabinkin <rea at codelabs.ru>
+Date: Sun, 5 Aug 2012 22:40:52 +0400
+Subject: [PATCH] IMAPlib mixin class: pass 'readonly' exception to our
+ callers
+
+This will allow our callers who are capable of dealing with
+readonly folders to properly detect this condition and act
+accordingly.
+
+Signed-off-by: Eygene Ryabinkin <rea at codelabs.ru>
+---
+ offlineimap/imaplibutil.py | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/offlineimap/imaplibutil.py b/offlineimap/imaplibutil.py
+index aa165f0..4290b2b 100644
+--- a/offlineimap/imaplibutil.py
++++ b/offlineimap/imaplibutil.py
+@@ -49,6 +49,9 @@ class UsefulIMAPMixIn(object):
+         del self.untagged_responses[:]
+         try:
+             result = super(UsefulIMAPMixIn, self).select(mailbox, readonly)
++        except self.readonly as e:
++            # pass self.readonly to our callers
++            raise
+         except self.abort as e:
+             # self.abort is raised when we are supposed to retry
+             errstr = "Server '%s' closed connection, error on SELECT '%s'. Ser"\
+-- 
+1.7.11.1
+
--- offlineimap.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list