From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Oct 6 17:50:02 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5684D1065697 for ; Tue, 6 Oct 2009 17:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D178F8FC29 for ; Tue, 6 Oct 2009 17:50:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n96Ho1i0025668 for ; Tue, 6 Oct 2009 17:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n96Ho1YY025667; Tue, 6 Oct 2009 17:50:01 GMT (envelope-from gnats) Resent-Date: Tue, 6 Oct 2009 17:50:01 GMT Resent-Message-Id: <200910061750.n96Ho1YY025667@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Tobias Rehbein Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6B0C1065679 for ; Tue, 6 Oct 2009 17:49:08 +0000 (UTC) (envelope-from tobias.rehbein@web.de) Received: from fmmailgate03.web.de (fmmailgate03.web.de [217.72.192.234]) by mx1.freebsd.org (Postfix) with ESMTP id 6763E8FC25 for ; Tue, 6 Oct 2009 17:49:08 +0000 (UTC) Received: from smtp07.web.de (fmsmtp07.dlan.cinetic.de [172.20.5.215]) by fmmailgate03.web.de (Postfix) with ESMTP id 8C9D811F21DDB for ; Tue, 6 Oct 2009 19:49:07 +0200 (CEST) Received: from [95.88.224.31] (helo=sushi.pseudo.local) by smtp07.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #314) id 1MvE9p-0000XV-00 for FreeBSD-gnats-submit@freebsd.org; Tue, 06 Oct 2009 19:49:05 +0200 Received: from sushi.pseudo.local (localhost [127.0.0.1]) by sushi.pseudo.local (8.14.3/8.14.3) with ESMTP id n96HnKhY002744 for ; Tue, 6 Oct 2009 19:49:20 +0200 (CEST) (envelope-from tobi@sushi.pseudo.local) Received: (from tobi@localhost) by sushi.pseudo.local (8.14.3/8.14.3/Submit) id n96HnJ9n002743; Tue, 6 Oct 2009 19:49:19 +0200 (CEST) (envelope-from tobi) Message-Id: <200910061749.n96HnJ9n002743@sushi.pseudo.local> Date: Tue, 6 Oct 2009 19:49:19 +0200 (CEST) From: Tobias Rehbein Sender: tobias.rehbein@web.de To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/139383: [patch] port mail/rss2email fails for certain feeds X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Tobias Rehbein List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2009 17:50:02 -0000 >Number: 139383 >Category: ports >Synopsis: [patch] port mail/rss2email fails for certain feeds >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 Oct 06 17:50:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Tobias Rehbein >Release: FreeBSD 8.0-RC1 i386 >Organization: >Environment: System: FreeBSD sushi.pseudo.local 8.0-RC1 FreeBSD 8.0-RC1 #54: Sat Oct 3 16:40:05 CEST 2009 tobi@sushi.pseudo.local:/usr/obj/usr/src/sys/SUSHI i386 >Description: rss2email fails to process certain feeds. Most notably for me it bails out for sourceforges file release feeds. >How-To-Repeat: Example feed exposing the error: http://sourceforge.net/api/file/index/project-id/143991/rss >Fix: Attached is a patch which works around the issue. I have pulled it out of: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=543710 The corresponding bug report for feedparser is: http://code.google.com/p/feedparser/issues/detail?id=96 --- mail-rss2email.diff begins here --- diff -ruN mail/rss2email.orig/Makefile mail/rss2email/Makefile --- mail/rss2email.orig/Makefile 2009-09-30 16:05:17.000000000 +0200 +++ mail/rss2email/Makefile 2009-10-06 10:48:54.000000000 +0200 @@ -7,6 +7,7 @@ PORTNAME= rss2email PORTVERSION= 2.65 +PORTREVISION= 1 CATEGORIES= mail python MASTER_SITES= http://www.chifeng.name/dist/rss2email/ diff -ruN mail/rss2email.orig/files/patch-rss2email.py mail/rss2email/files/patch-rss2email.py --- mail/rss2email.orig/files/patch-rss2email.py 1970-01-01 01:00:00.000000000 +0100 +++ mail/rss2email/files/patch-rss2email.py 2009-10-06 10:47:13.000000000 +0200 @@ -0,0 +1,30 @@ +--- ./rss2email.py.orig 2009-10-06 10:43:03.000000000 +0200 ++++ ./rss2email.py 2009-10-06 10:43:26.000000000 +0200 +@@ -348,15 +348,15 @@ + if conts: + if HTMLOK: + for c in conts: +- if contains(c.type, 'html'): return ('HTML', c.value) ++ if contains(c.get('type',''), 'html'): return ('HTML', c.value) + + if not HTMLOK: # Only need to convert to text if HTML isn't OK + for c in conts: +- if contains(c.type, 'html'): ++ if contains(c.get('type',''), 'html'): + return html2text(c.value) + + for c in conts: +- if c.type == 'text/plain': return c.value ++ if c.get('type','') == 'text/plain': return c.value + + return conts[0].value + +@@ -595,7 +595,7 @@ + + if 'title_detail' in entry and entry.title_detail: + title = entry.title_detail.value +- if contains(entry.title_detail.type, 'html'): ++ if contains(entry.title_detail.get('type',''), 'html'): + title = html2text(title) + else: + title = getContent(entry)[:70] --- mail-rss2email.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: