Am Fri,  4. Apr 2008, 12:53:26 +0200 schrieb Thijs Kinkhorst:
> > debtorrent: support can be added by inserting the following line into
> > /etc/apt/apt-file.conf:
> 
> Thanks for your patch - I'd gladly include it but must admit that I don't
> know how to test debtorrent. I perhaps could find out, but if you have a
> quick example of how this would work the bug could be fixed sooner :-)


6 Steps to test
---------------

1. Install debtorrent and apt-transport-debtorrent.
2. Replace 'deb http://' by 'deb debtorrent://localhost:9988/' in your
   /etc/apt/sources.list.
3. Verify that apt can still update package lists and download
   Packages.
4. Try apt-file update -- it should fail.
5. Add the line from my initial report to /atc/apt/apt-file.conf.
6. Try apt-file update again -- it should work now.


A bit of background
-------------------

About debtorrent, from debtorrents package description:

| DebTorrent is a proxy for downloading Debian packages files with
| APT. It will download any needed packages from other DebTorrent
| peers in a bittorrent-like manner, and so reduce the strain on the
| Debian mirrors.
|
| The DebTorrent client runs as a daemon, automatically started on
| bootup, and listens for requests from APT for files. Any non-package
| files are downloaded and served to APT similarly to other proxying
| software (e.g. apt-proxy, apt-cacher, and approx). The configuration
| is very simple, and only involves prepending a server and port to
| your current sources.list files (similar to apt-cacher).

So, when you have a line like 

| deb http://ftp.de.debian.org/debian/ lenny main

in your sources.list, with debtorrent it becomes

| deb http://localhost:9988/ftp.de.debian.org/debian/ lenny main

This setup works with apt-file out of the box.

So, by default, apt communicates with debtorrent via http://.  But
debtorrent also offers the debtorrent:// protocol for that purpose,
which has some advantages.  To use the debtorrent:// protocol with
apt, install apt-transport-debtorrent.  From apt-transport-debtorrents
package description:

| However, using this method has some advantages over HTTP. Unlike the
| traditional HTTP method, this transport will send all possible
| requests to DebTorrent as soon as it recieves them, which will speed
| up the download as peers can be contacted in parallel. This method
| also allows the DebTorrent client to return files to APT in any
| order, which is important since BitTorrent downloads proceed in a
| random order. Additionally, this method uses a very similar protocol
| to HTTP, and so can easily be used to access a DebTorrent client
| running on another host.

With the debtorrent protocol the sources.list entry becomes

| deb debtorrent://localhost:9988/ftp.de.debian.org/debian/ lenny main

But now apt-file fails, because apt-file doesn't know about
debtorrent://.  The fix is simple: use the http:// method instead to
talk to debtorrent.  We simply have to replace debtorrent:// with
http://.  Thats exactly what the debtorrent handler from my initial
report does.

Thanks,
Jö.

-- 
http://www.heise.de/tp/deutsch/inhalt/te/17529/1.html
"Wer nichts zu verbergen hat, kann auch seine echte Emailadresse
angeben." -- Luke321 im Telepolis-Forum

Attachment: signature.asc
Description: Digital signature

Reply via email to