// -*- 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
#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>
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());
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;
* 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
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
-// $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.
// 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
};
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
// -*- 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.
time_t HttpMethod::FailTime = 0;
unsigned long PipelineDepth = 10;
unsigned long TimeOut = 120;
+bool Debug = false;
// CircleBuf::CircleBuf - Circular input buffer /*{{{*/
// ---------------------------------------------------------------------
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);
}
TimeOut = _config->FindI("Acquire::http::Timeout",TimeOut);
PipelineDepth = _config->FindI("Acquire::http::Pipeline-Depth",
PipelineDepth);
+ Debug = _config->FindB("Debug::Acquire::http",false);
return true;
}