Просмотр исходного кода

http pipelining control
Author: jgg
Date: 1998-12-10 05:39:53 GMT
http pipelining control

Arch Librarian лет назад: 22
Родитель
Сommit
85f72a5693
4 измененных файлов с 25 добавлено и 6 удалено
  1. 3 2
      cmdline/apt-cache.cc
  2. 6 1
      doc/apt.conf.5.yo
  3. 13 1
      methods/http.cc
  4. 3 2
      methods/http.h

+ 3 - 2
cmdline/apt-cache.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
-// $Id: apt-cache.cc,v 1.17 1998/12/10 04:22:48 jgg Exp $
+// $Id: apt-cache.cc,v 1.18 1998/12/10 05:39:53 jgg Exp $
 /* ######################################################################
    
    apt-cache - Manages the cache files
@@ -451,7 +451,8 @@ int ShowHelp()
    cout << "  -h   This help text." << endl;
    cout << "  -p=? The package cache. [" << _config->FindFile("Dir::Cache::pkgcache") << ']' << endl;
    cout << "  -s=? The source cache. [" << _config->FindFile("Dir::Cache::srcpkgcache") << ']' << endl;
-   cout << "  -q   Disable progress indicator. " << endl;
+   cout << "  -q   Disable progress indicator." << endl;
+   cout << "  -i   Show only important deps for the unmet command." << endl;
    cout << "  -c=? Read this configuration file" << endl;
    cout << "  -o=? Set an arbitary configuration option, ie -o dir::cache=/tmp" << endl;
    cout << "See the apt-cache(8) and apt.conf(8) manual pages for more information." << endl;

+ 6 - 1
doc/apt.conf.5.yo

@@ -87,7 +87,12 @@ updates its index files daily so the default is 1 day. bd(No-Store)
 specifies that the cache should never store this request, it is only
 set for archive files. This may be usefull to prevent polluting a proxy cache
 with very large .deb files. Note: Squid 2.0.2 does not support any of
-these options.
+these options. 
+
+One setting is provided to control the pipeline depth in cases where the
+remote server is not RFC conforming or buggy (such as Squid 2.0.2)
+Acquire::http::Pipeline-Depth can be a value from 0 to 5 indicating how many
+outstanding requests APT should send.
 
 dit(bf(cdrom))
 CDROM URIs; the only setting for CDROM URIs is the mount point, cdrom::Mount

+ 13 - 1
methods/http.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
-// $Id: http.cc,v 1.12 1998/12/10 04:22:53 jgg Exp $
+// $Id: http.cc,v 1.13 1998/12/10 05:39:55 jgg Exp $
 /* ######################################################################
 
    HTTP Aquire Method - This is the HTTP aquire method for APT.
@@ -937,6 +937,18 @@ bool HttpMethod::Fetch(FetchItem *)
    return true;
 };
 									/*}}}*/
+// HttpMethod::Configuration - Handle a configuration message		/*{{{*/
+// ---------------------------------------------------------------------
+/* We stash the desired pipeline depth */
+bool HttpMethod::Configuration(string Message)
+{
+   if (pkgAcqMethod::Configuration(Message) == false)
+      return false;
+   
+   PipelineDepth = _config->FindI("Acquire::http::Pipeline-Depth",5);
+   return true;
+}
+									/*}}}*/
 // HttpMethod::Loop - Main loop						/*{{{*/
 // ---------------------------------------------------------------------
 /* */

+ 3 - 2
methods/http.h

@@ -1,5 +1,5 @@
 // -*- mode: cpp; mode: fold -*-
-// Description								/*{{{*/// $Id: http.h,v 1.5 1998/12/05 04:19:06 jgg Exp $
+// Description								/*{{{*/// $Id: http.h,v 1.6 1998/12/10 05:39:56 jgg Exp $
 /* ######################################################################
 
    HTTP Aquire Method - This is the HTTP aquire method for APT.
@@ -118,7 +118,8 @@ class HttpMethod : public pkgAcqMethod
    bool ServerDie(ServerState *Srv);
    int DealWithHeaders(FetchResult &Res,ServerState *Srv);
 
-   bool Fetch(FetchItem *);
+   virtual bool Fetch(FetchItem *);
+   virtual bool Configuration(string Message);
    
    // In the event of a fatal signal this file will be closed and timestamped.
    static string FailFile;