diff options
-rw-r--r-- | apt-pkg/clean.cc | 8 | ||||
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | doc/apt.conf.5.yo | 6 | ||||
-rw-r--r-- | doc/examples/apt.conf | 8 | ||||
-rw-r--r-- | methods/http.cc | 8 |
5 files changed, 27 insertions, 6 deletions
diff --git a/apt-pkg/clean.cc b/apt-pkg/clean.cc index b859e382b..bad824362 100644 --- a/apt-pkg/clean.cc +++ b/apt-pkg/clean.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: clean.cc,v 1.2 1999/06/24 04:06:30 jgg Exp $ +// $Id: clean.cc,v 1.3 1999/10/03 21:09:27 jgg Exp $ /* ###################################################################### Clean - Clean out downloaded directories @@ -15,6 +15,7 @@ #include <apt-pkg/clean.h> #include <apt-pkg/strutl.h> #include <apt-pkg/error.h> +#include <apt-pkg/configuration.h> #include <dirent.h> #include <sys/stat.h> @@ -27,6 +28,8 @@ against our database to see if it is interesting */ bool pkgArchiveCleaner::Go(string Dir,pkgCache &Cache) { + bool CleanInstalled = _config->FindB("APT::Clean-Installed",true); + DIR *D = opendir(Dir.c_str()); if (D == 0) return _error->Errno("opendir","Unable to read %s",Dir.c_str()); @@ -84,7 +87,8 @@ bool pkgArchiveCleaner::Go(string Dir,pkgCache &Cache) for (pkgCache::VerFileIterator J = V.FileList(); J.end() == false; J++) { - if ((J.File()->Flags & pkgCache::Flag::NotSource) != 0) + if (CleanInstalled == true && + (J.File()->Flags & pkgCache::Flag::NotSource) != 0) continue; IsFetchable = true; break; diff --git a/debian/changelog b/debian/changelog index 2ac81132c..73da82750 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,8 +5,9 @@ apt (0.3.13.1) unstable; urgency=low * Make unparsable priorities non-fatal Closes: #46266, #46267, #46293, #46298 * Fix handling of '/' for the dist name. Closes: #43830, #45640, #45692 * Fixed 'Method gave a blank filename' error from IMS queries onto CDs. - Closes: #45034, #45695 + Closes: #45034, #45695, #46537 * Made OR group handling in the problem resolver more elaborate. Closes: #45646 + * Added APT::Clean-Installed option. Closes: #45973 -- Jason Gunthorpe <jgg@debian.org> Fri, 3 Sep 1999 09:04:28 -0700 diff --git a/doc/apt.conf.5.yo b/doc/apt.conf.5.yo index 9c4c0e4f1..4d3f3fd9f 100644 --- a/doc/apt.conf.5.yo +++ b/doc/apt.conf.5.yo @@ -55,6 +55,12 @@ dit(bf(Ignore-Hold)) Ignore Held packages; This global options causes the problem resolver to ignore held packages in its decision making. +dit(bf(Clean-Installed)) +Defaults to on. When turned on the autoclean feature will remove any pacakge +which can no longer be downloaded from the cache. If turned off then +packages that are locally installed are also excluded from cleaning - but +note that APT provides no direct means to reinstall them. + dit(bf(Immediate-Configure)) Disable Immedate Configuration; This dangerous option disables some of APT's ordering code to cause it to make fewer dpkg calls. Doing diff --git a/doc/examples/apt.conf b/doc/examples/apt.conf index dabdab35b..452e9c629 100644 --- a/doc/examples/apt.conf +++ b/doc/examples/apt.conf @@ -1,4 +1,4 @@ -// $Id: apt.conf,v 1.37 1999/08/28 03:22:45 jgg Exp $ +// $Id: apt.conf,v 1.38 1999/10/03 21:09:27 jgg Exp $ /* This file is an index of all APT configuration directives. It should NOT actually be used as a real config file, though it is a completely valid file. @@ -53,6 +53,7 @@ APT // Some general options Ignore-Hold "false"; + Clean-Installed "true"; Immediate-Configure "true"; // DO NOT turn this off, see the man page Force-LoopBreak "false"; // DO NOT turn this on, see the man page }; @@ -192,5 +193,10 @@ Debug pkgInitialize "false"; // This one will dump the configuration space NoLocking "false"; Acquire::Ftp "false"; // Show ftp command traffic + Acquire::Http "false"; // Show http command traffic aptcdrom "false"; // Show found package files } + +/* Whatever you do, do not use this configuration file!! Take out ONLY + the portions you need */ +ThisIsNotAValidConfigFile diff --git a/methods/http.cc b/methods/http.cc index ae7646a76..c4a3f1629 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: http.cc,v 1.37 1999/08/03 06:08:23 jgg Exp $ +// $Id: http.cc,v 1.38 1999/10/03 21:09:27 jgg Exp $ /* ###################################################################### HTTP Aquire Method - This is the HTTP aquire method for APT. @@ -54,6 +54,7 @@ int HttpMethod::FailFd = -1; time_t HttpMethod::FailTime = 0; unsigned long PipelineDepth = 10; unsigned long TimeOut = 120; +bool Debug = false; // CircleBuf::CircleBuf - Circular input buffer /*{{{*/ // --------------------------------------------------------------------- @@ -631,7 +632,9 @@ void HttpMethod::SendReq(FetchItem *Itm,CircleBuf &Out) Base64Encode(Proxy.User + ":" + Proxy.Password) + "\r\n"; Req += "User-Agent: Debian APT-HTTP/1.2\r\n\r\n"; -// cerr << Req << endl; + + if (Debug == true) + cerr << Req << endl; Out.Read(Req); } @@ -939,6 +942,7 @@ bool HttpMethod::Configuration(string Message) TimeOut = _config->FindI("Acquire::http::Timeout",TimeOut); PipelineDepth = _config->FindI("Acquire::http::Pipeline-Depth", PipelineDepth); + Debug = _config->FindB("Debug::Acquire::http",false); return true; } |