ports/139383: [patch] port mail/rss2email fails for certain feeds
Tobias Rehbein
tobias.rehbein at web.de
Tue Oct 6 17:50:02 UTC 2009
>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 at 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:
More information about the freebsd-ports-bugs
mailing list