diff options
author | rm <rm@FreeBSD.org> | 2015-03-11 01:28:24 +0800 |
---|---|---|
committer | rm <rm@FreeBSD.org> | 2015-03-11 01:28:24 +0800 |
commit | 32a64b5e8c47090b532628081b37853c25b06d45 (patch) | |
tree | 332e10840a78d673f8590efc579f1f7903a04ad8 | |
parent | 6c652deded56d021faa32de2520a5f0220c46638 (diff) | |
download | freebsd-ports-graphics-32a64b5e8c47090b532628081b37853c25b06d45.tar.gz freebsd-ports-graphics-32a64b5e8c47090b532628081b37853c25b06d45.tar.zst freebsd-ports-graphics-32a64b5e8c47090b532628081b37853c25b06d45.zip |
net-p2p/deluge: fix blocklist plugin
Add upstream patch to fix blocklist plugin with version of Twisted
that's now in ports tree.
Upstream bug report: http://dev.deluge-torrent.org/ticket/2737
PR: 198332
Reported by: Chris Ross <cross+freebsd@distal.com>
-rw-r--r-- | net-p2p/deluge/Makefile | 2 | ||||
-rw-r--r-- | net-p2p/deluge/files/patch-deluge_httpdownloader.py | 44 |
2 files changed, 45 insertions, 1 deletions
diff --git a/net-p2p/deluge/Makefile b/net-p2p/deluge/Makefile index 173ab95e303..1ea76330b76 100644 --- a/net-p2p/deluge/Makefile +++ b/net-p2p/deluge/Makefile @@ -2,7 +2,7 @@ PORTNAME= deluge PORTVERSION= 1.3.11 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 1 CATEGORIES= net-p2p python MASTER_SITES= http://download.deluge-torrent.org/source/ diff --git a/net-p2p/deluge/files/patch-deluge_httpdownloader.py b/net-p2p/deluge/files/patch-deluge_httpdownloader.py new file mode 100644 index 00000000000..1edfc741adf --- /dev/null +++ b/net-p2p/deluge/files/patch-deluge_httpdownloader.py @@ -0,0 +1,44 @@ +This patch is fixing new blocklist plugin incompatibility with newer +versions of Twisted. The fix will be included in deluge 1.3.12. + +References: + * bug-report: http://dev.deluge-torrent.org/ticket/2737 + * commit: http://dev.deluge-torrent.org/changeset/d40dfcd53c243 + +Index: deluge/httpdownloader.py +=================================================================== +--- deluge/httpdownloader.py (revision 8bf18d6694db24e04cb65f20f2e219ec14043f8e) ++++ deluge/httpdownloader.py (revision d40dfcd53c2439de121ddaff476e66194dc2c738) +@@ -147,5 +147,5 @@ + # Only use the basename + filename = os.path.basename(filename) +- ++ + filename = filename.strip() + if filename.startswith(".") or ";" in filename or "|" in filename: +@@ -193,15 +193,20 @@ + headers["accept-encoding"] = "deflate, gzip, x-gzip" + +- # In twisted 13.1.0 the _parse() function was replaced by the _URI class +- if hasattr(client, '_parse'): ++ # In Twisted 13.1.0 _parse() function replaced by _URI class. ++ # In Twisted 15.0.0 _URI class renamed to URI. ++ if hasattr(client, "_parse"): + scheme, host, port, path = client._parse(url) + else: +- from twisted.web.client import _URI +- uri = _URI.fromBytes(url) ++ try: ++ from twisted.web.client import _URI as URI ++ except ImportError: ++ from twisted.web.client import URI ++ ++ uri = URI.fromBytes(url) + scheme = uri.scheme + host = uri.host + port = uri.port + path = uri.path +- ++ + factory = HTTPDownloader(url, filename, callback, headers, force_filename, allow_compression) + if scheme == "https": |