Bug#349447: apt-proxy: Does not work with twisted 2.1
Package: apt-proxy Version: 1.9.32 Followup-For: Bug #349447 Hi, so I tried to find out what arm() did and discovered that this problem should have dealt with _much_ earlier. This function is already deprecated in twisted 1.3, which is released with Sarge. It just happens that it's implemented as do-nothing there and not as issue-a-warning. Anyway, from the source of twisted.internet.defer.Defer (comparing 0.15.5 and 2.1.0) it seems to me that arm is just not needed anymore. The armAndXXX methods all point to the normal addXXX methods and the code that arm() executed is included with those addXXX methods. So removing all arm-calls is actually correct and thus you can easily provide a repaired package with proper Depends on twisted-web and removed arm-calls. Andreas -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (990, 'unstable'), (500, 'experimental'), (500, 'testing'), (500, 'stable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.15-cherry Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Versions of packages apt-proxy depends on: ii adduser 3.80 Add and remove users and groups ii bzip2 1.0.3-2high-quality block-sorting file co ii debconf [debconf-2.0] 1.4.68 Debian configuration management sy ii logrotate 3.7.1-2Log rotation utility ii python2.3.5-5An interactive high-level object-o ii python-apt0.6.16 Python interface to libapt-pkg ii python-bsddb3 3.3.0-6Python interface to libdb3 ii python-twisted2.1.0-2Event-based framework for internet ii python2.3 2.3.5-9An interactive high-level object-o apt-proxy recommends no packages. -- debconf information: * apt-proxy/upgrading-v2: * apt-proxy/upgrading-v2-result: -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#349447: apt-proxy: Does not work with twisted 2.1.
Hi Andreas, So removing all arm-calls is actually correct and thus you can easily provide a repaired package with proper Depends on twisted-web and removed arm-calls. Actually the patched apt-proxy here fails to: * download dependencies when you install package X (no workaround for this) * re-download if something goes wrong like external (Debian mirror) connection closed (apt-get clean ; apt-get install X helps though) Therefore I'm not sure removing the calls is sufficient. First I thought I might have to call callback() (hey, the samples do this :)) but dismissed that idea pretty soon after trying it out.
Bug#349447: apt-proxy: Does not work with twisted 2.1
Package: apt-proxy Version: 1.9.32-0 Followup-For: Bug #349447 Hi, Actually the patched apt-proxy here fails to: * download dependencies when you install package X (no workaround for this) Are you sure this is apt-proxy? This sounds more like a problem with your frontend. Anyway, did an install of anjuta (which was never installed here before) which pulled in anjuta-common and that worked Ok. * re-download if something goes wrong like external (Debian mirror) connection closed (apt-get clean ; apt-get install X helps though) This too sounds more like a problem of the frontend, especially if apt-get clean helps which does _nothing_ with apt-proxy's cache. Can't confirm that with aptitude here. Therefore I'm not sure removing the calls is sufficient. I actually am pretty sure, because I read the source and the exact same thing that happened in arm() is now done in each of the addXXX methods. Now I'm of course neither a apt-proxy nor an twisted expert (neither am I a complete python expert), but I think I can compare 2 python code snippets for similarity. Anyway, apt-proxy with removed arm() calls works here and I'm able to build my own version as long as it is not officially fixed. Andreas -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (990, 'unstable'), (500, 'experimental'), (500, 'testing'), (500, 'stable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.15-cherry Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Versions of packages apt-proxy depends on: ii adduser 3.80 Add and remove users and groups ii bzip2 1.0.3-2high-quality block-sorting file co ii debconf [debconf-2.0] 1.4.68 Debian configuration management sy ii logrotate 3.7.1-2Log rotation utility ii python2.3.5-5An interactive high-level object-o ii python-apt0.6.16 Python interface to libapt-pkg ii python-bsddb3 3.3.0-6Python interface to libdb3 ii python-twisted2.1.0-2Event-based framework for internet ii python-twisted-web0.5.0-1An HTTP protocol implementation to apt-proxy recommends no packages. -- debconf information: * apt-proxy/upgrading-v2: * apt-proxy/upgrading-v2-result: -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#349447: apt-proxy: Does not work with twisted 2.1.
For the time being you can use the following diff. arm() is deprecated in Twisted 2.1 and as I've got not much Python experience I failed to adapt apt_proxy.py to the Twisted changes. Beware that this will most probably only work for the case when there is no error and fail if anything goes wrong while downloading from the external Debian mirror. If this happens you can try to work around by doing apt-get clean and installing/upgrading anew. This is the Deferred api as present in current Twisted: http://twistedmatrix.com/documents/current/api/twisted.internet.defer.Deferred.html#arm. Evil hack (no cure to the python-twisted incompatibility) to /usr/lib/python2.3/site-packages/apt_proxy/apt_proxy.py until a real Python programmer adapts apt-proxy: --- apt_proxy.py2005-08-19 19:15:20.0 +0200 +++ apt_proxy.py.new2006-01-23 13:48:24.0 +0100 @@ -819,7 +819,7 @@ d = self.ftpclient.queueStringCommand('SIZE ' + self.remote_file) d.addCallbacks(apFtpSizeFinish, apFtpSizeFinish, (self, 0), None, (self, 1), None) -d.arm() +#d.arm() def ftpFetchList(self): If ftpFetchSize didn't work try to get the size with a list command. @@ -839,7 +839,7 @@ d.addCallbacks(apFtpListFinish, apFtpListFinish, (filelist, self, 0), None, (filelist, self, 1), None) -d.arm() + #d.arm() def ftpFetchFile(self): And finally, we ask for the file. @@ -851,7 +851,7 @@ d.addCallbacks(apFtpFetchFinish, apFtpFetchFinish, (http.OK, good, self), None, (http.NOT_FOUND, fail, self), None) -d.arm() +#d.arm() def dataReceived(self, data): self.setResponseCode(http.OK) @@ -1486,7 +1486,7 @@ d.addCallbacks(fetch_real, fetch_real, (dummyFetcher, 1, running,), None, (dummyFetcher, 0, running,), None) -d.arm() +#d.arm() return None def simplify_path(self, old_path): @@ -1574,7 +1574,7 @@ verifier.deferred.addCallbacks(file_ok, deferred.errback, (deferred, self), None, None, None) -verifier.deferred.arm() +#verifier.deferred.arm() else: deferred.errback()
Bug#349447: apt-proxy: Does not work with twisted 2.1
Package: apt-proxy Version: 1.9.32 Followup-For: Bug #349447 Evil hack (no cure to the python-twisted incompatibility) to /usr/lib/python2.3/site-packages/apt_proxy/apt_proxy.py until a real Python programmer adapts apt-proxy: That means there won't be a working apt-proxy until someone who understands twisted and apt-proxy fixes apt-proxy? Wasn't there a plan of porting apt-proxy to Perl? Andreas -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (990, 'unstable'), (500, 'experimental'), (500, 'testing'), (500, 'stable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.15-cherry Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Versions of packages apt-proxy depends on: ii adduser 3.80 Add and remove users and groups ii bzip2 1.0.3-2high-quality block-sorting file co ii debconf [debconf-2.0] 1.4.68 Debian configuration management sy ii logrotate 3.7.1-2Log rotation utility ii python2.3.5-5An interactive high-level object-o ii python-apt0.6.16 Python interface to libapt-pkg ii python-bsddb3 3.3.0-6Python interface to libdb3 ii python-twisted2.1.0-2Event-based framework for internet ii python2.3 2.3.5-9An interactive high-level object-o apt-proxy recommends no packages. -- debconf information: * apt-proxy/upgrading-v2: * apt-proxy/upgrading-v2-result: -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#349447: apt-proxy: Does not work with twisted 2.1.
Package: apt-proxy Version: 1.9.32 Severity: grave Justification: renders package unusable Hi, I just upgraded to the latest version of twisted in unstable (2.1.0-2), which seems to be incompatible with apt-proxy. At first, there is a dependency problem, as apt-proxy should depend on python-twisted-web. After I installed this package manually, I was able to get apt-proxy running. It does not do anything at all, though. As soon as I try to update my package list, I get the following in apt-proxy.log: 2006/01/22 20:36 EST [-] Log opened. 2006/01/22 20:36 EST [-] twistd 2.1.0 (/usr/bin/python2.3 2.3.5) starting up 2006/01/22 20:36 EST [-] reactor class: twisted.internet.selectreactor.SelectReactor 2006/01/22 20:36 EST [-] Loading /usr/sbin/apt-proxy... 2006/01/22 20:36 EST [-] /usr/lib/python2.3/site-packages/twisted/manhole/telnet.py:8: exceptions.DeprecationWarning: As of Twisted 2.1, twisted.protocols.telnet is deprecated. See twisted.conch.telnet for the current, supported API. 2006/01/22 20:36 EST [-] WARNING: apt-proxy has not been tested under this version of twisted (2.1.0). 2006/01/22 20:36 EST [-] WARNING: although it should work without problem. 2006/01/22 20:36 EST [-] Loaded. 2006/01/22 20:36 EST [-] apt_proxy.apt_proxy.Factory starting on 2006/01/22 20:36 EST [-] Starting factory apt_proxy.apt_proxy.Factory instance at 0xb789b64c 2006/01/22 20:36 EST [-] set uid/gid 107/65534 2006/01/22 20:36 EST [Channel,0,127.0.0.1] Traceback (most recent call last): File /usr/lib/python2.3/site-packages/twisted/python/log.py, line 58, in callWithLogger return callWithContext({system: lp}, func, *args, **kw) File /usr/lib/python2.3/site-packages/twisted/python/log.py, line 43, in callWithContext return context.call({ILogContext: newCtx}, func, *args, **kw) File /usr/lib/python2.3/site-packages/twisted/python/context.py, line 59, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File /usr/lib/python2.3/site-packages/twisted/python/context.py, line 37, in callWithContext return func(*args,**kw) --- exception caught here --- File /usr/lib/python2.3/site-packages/twisted/internet/selectreactor.py, line 139, in _doReadOrWrite why = getattr(selectable, method)() File /usr/lib/python2.3/site-packages/twisted/internet/tcp.py, line 347, in doRead return self.protocol.dataReceived(data) File /usr/lib/python2.3/site-packages/twisted/protocols/basic.py, line 232, in dataReceived why = self.lineReceived(line) File /usr/lib/python2.3/site-packages/twisted/web/http.py, line 961, in lineReceived self.allContentReceived() File /usr/lib/python2.3/site-packages/apt_proxy/apt_proxy.py, line 1669, in allContentReceived http.HTTPChannel.allContentReceived(self) File /usr/lib/python2.3/site-packages/twisted/web/http.py, line 1002, in allContentReceived req.requestReceived(command, path, version) File /usr/lib/python2.3/site-packages/twisted/web/http.py, line 557, in requestReceived self.process() File /usr/lib/python2.3/site-packages/apt_proxy/apt_proxy.py, line 1406, in process self.fetch() File /usr/lib/python2.3/site-packages/apt_proxy/apt_proxy.py, line 1485, in fetch d = self.check_cached() File /usr/lib/python2.3/site-packages/apt_proxy/apt_proxy.py, line 1577, in check_cached verifier.deferred.arm() exceptions.AttributeError: Deferred instance has no attribute 'arm' -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (600, 'unstable'), (570, 'experimental') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.15 Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Versions of packages apt-proxy depends on: ii adduser 3.80 Add and remove users and groups ii bzip2 1.0.3-2high-quality block-sorting file co ii debconf [debconf-2.0] 1.4.68 Debian configuration management sy ii logrotate 3.7.1-2Log rotation utility ii python2.3.5-5An interactive high-level object-o ii python-apt0.6.16 Python interface to libapt-pkg ii python-bsddb3 3.3.0-6Python interface to libdb3 ii python-twisted2.0.1-3Event-based framework for internet ii python2.3 2.3.5-9An interactive high-level object-o apt-proxy recommends no packages. -- debconf information excluded -- Philipp Weis [EMAIL PROTECTED] signature.asc Description: Digital signature