From: Artur Frysiak Date: Wed, 6 Oct 2010 16:31:50 +0000 (+0000) Subject: - fix for bug #612096 X-Git-Tag: auto/th/bzr-2_2_1-2 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fbzr.git;a=commitdiff_plain;h=57874ca138ad48ad61296b1edfaf0f5a024df6a0 - fix for bug #612096 - release 2 Changed files: bzr.spec -> 1.65 py27.patch -> 1.1 --- diff --git a/bzr.spec b/bzr.spec index 43f09ae..beae9cc 100644 --- a/bzr.spec +++ b/bzr.spec @@ -2,11 +2,13 @@ Summary: Bazaar - a distributed revision control system Summary(pl.UTF-8): Bazaar - rozproszony system kontroli wersji Name: bzr Version: 2.2.1 -Release: 1 +Release: 2 License: GPL v2 Group: Development/Version Control Source0: http://launchpad.net/bzr/2.2/%{version}/+download/%{name}-%{version}.tar.gz # Source0-md5: 8a6abd8f888fb3e0845e2044d41a24bc +# from https://bugs.launchpad.net/bzr/+bug/612096 +Patch0: py27.patch URL: http://bazaar.canonical.com/ BuildRequires: python >= 1:2.4 BuildRequires: python-devel @@ -65,6 +67,7 @@ rozszerzeń. %prep %setup -q +%patch0 -p0 %build %{__python} setup.py build diff --git a/py27.patch b/py27.patch new file mode 100644 index 0000000..88e67e0 --- /dev/null +++ b/py27.patch @@ -0,0 +1,40 @@ +=== modified file 'bzrlib/transport/http/_urllib2_wrappers.py' +--- bzrlib/transport/http/_urllib2_wrappers.py 2010-05-08 05:56:28 +0000 ++++ bzrlib/transport/http/_urllib2_wrappers.py 2010-09-15 02:43:44 +0000 +@@ -75,6 +75,26 @@ + ) + + ++class addinfourl(urllib2.addinfourl): ++ '''Replacement addinfourl class compatible with python-2.7's xmlrpclib ++ ++ In python-2.7, xmlrpclib expects that the response object that it receives ++ has a getheader method. httplib.HTTPResponse provides this but ++ urllib2.addinfourl does not. Add the necessary functions here, ported to ++ use the internal data structures of addinfourl. ++ ''' ++ ++ def getheader(self, name, default=None): ++ if self.headers is None: ++ raise httplib.ResponseNotReady() ++ return self.headers.getheader(name, default) ++ ++ def getheaders(self): ++ if self.headers is None: ++ raise httplib.ResponseNotReady() ++ return self.headers.items() ++ ++ + class _ReportingFileSocket(object): + + def __init__(self, filesock, report_activity=None): +@@ -656,7 +676,7 @@ + r = response + r.recv = r.read + fp = socket._fileobject(r, bufsize=65536) +- resp = urllib2.addinfourl(fp, r.msg, req.get_full_url()) ++ resp = addinfourl(fp, r.msg, req.get_full_url()) + resp.code = r.status + resp.msg = r.reason + resp.version = r.version +