I have been working on adding the URI replacement functionality to the downloader. By replacing the original URLs produced by the downloader with the URL of a debdelta repository, we can construct debdelta URIs. Following is my approach,
First, I defined the "Aquire::Debdelta::Replace-Rule::Replace-URI" config item in the pkgInitConfig() method to point to the debdelta repository at "http://debdeltas.debian.net/debian-deltas/". I did this as a temporary workaround. Ideally, this URL must be mentioned with the -o command line option, in apt's configuration file or in the sources.list file, because we believe maintaining two different configuration files for apt and debdelta is not productive. Then, in the debPackagesIndex::debPackagesIndex() method, I did the following to define a replacement URI for each URI that is constructed by the downloader. _config->Set("Aquire::Debdelta::Replace-Rule::URI-Space::"+URI, _config->Find("Aquire::Debdelta::Replace-Rule::Replace-URI")); Finally, I wrote the method, pkgAcqDebdelta::ReplaceURI() in which I applied the actual replacement. I used the Configuration::Tree() method to iterate through the children of the "Aquire::Debdelta::Replace-Rule::URI-Space::" item and replaced each of them with the replacement rule in "Aquire::Debdelta::Replace-Rule::Replace-URI" item. Currently, I am studying the original debdelta code base to add some modifications to it to suit some of our requirements. The main requirement is to add proper progress reporting, both in downloading and extracting deltas. For this, I need to look into the method/format etc. that the upstream uses already and reuse them appropriately. Another requirement is to find a better solution to debpatch's printing errors/warnings directly to stdout making debpatch difficult to use within the pipe in the debdelta method. Also, I need to test and verify the replacement rule's functionality with an actual replacement URI together with some real packages. My APT branch in Launchpad: https://code.launchpad.net/~udeshike/apt/apt-ishan -- Regards, Ishan Jayawardena. _______________________________________________ Soc-coordination mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/soc-coordination
