From mwest@zeeb.org  Tue Feb 12 18:11:48 2013
Return-Path: <mwest@zeeb.org>
Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
	by hub.freebsd.org (Postfix) with ESMTP id 466A3355
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 12 Feb 2013 18:11:48 +0000 (UTC)
	(envelope-from mwest@zeeb.org)
Received: from zeeb.org (unknown [IPv6:2a01:4f8:120:82c0::2])
	by mx1.freebsd.org (Postfix) with ESMTP id 07A77856
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 12 Feb 2013 18:11:47 +0000 (UTC)
Received: from mwest by zeeb.org with local (Exim 4.80.1 (FreeBSD))
	(envelope-from <mwest@zeeb.org>)
	id 1U5KKY-000PXh-UP
	for FreeBSD-gnats-submit@freebsd.org; Tue, 12 Feb 2013 20:11:46 +0200
Message-Id: <E1U5KKY-000PXh-UP@zeeb.org>
Date: Tue, 12 Feb 2013 20:11:46 +0200
From: Matthew West <ports@r.zeeb.org>
Sender: Matthew West <mwest@zeeb.org>
Reply-To: Matthew West <ports@r.zeeb.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] mail/offlineimap: fix read-only folders
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         176079
>Category:       ports
>Synopsis:       [patch] mail/offlineimap: fix read-only folders
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    rea
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 12 18:20:00 UTC 2013
>Closed-Date:    Fri Mar 01 19:43:12 UTC 2013
>Last-Modified:  Fri Mar  1 19:50:00 UTC 2013
>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@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@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:
Responsible-Changed-From-To: freebsd-ports-bugs->rea 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Tue Feb 12 18:20:10 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=176079 

From: Eygene Ryabinkin <rea@FreeBSD.org>
To: FreeBSD GNATS followup <bug-followup@freebsd.org>
Cc:  
Subject: Re: ports/176079: [patch] mail/offlineimap: fix read-only folders
Date: Fri, 1 Mar 2013 22:55:14 +0400

 --MGYHOYXEY6WxJCY8
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 Testing the patched port, please, wait for a couple of hours.
 --=20
 Eygene Ryabinkin                                        ,,,^..^,,,
 [ Life's unfair - but root password helps!           | codelabs.ru ]
 [ 82FE 06BC D497 C0DE 49EC  4FF0 16AF 9EAE 8152 ECFB | freebsd.org ]
 
 --MGYHOYXEY6WxJCY8
 Content-Type: application/pgp-signature
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (FreeBSD)
 
 iF4EABEIAAYFAlEw+ZIACgkQFq+eroFS7PuSlwD/X2FdErfHsuiGaFTXqKGSGsQX
 gn27+j1lYcLsSlTKGr0A+wf7HayLh/BtFU7Ssg7DpJ/rQjv+5Tf77WrUmXX3gp0P
 =ykgh
 -----END PGP SIGNATURE-----
 
 --MGYHOYXEY6WxJCY8--
State-Changed-From-To: open->closed 
State-Changed-By: rea 
State-Changed-When: Fri Mar 1 19:42:50 UTC 2013 
State-Changed-Why:  
Committed, 
http://svnweb.freebsd.org/ports?view=revision&revision=313165 

Thanks for your submission! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=176079 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/176079: commit references a PR
Date: Fri,  1 Mar 2013 19:41:42 +0000 (UTC)

 Author: rea
 Date: Fri Mar  1 19:41:33 2013
 New Revision: 313165
 URL: http://svnweb.freebsd.org/changeset/ports/313165
 
 Log:
   mail/offlineimap: add patch for proper handling of read-only folders
   
   PR:		176079
   QA page:	http://codelabs.ru/fbsd/ports/qa/mail/offlineimap/6.5.4_1
   Submitted by:	Matthew West <ports@r.zeeb.org>
   Feature safe:	yes
 
 Modified:
   head/mail/offlineimap/Makefile
   head/mail/offlineimap/distinfo
 
 Modified: head/mail/offlineimap/Makefile
 ==============================================================================
 --- head/mail/offlineimap/Makefile	Fri Mar  1 19:32:05 2013	(r313164)
 +++ head/mail/offlineimap/Makefile	Fri Mar  1 19:41:33 2013	(r313165)
 @@ -7,9 +7,11 @@
  
  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/
 +PATCH_SITES=	http://codelabs.ru/patches/offlineimap/
  DISTNAME=	${PORTNAME}-v${DISTVERSION}
  
  MAINTAINER=	rea@FreeBSD.org
 @@ -25,6 +27,8 @@ OPTIONS=	HTMLDOCS "Generate HTML documen
  WRKSRC=		${WRKDIR}/${GITHUB_USER}-${PORTNAME}-${GITHUB_HASH}
  SUB_FILES=	pkg-message
  PATCH_STRIP=	-p1
 +PATCH_DIST_STRIP=	-p1
 +PATCHFILES=	2012-properly-detect-readonly-folders.diff
  
  GITHUB_USER=	spaetz
  GITHUB_HASH=	c9e9690
 
 Modified: head/mail/offlineimap/distinfo
 ==============================================================================
 --- head/mail/offlineimap/distinfo	Fri Mar  1 19:32:05 2013	(r313164)
 +++ head/mail/offlineimap/distinfo	Fri Mar  1 19:41:33 2013	(r313165)
 @@ -1,2 +1,4 @@
  SHA256 (offlineimap-v6.5.4.tar.gz) = 831a97b5154f398b65e1c06427668b78cf833d99fac36cc8278ad2cf0c393a0c
  SIZE (offlineimap-v6.5.4.tar.gz) = 167023
 +SHA256 (2012-properly-detect-readonly-folders.diff) = 461dc50ba198d7460a196a9f85c69b0221678a2bb2244bc43c8ca8b4672b44bf
 +SIZE (2012-properly-detect-readonly-folders.diff) = 1131
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
