diff -u pymsn-0.3.1/debian/changelog pymsn-0.3.1/debian/changelog --- pymsn-0.3.1/debian/changelog +++ pymsn-0.3.1/debian/changelog @@ -1,3 +1,12 @@ +pymsn (0.3.1-0ubuntu3.1) hardy; urgency=low + + * SRU upload + * 00-fix-dns-resolution.diff: Fix msn connection after server changes + (taken from upstream) (LP: #255307) + * Removed python-adns dependency + + -- Laurent Bigonville Wed, 06 Aug 2008 16:08:59 +0200 + pymsn (0.3.1-0ubuntu3) hardy; urgency=low * Depend on python (>= 2.5) | python-ctypes. diff -u pymsn-0.3.1/debian/control pymsn-0.3.1/debian/control --- pymsn-0.3.1/debian/control +++ pymsn-0.3.1/debian/control @@ -5,7 +5,7 @@ Maintainer: Ubuntu MOTU Developers XSBC-Original-Maintainer: Debian Telepathy maintainers Uploaders: Simon McVittie , Dafydd Harries , Daniel Holbach , Riccardo Setti , Sjoerd Simons , Jonny Lamb , Laurent Bigonville -Build-Depends: cdbs, debhelper (>= 5), python-all-dev (>= 2.3.5-11), python-central (>= 0.5), python-adns, python-pyopenssl, python-gobject, python-crypto +Build-Depends: cdbs, debhelper (>= 5), python-all-dev (>= 2.3.5-11), python-central (>= 0.5), python-pyopenssl, python-gobject, python-crypto Standards-Version: 3.7.3 XS-Dm-Upload-Allowed: yes Homepage: http://telepathy.freedesktop.org/wiki/Pymsn @@ -13,7 +13,7 @@ Package: python-msn Architecture: all -Depends: ${misc:Depends}, ${python:Depends}, python-gobject (>= 2.10.1), python (>= 2.5) | python-ctypes, python-adns, python-pyopenssl, python-crypto +Depends: ${misc:Depends}, ${python:Depends}, python-gobject (>= 2.10.1), python (>= 2.5) | python-ctypes, python-pyopenssl, python-crypto Provides: ${python:Provides} XB-Python-Version: ${python:Versions} Description: Python client library for the MSN protocol only in patch2: unchanged: --- pymsn-0.3.1.orig/debian/patches/00-fix-dns-resolution.diff +++ pymsn-0.3.1/debian/patches/00-fix-dns-resolution.diff @@ -0,0 +1,90 @@ +diff -Nruad -Nruad pymsn-0.3.1.orig/pymsn/gnet/resolver.py pymsn-0.3.1/pymsn/gnet/resolver.py +--- pymsn-0.3.1.orig/pymsn/gnet/resolver.py 2007-10-28 08:21:45.000000000 +0000 ++++ pymsn-0.3.1/pymsn/gnet/resolver.py 2008-08-05 23:25:27.000000000 +0100 +@@ -21,9 +21,10 @@ + + import socket + +-import adns + import gobject + ++from pymsn.util.decorator import async ++ + __all__ = ['HostnameResolver'] + + class HostnameResponse(object): +@@ -51,38 +52,23 @@ + + class HostnameResolver(object): + def __init__(self): +- self._c = adns.init(adns.iflags.noautosys) + self._queries = {} + + def query(self, host, callback): +- if self._is_ip(host): +- self._emit_response(callback, (0, None, 0, ((2, host),))) +- return +- +- query = self._c.submit(host, adns.rr.ADDR) +- self._queries[query] = host, callback +- if len(self._queries) == 1: +- gobject.timeout_add(10, self._process_queries) +- +- def _is_ip(self, address): +- try: +- socket.inet_pton(socket.AF_INET, address) +- except socket.error: +- try: +- socket.inet_pton(socket.AF_INET6, address) +- except socket.error: +- return False +- return True +- return True +- +- def _process_queries(self): +- for query in self._c.completed(0): +- response = query.check() +- qname, callback = self._queries[query] +- del self._queries[query] +- self._emit_response(callback, response) +- return len(self._queries) > 0 ++ result = socket.getaddrinfo(host, None, socket.AF_INET, socket.SOCK_STREAM) ++ if len(result) == 0: ++ status = 1 ++ cname = '' ++ expires = 0 ++ addresses = () ++ else: ++ status = 0 ++ cname = result[0][3] ++ expires = 0 ++ addresses = ((socket.AF_INET, result[0][4][0]),) ++ self._emit_response(callback, (status, cname, expires, addresses)) + ++ @async + def _emit_response(self, callback, response): + callback[0](HostnameResponse(response), *callback[1:]) + return False +diff -Nruad -Nruad pymsn-0.3.1.orig/pymsn/msnp/notification.py pymsn-0.3.1/pymsn/msnp/notification.py +--- pymsn-0.3.1.orig/pymsn/msnp/notification.py 2008-01-09 10:41:09.000000000 +0000 ++++ pymsn-0.3.1/pymsn/msnp/notification.py 2008-08-05 23:25:19.000000000 +0100 +@@ -248,7 +248,6 @@ + # Handlers --------------------------------------------------------------- + # --------- Connection --------------------------------------------------- + def _handle_VER(self, command): +- assert(len(command.arguments) > 1), "Invalid VER response : " + str(command) + self._protocol_version = int(command.arguments[0].lstrip('MSNP')) + self._send_command('CVR', + ProtocolConstant.CVR + (self._client.profile.account,)) +diff -Nruad -Nruad pymsn-0.3.1.orig/pymsn/util/decorator.py pymsn-0.3.1/pymsn/util/decorator.py +--- pymsn-0.3.1.orig/pymsn/util/decorator.py 2007-12-24 16:50:57.000000000 +0000 ++++ pymsn-0.3.1/pymsn/util/decorator.py 2008-08-06 11:59:16.000000000 +0100 +@@ -30,7 +30,7 @@ + """decorator to be used on decorators, it preserves the docstring and + function attributes of functions to which it is applied.""" + def new_decorator(f): +- g = decorator(f) ++ g = function(f) + g.__name__ = f.__name__ + g.__doc__ = f.__doc__ + g.__dict__.update(f.__dict__)