This patch adds new URI-based queuing mode for apt. It can be useful with package-caching proxies like apt-cacher-ng.
Usage: Acquire::Queue-Mode "uri";
commit 269431230038099d05fc6d78d81ea4e5a26b97b5 Author: Alexander Inyukhin <shur...@sectorb.msk.ru> Date: Tue Apr 21 03:51:20 2009 +0400 Add uri queue mode diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 38944bb..e3d8030 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -237,7 +237,10 @@ string pkgAcquire::QueueName(string Uri,MethodConfig const *&Config) if (Config->SingleInstance == true || QueueMode == QueueAccess) return U.Access; - return U.Access + ':' + U.Host; + if (QueueMode == QueueHost) + return U.Access + ':' + U.Host; + + return Uri; } /*}}}*/ // Acquire::GetConfig - Fetch the configuration information /*{{{*/ diff --git a/apt-pkg/acquire.h b/apt-pkg/acquire.h index 1de6f5e..e22a4ce 100644 --- a/apt-pkg/acquire.h +++ b/apt-pkg/acquire.h @@ -158,7 +158,10 @@ class pkgAcquire /** \brief Generate a single queue for each protocol; serialize * downloads from multiple hosts. */ - QueueAccess} QueueMode; + QueueAccess, + /** \brief Generate a single queue for each URI. + */ + QueueUri} QueueMode; /** \brief If \b true, debugging information will be dumped to std::clog. */ bool Debug;