From 2c38625920fa67d52ade11fd7d28cdb5373dc31c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 31 Mar 2005 09:07:12 +0000 Subject: * merged the apt--main with the 2004 bwlimit tree Patches applied: * michael.vogt@canonical.com--2004/apt--bwlimit--0--base-0 tag of apt@packages.debian.org/apt--main--0--patch-47 * michael.vogt@canonical.com--2004/apt--bwlimit--0--patch-1 * fist attempt for bwlimit * michael.vogt@canonical.com--2004/apt--bwlimit--0--patch-2 * add a nanosleep, making it less cpu intensive * michael.vogt@canonical.com--2004/apt--bwlimit--0--patch-3 * use SingleInstance when DlLimit is activated * michael.vogt@canonical.com--2004/apt--bwlimit--0--patch-4 * cleanups, no code changes --- apt-pkg/acquire.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'apt-pkg') diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 70dce4f54..212c8d52b 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -266,6 +266,10 @@ pkgAcquire::MethodConfig *pkgAcquire::GetConfig(string Access) if (Work.Start() == false) return 0; + /* if a method uses DownloadLimit, we switch to SingleInstance mode */ + if(_config->FindI("Acquire::"+Access+"::DlLimit",0) > 0) + Conf->SingleInstance = true; + return Conf; } /*}}}*/ -- cgit v1.2.3