diff options
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/acquire-item.cc | 6 | ||||
-rw-r--r-- | apt-pkg/aptconfiguration.cc | 4 | ||||
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 2 | ||||
-rw-r--r-- | apt-pkg/depcache.cc | 4 | ||||
-rw-r--r-- | apt-pkg/init.cc | 3 | ||||
-rw-r--r-- | apt-pkg/init.h | 2 |
6 files changed, 16 insertions, 5 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 2c4ce91a0..fdefe9097 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -672,7 +672,7 @@ string pkgAcqIndex::Custom600Headers() { string Final = _config->FindDir("Dir::State::lists"); Final += URItoFileName(RealURI); - if (_config->FindB("Acquire::GzipIndexes",false)) + if (_config->FindB("Acquire::GzipIndexes",true)) Final += ".gz"; struct stat Buf; @@ -795,7 +795,7 @@ void pkgAcqIndex::Done(string Message,unsigned long Size,string Hash, // The files timestamp matches if (StringToBool(LookupTag(Message,"IMS-Hit"),false) == true) { - if (_config->FindB("Acquire::GzipIndexes",false) && compExt == "gz") + if (_config->FindB("Acquire::GzipIndexes",true) && compExt == "gz") // Update DestFile for .gz suffix so that the clean operation keeps it DestFile += ".gz"; return; @@ -809,7 +809,7 @@ void pkgAcqIndex::Done(string Message,unsigned long Size,string Hash, string decompProg; // If we enable compressed indexes and already have gzip, keep it - if (_config->FindB("Acquire::GzipIndexes",false) && compExt == "gz" && !Local) { + if (_config->FindB("Acquire::GzipIndexes",true) && compExt == "gz" && !Local) { string FinalFile = _config->FindDir("Dir::State::lists"); FinalFile += URItoFileName(RealURI) + ".gz"; Rename(DestFile,FinalFile); diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc index 52f54073c..4b14e964a 100644 --- a/apt-pkg/aptconfiguration.cc +++ b/apt-pkg/aptconfiguration.cc @@ -69,6 +69,10 @@ const Configuration::getCompressionTypes(bool const &Cached) { types.push_back(*o); } + // default to preferring gzip, so that compressed indexes work + if (order.empty()) + types.push_back("gz"); + // move again over the option tree to add all missing compression types ::Configuration::Item const *Types = _config->Tree("Acquire::CompressionTypes"); if (Types != 0) diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 9f0da3be6..79bea85fe 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -1265,7 +1265,7 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg) string::size_type pos; FILE *report; - if (_config->FindB("Dpkg::ApportFailureReport", false) == false) + if (_config->FindB("Dpkg::ApportFailureReport", true) == false) { std::clog << "configured to not write apport reports" << std::endl; return; diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 23abc76c1..72bdd3199 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -1192,9 +1192,13 @@ bool pkgDepCache::IsDeleteOk(PkgIterator const &Pkg,bool rPurge, std::clog << OutputInDepth(Depth) << "Hold prevents MarkDelete of " << Pkg << " FU=" << FromUser << std::endl; return false; } + // if the removal is not explictely requested by the user, protect + // explicit new-install package from accidental removal by the + // problemresolver else if (FromUser == false && Pkg->CurrentVer == 0) { StateCache &P = PkgState[Pkg->ID]; + // Status == 2 means this applies for new installs only if (P.InstallVer != 0 && P.Status == 2 && (P.Flags & Flag::Auto) != Flag::Auto) { if (DebugMarker == true) diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc index f0bad78df..e031cbb94 100644 --- a/apt-pkg/init.cc +++ b/apt-pkg/init.cc @@ -84,6 +84,9 @@ bool pkgInitConfig(Configuration &Cnf) Cnf.Set("Dir::Ignore-Files-Silently::", "\\.disabled$"); Cnf.Set("Dir::Ignore-Files-Silently::", "\\.bak$"); Cnf.Set("Dir::Ignore-Files-Silently::", "\\.dpkg-[a-z]+$"); + // ubuntu specific + Cnf.Set("Dir::Ignore-Files-Silently::", "\\.distUpgrade$"); + Cnf.Set("Dir::Ignore-Files-Silently::", "\\.save$"); // Translation Cnf.Set("APT::Acquire::Translation", "environment"); diff --git a/apt-pkg/init.h b/apt-pkg/init.h index 15a1165b9..6d3ef953c 100644 --- a/apt-pkg/init.h +++ b/apt-pkg/init.h @@ -21,7 +21,7 @@ // reverse-dependencies of libapt-pkg against the new SONAME. // Non-ABI-Breaks should only increase RELEASE number. // See also buildlib/libversion.mak -#define APT_PKG_MAJOR 4 +#define APT_PKG_MAJOR 4 #define APT_PKG_MINOR 10 #define APT_PKG_RELEASE 1 |