diff options
author | Narrat | 2016-04-10 22:26:01 +0200 |
---|---|---|
committer | Narrat | 2016-04-10 22:26:01 +0200 |
commit | e6d786cb1e541747eed6a485d3f6aec5af9e6495 (patch) | |
tree | a3675b551e8d4c065c3ed05e78e4d3c42f4d88bc | |
parent | f73b71a4903a84ac685f3b063c632d036ef585aa (diff) | |
download | aur-e6d786cb1e541747eed6a485d3f6aec5af9e6495.tar.gz |
Canto-Daemon: Add patch for parser issue
For more info see https://github.com/themoken/canto-next/issues/10
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 14 | ||||
-rw-r--r-- | drv_libxml2.patch | 21 |
3 files changed, 37 insertions, 4 deletions
@@ -1,7 +1,9 @@ +# Generated by mksrcinfo v8 +# Sun Apr 10 20:26:01 UTC 2016 pkgbase = canto-daemon pkgdesc = News aggregator for Atom/RSS/RDF pkgver = 0.9.5 - pkgrel = 3 + pkgrel = 4 url = http://codezen.org/canto-ng/ arch = any license = GPL @@ -9,7 +11,9 @@ pkgbase = canto-daemon optdepends = python-requests: Needed by inoreader plugin provides = canto-next-git=0.9.5 source = https://github.com/themoken/canto-next/archive/v0.9.5.tar.gz + source = drv_libxml2.patch md5sums = 128a5e59400bbf6f472c0109e66c6250 + md5sums = 9828e769497a7f8d670343f2fdfab03c pkgname = canto-daemon @@ -3,7 +3,7 @@ _pkgname=canto-next pkgname=canto-daemon pkgver=0.9.5 -pkgrel=3 +pkgrel=4 pkgdesc="News aggregator for Atom/RSS/RDF" url="http://codezen.org/canto-ng/" license=('GPL') @@ -11,10 +11,18 @@ arch=('any') depends=('python-feedparser') optdepends=('python-requests: Needed by inoreader plugin') provides=('canto-next-git=0.9.5') -source=(https://github.com/themoken/${_pkgname}/archive/v${pkgver}.tar.gz) -md5sums=('128a5e59400bbf6f472c0109e66c6250') +source=(https://github.com/themoken/${_pkgname}/archive/v${pkgver}.tar.gz + drv_libxml2.patch) +md5sums=('128a5e59400bbf6f472c0109e66c6250' + '9828e769497a7f8d670343f2fdfab03c') +prepare() { + cd ${_pkgname}-${pkgver} + # https://github.com/themoken/canto-next/issues/10 + patch -Np1 -i ${srcdir}/drv_libxml2.patch +} + package() { cd ${_pkgname}-${pkgver} diff --git a/drv_libxml2.patch b/drv_libxml2.patch new file mode 100644 index 000000000000..08c01e551145 --- /dev/null +++ b/drv_libxml2.patch @@ -0,0 +1,21 @@ +commit 3be0ad8b0a6a89d2a6ed04124f25912039ee2a30 +Author: Martin Zimmermann <info@posativ.org> +Date: Sun Apr 3 13:42:34 2016 +0200 + + remove drv_libxml2 from preferred xml parsers, if we get a TypeError, #10 + +diff --git a/canto_next/remote.py b/canto_next/remote.py +index bbfe9d6..e5c71fb 100644 +--- a/canto_next/remote.py ++++ b/canto_next/remote.py +@@ -164,6 +164,10 @@ class CantoRemote(PluginHandler, CantoClient): + 'Canto/0.9.0 + http://codezen.org/canto-ng' } + try: + content = feedparser.parse(URL, request_headers = extra_headers) ++ except TypeError: ++ if 'drv_libxml2' in feedparser.PREFERRED_XML_PARSERS: ++ feedparser.PREFERRED_XML_PARSERS.remove('drv_libxml2') ++ content = feedparser.parse(URL, request_headers = extra_headers) + except Exception as e: + print("ERROR: Couldn't determine name: %s" % e) + return None |