summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-08-27 14:16:07 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2009-08-27 14:16:07 +0200
commitfe58cbc86638e214fa137166a704fbff798c546a (patch)
treefcd445921d800462a2dab16db2951024440d4956
parentf30eb61fde728f125bf7c673cadc17f43d82a2d0 (diff)
parent8c75bf9e9558d062a5f3d1fe5276aeffba6403a0 (diff)
merged from lp:~donkult/apt/sid
-rw-r--r--apt-inst/contrib/arfile.cc2
-rw-r--r--apt-pkg/acquire-item.cc73
-rw-r--r--apt-pkg/acquire-item.h10
-rw-r--r--apt-pkg/aptconfiguration.cc78
-rw-r--r--apt-pkg/aptconfiguration.h46
-rw-r--r--apt-pkg/contrib/fileutl.cc2
-rw-r--r--apt-pkg/contrib/strutl.cc4
-rw-r--r--apt-pkg/depcache.cc4
-rw-r--r--apt-pkg/indexcopy.cc3
-rw-r--r--apt-pkg/init.cc2
-rw-r--r--apt-pkg/makefile5
-rw-r--r--cmdline/apt-cache.cc6
-rw-r--r--cmdline/apt-get.cc106
-rw-r--r--configure.in4
-rw-r--r--debian/changelog49
-rw-r--r--doc/apt-get.8.xml39
-rw-r--r--doc/apt-mark.8.xml48
-rw-r--r--doc/apt.conf.5.xml27
-rw-r--r--ftparchive/writer.cc2
-rw-r--r--methods/http.cc4
-rw-r--r--po/apt-all.pot277
21 files changed, 548 insertions, 243 deletions
diff --git a/apt-inst/contrib/arfile.cc b/apt-inst/contrib/arfile.cc
index 7c85f2e86..e6c63d1ab 100644
--- a/apt-inst/contrib/arfile.cc
+++ b/apt-inst/contrib/arfile.cc
@@ -96,7 +96,7 @@ bool ARArchive::LoadHeaders()
char S[300];
unsigned long Len;
if (StrToNum(Head.Name+3,Len,sizeof(Head.Size)-3) == false ||
- Len >= strlen(S))
+ Len >= sizeof(S))
{
delete Memb;
return _error->Error(_("Invalid archive member header"));
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 39ae327cb..94341c81a 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -15,6 +15,7 @@
// Include Files /*{{{*/
#include <apt-pkg/acquire-item.h>
#include <apt-pkg/configuration.h>
+#include <apt-pkg/aptconfiguration.h>
#include <apt-pkg/sourcelist.h>
#include <apt-pkg/vendorlist.h>
#include <apt-pkg/error.h>
@@ -551,13 +552,14 @@ pkgAcqIndex::pkgAcqIndex(pkgAcquire *Owner,
if(comprExt.empty())
{
// autoselect the compression method
- if(FileExists("/bin/bzip2"))
- CompressionExtension = ".bz2";
- else
- CompressionExtension = ".gz";
- } else {
- CompressionExtension = (comprExt == "plain" ? "" : comprExt);
+ std::vector<std::string> types = APT::Configuration::getCompressionTypes();
+ if (types.empty() == true)
+ comprExt = "plain";
+ else
+ comprExt = "." + types[0];
}
+ CompressionExtension = ((comprExt == "plain" || comprExt == ".") ? "" : comprExt);
+
Desc.URI = URI + CompressionExtension;
Desc.Description = URIDesc;
@@ -584,28 +586,31 @@ string pkgAcqIndex::Custom600Headers()
/*}}}*/
void pkgAcqIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{{*/
{
- bool descChanged = false;
- // no .bz2 found, retry with .gz
- if(Desc.URI.substr(Desc.URI.size()-3) == "bz2") {
- Desc.URI = Desc.URI.substr(0,Desc.URI.size()-3) + "gz";
-
- new pkgAcqIndex(Owner, RealURI, Desc.Description,Desc.ShortDesc,
- ExpectedHash, string(".gz"));
- descChanged = true;
- }
- // no .gz found, retry with uncompressed
- else if(Desc.URI.substr(Desc.URI.size()-2) == "gz") {
- Desc.URI = Desc.URI.substr(0,Desc.URI.size()-2);
+ std::vector<std::string> types = APT::Configuration::getCompressionTypes();
- new pkgAcqIndex(Owner, RealURI, Desc.Description,Desc.ShortDesc,
- ExpectedHash, string("plain"));
- descChanged = true;
- }
- if (descChanged) {
- Status = StatDone;
- Complete = false;
- Dequeue();
- return;
+ for (std::vector<std::string>::const_iterator t = types.begin();
+ t != types.end(); t++)
+ {
+ // jump over all already tried compression types
+ const unsigned int nameLen = Desc.URI.size() - (*t).size();
+ if(Desc.URI.substr(nameLen) != *t)
+ continue;
+
+ // we want to try it with the next extension
+ t++;
+
+ if (t != types.end())
+ {
+ Desc.URI = Desc.URI.substr(0, nameLen) + *t;
+
+ new pkgAcqIndex(Owner, RealURI, Desc.Description, Desc.ShortDesc,
+ ExpectedHash, string(".").append(*t));
+
+ Status = StatDone;
+ Complete = false;
+ Dequeue();
+ return;
+ }
}
// on decompression failure, remove bad versions in partial/
@@ -698,11 +703,11 @@ void pkgAcqIndex::Done(string Message,unsigned long Size,string Hash,
Local = true;
string compExt = flExtension(flNotDir(URI(Desc.URI).Path));
- const char *decompProg;
- if(compExt == "bz2")
- decompProg = "bzip2";
- else if(compExt == "gz")
- decompProg = "gzip";
+ string decompProg;
+
+ // get the binary name for your used compression type
+ decompProg = _config->Find(string("Acquire::CompressionTypes::").append(compExt),"");
+ if(decompProg.empty() == false);
// flExtensions returns the full name if no extension is found
// this is why we have this complicated compare operation here
// FIMXE: add a new flJustExtension() that return "" if no
@@ -717,9 +722,9 @@ void pkgAcqIndex::Done(string Message,unsigned long Size,string Hash,
Decompression = true;
DestFile += ".decomp";
- Desc.URI = string(decompProg) + ":" + FileName;
+ Desc.URI = decompProg + ":" + FileName;
QueueURI(Desc);
- Mode = decompProg;
+ Mode = decompProg.c_str();
}
/*}}}*/
// AcqIndexTrans::pkgAcqIndexTrans - Constructor /*{{{*/
diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h
index 36a926a0f..3f073de5b 100644
--- a/apt-pkg/acquire-item.h
+++ b/apt-pkg/acquire-item.h
@@ -540,7 +540,9 @@ class pkgAcqIndex : public pkgAcquire::Item
*
* \param compressExt The compression-related extension with which
* this index file should be downloaded, or "" to autodetect
- * (".bz2" is used if bzip2 is installed, ".gz" otherwise).
+ * Compression types can be set with config Acquire::CompressionTypes,
+ * default is ".lzma" or ".bz2" (if the needed binaries are present)
+ * fallback is ".gz" or none.
*/
pkgAcqIndex(pkgAcquire *Owner,string URI,string URIDesc,
string ShortDesc, HashString ExpectedHash, string compressExt="");
@@ -569,12 +571,6 @@ class pkgAcqIndexTrans : public pkgAcqIndex
* \param URIDesc A "URI-style" description of this index file.
*
* \param ShortDesc A brief description of this index file.
- *
- * \param ExpectedHash The expected hashsum of this index file.
- *
- * \param compressExt The compression-related extension with which
- * this index file should be downloaded, or "" to autodetect
- * (".bz2" is used if bzip2 is installed, ".gz" otherwise).
*/
pkgAcqIndexTrans(pkgAcquire *Owner,string URI,string URIDesc,
string ShortDesc);
diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc
new file mode 100644
index 000000000..1a8e8262f
--- /dev/null
+++ b/apt-pkg/aptconfiguration.cc
@@ -0,0 +1,78 @@
+// -*- mode: cpp; mode: fold -*-
+// Description /*{{{*/
+/* ######################################################################
+
+ Provide access methods to various configuration settings,
+ setup defaults and returns validate settings.
+
+ ##################################################################### */
+ /*}}}*/
+// Include Files /*{{{*/
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/aptconfiguration.h>
+#include <apt-pkg/configuration.h>
+
+#include <vector>
+#include <string>
+ /*}}}*/
+namespace APT {
+// getCompressionTypes - Return Vector of usbale compressiontypes /*{{{*/
+// ---------------------------------------------------------------------
+/* return a vector of compression types in the prefered order. */
+std::vector<std::string>
+const Configuration::getCompressionTypes(bool const &Cached) {
+ static std::vector<std::string> types;
+ if (types.empty() == false) {
+ if (Cached == true)
+ return types;
+ else
+ types.clear();
+ }
+
+ // Set default application paths to check for optional compression types
+ _config->CndSet("Dir::Bin::lzma", "/usr/bin/lzma");
+ _config->CndSet("Dir::Bin::bzip2", "/bin/bzip2");
+
+ ::Configuration::Item const *Opts = _config->Tree("Acquire::CompressionTypes");
+ if (Opts != 0)
+ Opts = Opts->Child;
+
+ // at first, move over the options to setup at least the default options
+ bool foundLzma=false, foundBzip2=false, foundGzip=false;
+ for (; Opts != 0; Opts = Opts->Next) {
+ if (Opts->Value == "lzma")
+ foundLzma = true;
+ else if (Opts->Value == "bz2")
+ foundBzip2 = true;
+ else if (Opts->Value == "gz")
+ foundGzip = true;
+ }
+
+ // setup the defaults now
+ if (!foundBzip2)
+ _config->Set("Acquire::CompressionTypes::bz2","bzip2");
+ if (!foundLzma)
+ _config->Set("Acquire::CompressionTypes::lzma","lzma");
+ if (!foundGzip)
+ _config->Set("Acquire::CompressionTypes::gz","gzip");
+
+ // move again over the option tree to finially calculate our result
+ ::Configuration::Item const *Types = _config->Tree("Acquire::CompressionTypes");
+ if (Types != 0)
+ Types = Types->Child;
+
+ for (; Types != 0; Types = Types->Next) {
+ string const appsetting = string("Dir::Bin::").append(Types->Value);
+ // ignore compression types we have no app ready to use
+ if (appsetting.empty() == false && _config->Exists(appsetting) == true) {
+ std::string const app = _config->FindFile(appsetting.c_str(), "");
+ if (app.empty() == false && FileExists(app) == false)
+ continue;
+ }
+ types.push_back(Types->Tag);
+ }
+
+ return types;
+}
+ /*}}}*/
+}
diff --git a/apt-pkg/aptconfiguration.h b/apt-pkg/aptconfiguration.h
new file mode 100644
index 000000000..6a123adce
--- /dev/null
+++ b/apt-pkg/aptconfiguration.h
@@ -0,0 +1,46 @@
+// -*- mode: cpp; mode: fold -*-
+// Description /*{{{*/
+/** \class APT::Configuration
+ * \brief Provide access methods to various configuration settings
+ *
+ * This class and their methods providing a layer around the usual access
+ * methods with _config to ensure that settings are correct and to be able
+ * to set defaults without the need to recheck it in every method again.
+ */
+ /*}}}*/
+#ifndef APT_CONFIGURATION_H
+#define APT_CONFIGURATION_H
+// Include Files /*{{{*/
+#include <string>
+#include <vector>
+ /*}}}*/
+namespace APT {
+class Configuration { /*{{{*/
+public: /*{{{*/
+ /** \brief Returns a vector of usable Compression Types
+ *
+ * Files can be compressed in various ways to decrease the size of the
+ * download. Therefore the Acquiremethods support a few compression types
+ * and some archives provide also a few different types. This option
+ * group exists to give the user the choice to prefer one type over the
+ * other (some compression types are very resource intensive - great if you
+ * have a limited download, bad if you have a really lowpowered hardware.)
+ *
+ * This method ensures that the defaults are set and checks at runtime
+ * if the type can be used. E.g. the current default is to prefer bzip2
+ * over lzma and gz - if the bzip2 binary is not available it has not much
+ * sense in downloading the bz2 file, therefore we will not return bz2 as
+ * a usable compression type. The availability is checked with the settings
+ * in the Dir::Bin group.
+ *
+ * \param Cached saves the result so we need to calculated it only once
+ * this parameter should ony be used for testing purposes.
+ *
+ * \return a vector of (all) Language Codes in the prefered usage order
+ */
+ std::vector<std::string> static const getCompressionTypes(bool const &Cached = true);
+ /*}}}*/
+};
+ /*}}}*/
+}
+#endif
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc
index a7de09c44..4240d9f49 100644
--- a/apt-pkg/contrib/fileutl.cc
+++ b/apt-pkg/contrib/fileutl.cc
@@ -451,10 +451,12 @@ bool ExecWait(pid_t Pid,const char *Name,bool Reap)
if (Reap == true)
return false;
if (WIFSIGNALED(Status) != 0)
+ {
if( WTERMSIG(Status) == SIGSEGV)
return _error->Error(_("Sub-process %s received a segmentation fault."),Name);
else
return _error->Error(_("Sub-process %s received signal %u."),Name, WTERMSIG(Status));
+ }
if (WIFEXITED(Status) != 0)
return _error->Error(_("Sub-process %s returned an error code (%u)"),Name,WEXITSTATUS(Status));
diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
index a991b8988..1683868c8 100644
--- a/apt-pkg/contrib/strutl.cc
+++ b/apt-pkg/contrib/strutl.cc
@@ -304,13 +304,13 @@ string SizeToStr(double Size)
{
if (ASize < 100 && I != 0)
{
- sprintf(S,"%.1f%c",ASize,Ext[I]);
+ sprintf(S,"%'.1f%c",ASize,Ext[I]);
break;
}
if (ASize < 10000)
{
- sprintf(S,"%.0f%c",ASize,Ext[I]);
+ sprintf(S,"%'.0f%c",ASize,Ext[I]);
break;
}
ASize /= 1000.0;
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index 13abbe5ed..228750b74 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -823,7 +823,7 @@ void pkgDepCache::MarkDelete(PkgIterator const &Pkg, bool rPurge,
bool pkgDepCache::IsDeleteOk(PkgIterator const &Pkg,bool rPurge,
unsigned long Depth, bool FromUser)
{
- if (FromUser == false && Pkg->SelectedState == pkgCache::State::Hold)
+ if (FromUser == false && Pkg->SelectedState == pkgCache::State::Hold && _config->FindB("APT::Ignore-Hold",false) == false)
{
if (DebugMarker == true)
std::clog << OutputInDepth(Depth) << "Hold prevents MarkDelete of " << Pkg << " FU=" << FromUser << std::endl;
@@ -1085,7 +1085,7 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
bool pkgDepCache::IsInstallOk(PkgIterator const &Pkg,bool AutoInst,
unsigned long Depth, bool FromUser)
{
- if (FromUser == false && Pkg->SelectedState == pkgCache::State::Hold)
+ if (FromUser == false && Pkg->SelectedState == pkgCache::State::Hold && _config->FindB("APT::Ignore-Hold",false) == false)
{
if (DebugMarker == true)
std::clog << OutputInDepth(Depth) << "Hold prevents MarkInstall of " << Pkg << " FU=" << FromUser << std::endl;
diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc
index 15696585a..0142d7dbe 100644
--- a/apt-pkg/indexcopy.cc
+++ b/apt-pkg/indexcopy.cc
@@ -592,7 +592,10 @@ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector<string> &SigList,
// a Release.gpg without a Release should never happen
if(!FileExists(*I+"Release"))
+ {
+ delete MetaIndex;
continue;
+ }
// verify the gpg signature of "Release"
diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc
index 63caade36..15efb1a3d 100644
--- a/apt-pkg/init.cc
+++ b/apt-pkg/init.cc
@@ -103,7 +103,7 @@ bool pkgInitConfig(Configuration &Cnf)
if (Res == false)
return false;
-
+
if (Cnf.FindB("Debug::pkgInitConfig",false) == true)
Cnf.Dump();
diff --git a/apt-pkg/makefile b/apt-pkg/makefile
index 92ef58967..679d97e70 100644
--- a/apt-pkg/makefile
+++ b/apt-pkg/makefile
@@ -34,14 +34,15 @@ SOURCE+= pkgcache.cc version.cc depcache.cc \
acquire-worker.cc acquire-method.cc init.cc clean.cc \
srcrecords.cc cachefile.cc versionmatch.cc policy.cc \
pkgsystem.cc indexfile.cc pkgcachegen.cc acquire-item.cc \
- indexrecords.cc vendor.cc vendorlist.cc cdrom.cc indexcopy.cc
+ indexrecords.cc vendor.cc vendorlist.cc cdrom.cc indexcopy.cc \
+ aptconfiguration.cc
HEADERS+= algorithms.h depcache.h pkgcachegen.h cacheiterators.h \
orderlist.h sourcelist.h packagemanager.h tagfile.h \
init.h pkgcache.h version.h progress.h pkgrecords.h \
acquire.h acquire-worker.h acquire-item.h acquire-method.h \
clean.h srcrecords.h cachefile.h versionmatch.h policy.h \
pkgsystem.h indexfile.h metaindex.h indexrecords.h vendor.h \
- vendorlist.h cdrom.h indexcopy.h
+ vendorlist.h cdrom.h indexcopy.h aptconfiguration.h
# Source code for the debian specific components
# In theory the deb headers do not need to be exported..
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index 0e950310b..7d7f58a62 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -929,7 +929,11 @@ bool XVcg(CommandLine &CmdL)
Shapes[ShapeMap[Pkg->ID]]);
}
-
+
+ delete[] Show;
+ delete[] Flags;
+ delete[] ShapeMap;
+
printf("}\n");
return true;
}
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index ab6dca388..1582fff85 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -868,8 +868,11 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true,
if (unsigned(Buf.f_bfree) < (FetchBytes - FetchPBytes)/Buf.f_bsize)
{
struct statfs Stat;
- if (statfs(OutputDir.c_str(),&Stat) != 0 ||
- unsigned(Stat.f_type) != RAMFS_MAGIC)
+ if (statfs(OutputDir.c_str(),&Stat) != 0
+#if HAVE_STRUCT_STATFS_F_TYPE
+ || unsigned(Stat.f_type) != RAMFS_MAGIC
+#endif
+ )
return _error->Error(_("You don't have enough free space in %s."),
OutputDir.c_str());
}
@@ -1217,17 +1220,25 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
{
// We want to pull the version off the package specification..
string VerTag;
+ string DefRel;
string TmpSrc = Name;
- string::size_type Slash = TmpSrc.rfind('=');
+ const size_t found = TmpSrc.find_last_of("/=");
// honor default release
- string DefRel = _config->Find("APT::Default-Release");
+ if (found != string::npos && TmpSrc[found] == '/')
+ {
+ DefRel = TmpSrc.substr(found+1);
+ TmpSrc = TmpSrc.substr(0,found);
+ }
+ else
+ DefRel = _config->Find("APT::Default-Release");
+
pkgCache::PkgIterator Pkg = Cache.FindPkg(TmpSrc);
- if (Slash != string::npos)
+ if (found != string::npos && TmpSrc[found] == '=')
{
- VerTag = string(TmpSrc.begin() + Slash + 1,TmpSrc.end());
- TmpSrc = string(TmpSrc.begin(),TmpSrc.begin() + Slash);
+ VerTag = TmpSrc.substr(found+1);
+ TmpSrc = TmpSrc.substr(0,found);
}
else if(!Pkg.end() && DefRel.empty() == false)
{
@@ -1249,10 +1260,13 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
pkgCache::Flag::NotSource && Pkg.CurrentVer() != Ver)
continue;
- //std::cout << VF.File().Archive() << std::endl;
- if(VF.File().Archive() && (VF.File().Archive() == DefRel))
+ if((VF.File().Archive() != 0 && VF.File().Archive() == DefRel) ||
+ (VF.File().Codename() != 0 && VF.File().Codename() == DefRel))
{
- VerTag = Ver.VerStr();
+ pkgRecords::Parser &Parse = Recs.Lookup(VF);
+ VerTag = Parse.SourceVer();
+ if (VerTag.empty())
+ VerTag = Ver.VerStr();
break;
}
}
@@ -1306,7 +1320,7 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
// show name mismatches
if (IsMatch == true && Parse->Package() != Src)
- ioprintf(c1out, _("No source package '%s' picking '%s' instead\n"), Parse->Package().c_str(), Src.c_str());
+ ioprintf(c1out, _("No source package '%s' picking '%s' instead\n"), Src.c_str(), Parse->Package().c_str());
if (VerTag.empty() == false)
{
@@ -1400,20 +1414,29 @@ bool DoAutomaticRemove(CacheFile &Cache)
bool Debug = _config->FindI("Debug::pkgAutoRemove",false);
bool doAutoRemove = _config->FindB("APT::Get::AutomaticRemove", false);
bool hideAutoRemove = _config->FindB("APT::Get::HideAutoRemove");
- pkgDepCache::ActionGroup group(*Cache);
+ pkgDepCache::ActionGroup group(*Cache);
if(Debug)
std::cout << "DoAutomaticRemove()" << std::endl;
- if (_config->FindB("APT::Get::Remove",true) == false &&
- doAutoRemove == true)
+ // we don't want to autoremove and we don't want to see it, so why calculating?
+ if (doAutoRemove == false && hideAutoRemove == true)
+ return true;
+
+ if (doAutoRemove == true &&
+ _config->FindB("APT::Get::Remove",true) == false)
{
c1out << _("We are not supposed to delete stuff, can't start "
"AutoRemover") << std::endl;
- doAutoRemove = false;
+ return false;
}
+ bool purgePkgs = _config->FindB("APT::Get::Purge", false);
+ bool smallList = (hideAutoRemove == false &&
+ strcasecmp(_config->Find("APT::Get::HideAutoRemove","").c_str(),"small") == 0);
+
string autoremovelist, autoremoveversions;
+ unsigned long autoRemoveCount = 0;
// look over the cache to see what can be removed
for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); ! Pkg.end(); ++Pkg)
{
@@ -1422,30 +1445,43 @@ bool DoAutomaticRemove(CacheFile &Cache)
if(Pkg.CurrentVer() != 0 || Cache[Pkg].Install())
if(Debug)
std::cout << "We could delete %s" << Pkg.Name() << std::endl;
-
- // only show stuff in the list that is not yet marked for removal
- if(Cache[Pkg].Delete() == false)
- {
- autoremovelist += string(Pkg.Name()) + " ";
- autoremoveversions += string(Cache[Pkg].CandVersion) + "\n";
- }
+
if (doAutoRemove)
{
if(Pkg.CurrentVer() != 0 &&
Pkg->CurrentState != pkgCache::State::ConfigFiles)
- Cache->MarkDelete(Pkg, _config->FindB("APT::Get::Purge", false));
+ Cache->MarkDelete(Pkg, purgePkgs);
else
Cache->MarkKeep(Pkg, false, false);
}
+ else
+ {
+ // only show stuff in the list that is not yet marked for removal
+ if(Cache[Pkg].Delete() == false)
+ {
+ // we don't need to fill the strings if we don't need them
+ if (smallList == true)
+ ++autoRemoveCount;
+ else
+ {
+ autoremovelist += string(Pkg.Name()) + " ";
+ autoremoveversions += string(Cache[Pkg].CandVersion) + "\n";
+ }
+ }
+ }
}
}
- if (!hideAutoRemove)
- ShowList(c1out, _("The following packages were automatically installed and are no longer required:"), autoremovelist, autoremoveversions);
- if (!doAutoRemove && !hideAutoRemove && autoremovelist.size() > 0)
+ // if we don't remove them, we should show them!
+ if (doAutoRemove == false && (autoremovelist.empty() == false || autoRemoveCount != 0))
+ {
+ if (smallList == false)
+ ShowList(c1out, _("The following packages were automatically installed and are no longer required:"), autoremovelist, autoremoveversions);
+ else
+ ioprintf(c1out, _("%lu packages were automatically installed and are no longer required.\n"), autoRemoveCount);
c1out << _("Use 'apt-get autoremove' to remove them.") << std::endl;
-
- // Now see if we destroyed anything
- if (Cache->BrokenCount() != 0)
+ }
+ // Now see if we had destroyed anything (if we had done anything)
+ else if (Cache->BrokenCount() != 0)
{
c1out << _("Hmm, seems like the AutoRemover destroyed something which really\n"
"shouldn't happen. Please file a bug report against apt.") << endl;
@@ -2179,8 +2215,11 @@ bool DoSource(CommandLine &CmdL)
if (unsigned(Buf.f_bfree) < (FetchBytes - FetchPBytes)/Buf.f_bsize)
{
struct statfs Stat;
- if (statfs(OutputDir.c_str(),&Stat) != 0 ||
- unsigned(Stat.f_type) != RAMFS_MAGIC)
+ if (statfs(OutputDir.c_str(),&Stat) != 0
+#if HAVE_STRUCT_STATFS_F_TYPE
+ || unsigned(Stat.f_type) != RAMFS_MAGIC
+#endif
+ )
return _error->Error(_("You don't have enough free space in %s"),
OutputDir.c_str());
}
@@ -2550,7 +2589,10 @@ bool DoBuildDep(CommandLine &CmdL)
// Now we check the state of the packages,
if (Cache->BrokenCount() != 0)
- return _error->Error(_("Build-dependencies for %s could not be satisfied."),*I);
+ {
+ ShowBroken(cout, Cache, false);
+ return _error->Error(_("Build-dependencies for %s could not be satisfied."),*I);
+ }
}
if (InstallPackages(Cache, false, true) == false)
diff --git a/configure.in b/configure.in
index 7287b925a..ff11078b3 100644
--- a/configure.in
+++ b/configure.in
@@ -112,6 +112,10 @@ if test x"$HAVE_STATVFS" != x"yes"; then
])
fi
+AC_CHECK_MEMBERS([struct statfs.f_type],,,
+ [$ac_includes_default
+ #include <sys/vfs.h>])
+
dnl We should use the real timegm function if we have it.
AC_CHECK_FUNC(timegm,AC_DEFINE(HAVE_TIMEGM))
AC_SUBST(HAVE_TIMEGM)
diff --git a/debian/changelog b/debian/changelog
index 2131b8077..1ee88f0ba 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,7 +8,50 @@ apt (0.7.22.3) UNRELEASED; urgency=low
mentioned above are not specified.
(Closes: #445985, #157759, #320184, #365880, #479617)
- -- Michael Vogt <mvo@debian.org> Wed, 19 Aug 2009 11:14:15 +0200
+ [ David Kalnischkies ]
+ * cmdline/apt-get.cc:
+ - add APT::Get::HideAutoRemove=small to display only a short line
+ instead of the full package list. (Closes: #537450)
+ - ShowBroken() in build-dep (by Mike O'Connor, Closes: #145916)
+ - check for statfs.f_type (by Robert Millan, Closes: #509313)
+ - correct the order of picked package binary vs source in source
+ - use SourceVersion instead of the BinaryVersion to get the source
+ Patch by Matt Kraai, thanks! (Closes: #382826)
+ - add pkg/archive and codename in source (Closes: #414105, #441178)
+ * apt-pkg/contrib/strutl.cc:
+ - enable thousand separator according to the current locale
+ (by Luca Bruno, Closes: #223712)
+ * doc/apt.conf.5.xml:
+ - mention the apt.conf.d dir (by Vincent McIntyre, Closes: #520831)
+ * apt-inst/contrib/arfile.cc:
+ - use sizeof instead strlen (by Marius Vollmer, Closes: #504325)
+ * doc/apt-mark.8.xml:
+ - improve manpage based on patch by Carl Chenet (Closes: #510286)
+ * apt-pkg/acquire-item.cc:
+ - use configsettings for dynamic compression type use and order.
+ Based on a patch by Jyrki Muukkonen, thanks! (LP: #71746)
+ * apt-pkg/aptconfiguration.cc:
+ - add default configuration for compression types and add lzma
+ support. Order is now bzip2, lzma, gzip, none (Closes: #510526)
+ * ftparchive/writer.cc:
+ - add lzma support also here, patch for this (and inspiration for
+ the one above) by Robert Millan, thanks!
+ * apt-pkg/depcache.cc:
+ - restore the --ignore-hold effect in the Is{Delete,Install}Ok hooks
+ * doc/apt-get.8.xml:
+ - update the source description to reflect what it actually does
+ and how it can be used. (Closes: #413021)
+ * methods/http.cc:
+ - allow empty Reason-Phase in Status-Line to please squid,
+ thanks Modestas Vainius for noticing! (Closes: #531157, LP: #411435)
+
+ [ George Danchev ]
+ * cmdline/apt-cache.cc:
+ - fix a memory leak in the xvcg method (Closes: #511557)
+ * apt-pkg/indexcopy.cc:
+ - fix a memory leak then the Release file not exists (Closes: #511556)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 27 Aug 2009 14:15:39 +0200
apt (0.7.22.2) unstable; urgency=low
@@ -96,7 +139,7 @@ apt (0.7.22) unstable; urgency=low
(off by default)
- send "dpkg-exec" message on the status fd when dpkg is run
- provide DPkg::Chroot-Directory config option (useful for testing)
- - fix potential hang when in a backgroud process group
+ - fix potential hang when in a background process group
* apt-pkg/algorithms.cc:
- consider recommends when making the scores for the problem
resolver
@@ -125,7 +168,7 @@ apt (0.7.22) unstable; urgency=low
* apt-pkg/deb/debsystem.cc:
- make strings i18n able
* fix problematic use of tolower() when calculating the version
- hash by using locale independant tolower_ascii() function.
+ hash by using locale independent tolower_ascii() function.
Thanks to M. Vefa Bicakci (LP: #80248)
* build fixes for g++-4.4
* cmdline/apt-mark:
diff --git a/doc/apt-get.8.xml b/doc/apt-get.8.xml
index 920f6b36e..8db2883c4 100644
--- a/doc/apt-get.8.xml
+++ b/doc/apt-get.8.xml
@@ -85,9 +85,19 @@
<arg choice='plain'>purge <arg choice="plain" rep="repeat"><replaceable>pkg</replaceable></arg></arg>
<arg choice='plain'>source
<arg choice="plain" rep="repeat"><replaceable>pkg</replaceable>
- <arg>
- =<replaceable>pkg_version_number</replaceable>
- </arg>
+ <arg>
+ <group choice='req'>
+ <arg choice='plain'>
+ =<replaceable>pkg_version_number</replaceable>
+ </arg>
+ <arg choice='plain'>
+ /<replaceable>target_release_name</replaceable>
+ </arg>
+ <arg choice='plain'>
+ /<replaceable>target_release_codename</replaceable>
+ </arg>
+ </group>
+ </arg>
</arg>
</arg>
<arg choice='plain'>build-dep <arg choice="plain" rep="repeat"><replaceable>pkg</replaceable></arg></arg>
@@ -240,13 +250,22 @@
<listitem><para><literal>source</literal> causes <command>apt-get</command> to fetch source packages. APT
will examine the available packages to decide which source package to
fetch. It will then find and download into the current directory the
- newest available version of that source package. Source packages are
- tracked separately from binary packages via <literal>deb-src</literal> type lines
- in the &sources-list; file. This probably will mean that you will not
- get the same source as the package you have installed or as you could
- install. If the --compile options is specified then the package will be
- compiled to a binary .deb using dpkg-buildpackage, if --download-only is
- specified then the source package will not be unpacked.</para>
+ newest available version of that source package while respect the
+ default release, set with the option <literal>APT::Default-Release</literal>,
+ the <option>-t</option> option or per package with with the
+ <literal>pkg/release</literal> syntax, if possible.</para>
+
+ <para>Source packages are tracked separately
+ from binary packages via <literal>deb-src</literal> type lines
+ in the &sources-list; file. This means that you will need to add such a line
+ for each repository you want to get sources from. If you don't do this
+ you will properly get another (newer, older or none) source version than
+ the one you have installed or could install.</para>
+
+ <para>If the <option>--compile</option> options is specified
+ then the package will be compiled to a binary .deb using
+ <command>dpkg-buildpackage</command>, if <option>--download-only</option>
+ is specified then the source package will not be unpacked.</para>
<para>A specific source version can be retrieved by postfixing the source name
with an equals and then the version to fetch, similar to the mechanism
diff --git a/doc/apt-mark.8.xml b/doc/apt-mark.8.xml
index 1b7b02812..f078f2de5 100644
--- a/doc/apt-mark.8.xml
+++ b/doc/apt-mark.8.xml
@@ -15,7 +15,7 @@
&apt-email;
&apt-product;
<!-- The last update date -->
- <date>2 November 2007</date>
+ <date>9 August 2009</date>
</refentryinfo>
<refmeta>
@@ -32,11 +32,19 @@
<!-- Arguments -->
<refsynopsisdiv>
<cmdsynopsis>
- <command>apt-mark</command>
- <arg><option>-hv</option></arg>
- <arg><option>-f=<replaceable>FILENAME</replaceable></option></arg>
- <group choice="req"><arg>markauto</arg><arg>unmarkauto</arg></group>
- <arg choice="plain" rep="repeat"><replaceable>package</replaceable></arg>
+ <command>apt-mark</command>
+ <arg><option>-hv</option></arg>
+ <arg><option>-f=<replaceable>FILENAME</replaceable></option></arg>
+ <group choice="plain">
+ <arg choice="plain">
+ <group choice="req">
+ <arg choice="plain">markauto</arg>
+ <arg choice="plain">unmarkauto</arg>
+ </group>
+ <arg choice="plain" rep="repeat"><replaceable>package</replaceable></arg>
+ </arg>
+ <arg choice="plain">showauto</arg>
+ </group>
</cmdsynopsis>
</refsynopsisdiv>
@@ -49,7 +57,8 @@
other packages are installed to satisfy its dependencies, the
dependencies are marked as being automatically installed. Once
these automatically installed packages are no longer depended on
- by any manually installed packages, they will be removed.
+ by any manually installed packages, they will be removed by e.g.
+ <command>apt-get</command> or <command>aptitude</command>.
</para>
<variablelist>
<varlistentry><term>markauto</term>
@@ -67,16 +76,24 @@
depend on it.
</para></listitem>
</varlistentry>
+
+ <varlistentry><term>showauto</term>
+ <listitem><para><literal>showauto</literal> is used to print a
+ list of manually installed packages with each package on a new line.
+ </para></listitem>
+ </varlistentry>
</variablelist>
</refsect1>
<refsect1><title>options</title>
<variablelist>
- <varlistentry><term><option>-f=<filename>FILENAME</filename></option></term><term><option>--file=<filename>FILENAME</filename></option></term>
+ <varlistentry>
+ <term><option>-f=<filename><replaceable>FILENAME</replaceable></filename></option></term>
+ <term><option>--file=<filename><replaceable>FILENAME</replaceable></filename></option></term>
<listitem><para>
- Read/Write package stats from <filename>FILENAME</filename>
+ Read/Write package stats from <filename><replaceable>FILENAME</replaceable></filename>
instead of the default location, which
is <filename>extended_status</filename> in the directory defined
by the Configuration Item: <literal>Dir::State</literal>.</para></listitem>
@@ -101,8 +118,19 @@
</variablelist>
</refsect1>
+ <refsect1><title>Files</title>
+ <variablelist>
+ <varlistentry><term><filename>/var/lib/apt/extended_states</filename></term>
+ <listitem><para>Status list of auto-installed packages.
+ Configuration Item: <literal>Dir::State</literal>
+ sets the path to the <filename>extended_states</filename> file.
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+
<refsect1><title>See Also</title>
- <para>&apt-conf;</para>
+ <para>&apt-get;,&aptitude;,&apt-conf;</para>
</refsect1>
<refsect1><title>Diagnostics</title>
diff --git a/doc/apt.conf.5.xml b/doc/apt.conf.5.xml
index 1fe980d28..c0c247ae9 100644
--- a/doc/apt.conf.5.xml
+++ b/doc/apt.conf.5.xml
@@ -308,6 +308,20 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";};
</para></listitem>
</varlistentry>
+ <varlistentry><term>CompressionTypes</term>
+ <listitem><para>List of compression types which are understood by the acquire methods.
+ Files like <filename>Packages</filename> can be available in various compression formats.
+ This list defines in which order the acquire methods will try to download these files.
+ Per default <command>bzip2</command> compressed files will be prefered over
+ <command>lzma</command>, <command>gzip</command> and uncompressed files. The syntax for
+ the configuration fileentry is
+ <synopsis>Acquire::CompressionTypes::<replaceable>FileExtension</replaceable> "<replaceable>Methodname</replaceable>";</synopsis>
+ e.g. <synopsis>Acquire::CompressionTypes::bz2 "bzip2";</synopsis>
+ Note that at runtime the <literal>Dir::Bin::<replaceable>Methodname</replaceable></literal> will
+ be checked: If this setting exists the method will only be used if this file exists, e.g. for
+ the bzip2 method above (the inbuilt) setting is <literallayout>Dir::Bin::bzip2 "/bin/bzip2";</literallayout>
+ </para></listitem>
+ </varlistentry>
</variablelist>
</para>
</refsect1>
@@ -342,6 +356,7 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";};
<para>Binary programs are pointed to by <literal>Dir::Bin</literal>. <literal>Dir::Bin::Methods</literal>
specifies the location of the method handlers and <literal>gzip</literal>,
+ <literal>bzip2</literal>, <literal>lzma</literal>,
<literal>dpkg</literal>, <literal>apt-get</literal> <literal>dpkg-source</literal>
<literal>dpkg-buildpackage</literal> and <literal>apt-cache</literal> specify the location
of the respective programs.</para>
@@ -827,7 +842,17 @@ is commented.
</refsect1>
<refsect1><title>Files</title>
- <para><filename>/etc/apt/apt.conf</filename></para>
+ <variablelist>
+ <varlistentry><term><filename>/etc/apt/apt.conf</filename></term>
+ <listitem><para>APT configuration file.
+ Configuration Item: <literal>Dir::Etc::Main</literal>.</para></listitem>
+ </varlistentry>
+
+ <varlistentry><term><filename>/etc/apt/apt.conf.d/</filename></term>
+ <listitem><para>APT configuration file fragments.
+ Configuration Item: <literal>Dir::Etc::Parts</literal>.</para></listitem>
+ </varlistentry>
+ </variablelist>
</refsect1>
<refsect1><title>See Also</title>
diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc
index 9d248ab86..293e851f5 100644
--- a/ftparchive/writer.cc
+++ b/ftparchive/writer.cc
@@ -815,9 +815,11 @@ ReleaseWriter::ReleaseWriter(string DB)
AddPattern("Packages");
AddPattern("Packages.gz");
AddPattern("Packages.bz2");
+ AddPattern("Packages.lzma");
AddPattern("Sources");
AddPattern("Sources.gz");
AddPattern("Sources.bz2");
+ AddPattern("Sources.lzma");
AddPattern("Release");
AddPattern("md5sum.txt");
diff --git a/methods/http.cc b/methods/http.cc
index 1eba0f279..461a98406 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -552,7 +552,7 @@ bool ServerState::HeaderLine(string Line)
// Evil servers return no version
if (Line[4] == '/')
{
- if (sscanf(Line.c_str(),"HTTP/%u.%u %u %[^\n]",&Major,&Minor,
+ if (sscanf(Line.c_str(),"HTTP/%u.%u %u%[^\n]",&Major,&Minor,
&Result,Code) != 4)
return _error->Error(_("The HTTP server sent an invalid reply header"));
}
@@ -560,7 +560,7 @@ bool ServerState::HeaderLine(string Line)
{
Major = 0;
Minor = 9;
- if (sscanf(Line.c_str(),"HTTP %u %[^\n]",&Result,Code) != 2)
+ if (sscanf(Line.c_str(),"HTTP %u%[^\n]",&Result,Code) != 2)
return _error->Error(_("The HTTP server sent an invalid reply header"));
}
diff --git a/po/apt-all.pot b/po/apt-all.pot
index a18646290..518a3a1c1 100644
--- a/po/apt-all.pot
+++ b/po/apt-all.pot
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-07-26 01:10+0200\n"
+"POT-Creation-Date: 2009-08-21 11:35+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -21,8 +21,8 @@ msgid "Package %s version %s has an unmet dep:\n"
msgstr ""
#: cmdline/apt-cache.cc:181 cmdline/apt-cache.cc:550 cmdline/apt-cache.cc:644
-#: cmdline/apt-cache.cc:797 cmdline/apt-cache.cc:1017
-#: cmdline/apt-cache.cc:1419 cmdline/apt-cache.cc:1571
+#: cmdline/apt-cache.cc:797 cmdline/apt-cache.cc:1021
+#: cmdline/apt-cache.cc:1423 cmdline/apt-cache.cc:1575
#, c-format
msgid "Unable to locate package %s"
msgstr ""
@@ -91,72 +91,72 @@ msgstr ""
msgid "Total space accounted for: "
msgstr ""
-#: cmdline/apt-cache.cc:469 cmdline/apt-cache.cc:1217
+#: cmdline/apt-cache.cc:469 cmdline/apt-cache.cc:1221
#, c-format
msgid "Package file %s is out of sync."
msgstr ""
-#: cmdline/apt-cache.cc:1293
+#: cmdline/apt-cache.cc:1297
msgid "You must give exactly one pattern"
msgstr ""
-#: cmdline/apt-cache.cc:1447
+#: cmdline/apt-cache.cc:1451
msgid "No packages found"
msgstr ""
-#: cmdline/apt-cache.cc:1524
+#: cmdline/apt-cache.cc:1528
msgid "Package files:"
msgstr ""
-#: cmdline/apt-cache.cc:1531 cmdline/apt-cache.cc:1618
+#: cmdline/apt-cache.cc:1535 cmdline/apt-cache.cc:1622
msgid "Cache is out of sync, can't x-ref a package file"
msgstr ""
#. Show any packages have explicit pins
-#: cmdline/apt-cache.cc:1545
+#: cmdline/apt-cache.cc:1549
msgid "Pinned packages:"
msgstr ""
-#: cmdline/apt-cache.cc:1557 cmdline/apt-cache.cc:1598
+#: cmdline/apt-cache.cc:1561 cmdline/apt-cache.cc:1602
msgid "(not found)"
msgstr ""
#. Installed version
-#: cmdline/apt-cache.cc:1578
+#: cmdline/apt-cache.cc:1582
msgid " Installed: "
msgstr ""
-#: cmdline/apt-cache.cc:1580 cmdline/apt-cache.cc:1588
+#: cmdline/apt-cache.cc:1584 cmdline/apt-cache.cc:1592
msgid "(none)"
msgstr ""
#. Candidate Version
-#: cmdline/apt-cache.cc:1585
+#: cmdline/apt-cache.cc:1589
msgid " Candidate: "
msgstr ""
-#: cmdline/apt-cache.cc:1595
+#: cmdline/apt-cache.cc:1599
msgid " Package pin: "
msgstr ""
#. Show the priority tables
-#: cmdline/apt-cache.cc:1604
+#: cmdline/apt-cache.cc:1608
msgid " Version table:"
msgstr ""
-#: cmdline/apt-cache.cc:1619
+#: cmdline/apt-cache.cc:1623
#, c-format
msgid " %4i %s\n"
msgstr ""
-#: cmdline/apt-cache.cc:1714 cmdline/apt-cdrom.cc:134 cmdline/apt-config.cc:70
+#: cmdline/apt-cache.cc:1718 cmdline/apt-cdrom.cc:134 cmdline/apt-config.cc:70
#: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:547
-#: cmdline/apt-get.cc:2584 cmdline/apt-sortpkgs.cc:144
+#: cmdline/apt-get.cc:2626 cmdline/apt-sortpkgs.cc:144
#, c-format
msgid "%s %s for %s compiled on %s %s\n"
msgstr ""
-#: cmdline/apt-cache.cc:1721
+#: cmdline/apt-cache.cc:1725
msgid ""
"Usage: apt-cache [options] command\n"
" apt-cache [options] add file1 [file2 ...]\n"
@@ -549,7 +549,7 @@ msgstr ""
msgid "Y"
msgstr ""
-#: cmdline/apt-get.cc:149 cmdline/apt-get.cc:1659
+#: cmdline/apt-get.cc:149 cmdline/apt-get.cc:1695
#, c-format
msgid "Regex compilation error - %s"
msgstr ""
@@ -692,7 +692,7 @@ msgstr ""
msgid "Some packages could not be authenticated"
msgstr ""
-#: cmdline/apt-get.cc:734 cmdline/apt-get.cc:883
+#: cmdline/apt-get.cc:734 cmdline/apt-get.cc:886
msgid "There are problems and -y was used without --force-yes"
msgstr ""
@@ -708,11 +708,11 @@ msgstr ""
msgid "Internal error, Ordering didn't finish"
msgstr ""
-#: cmdline/apt-get.cc:811 cmdline/apt-get.cc:2001 cmdline/apt-get.cc:2034
+#: cmdline/apt-get.cc:811 cmdline/apt-get.cc:2037 cmdline/apt-get.cc:2070
msgid "Unable to lock the download directory"
msgstr ""
-#: cmdline/apt-get.cc:821 cmdline/apt-get.cc:2082 cmdline/apt-get.cc:2328
+#: cmdline/apt-get.cc:821 cmdline/apt-get.cc:2118 cmdline/apt-get.cc:2367
#: apt-pkg/cachefile.cc:65
msgid "The list of sources could not be read."
msgstr ""
@@ -741,25 +741,25 @@ msgstr ""
msgid "After this operation, %sB disk space will be freed.\n"
msgstr ""
-#: cmdline/apt-get.cc:866 cmdline/apt-get.cc:2177
+#: cmdline/apt-get.cc:866 cmdline/apt-get.cc:2213
#, c-format
msgid "Couldn't determine free space in %s"
msgstr ""
-#: cmdline/apt-get.cc:873
+#: cmdline/apt-get.cc:876
#, c-format
msgid "You don't have enough free space in %s."
msgstr ""
-#: cmdline/apt-get.cc:889 cmdline/apt-get.cc:909
+#: cmdline/apt-get.cc:892 cmdline/apt-get.cc:912
msgid "Trivial Only specified but this is not a trivial operation."
msgstr ""
-#: cmdline/apt-get.cc:891
+#: cmdline/apt-get.cc:894
msgid "Yes, do as I say!"
msgstr ""
-#: cmdline/apt-get.cc:893
+#: cmdline/apt-get.cc:896
#, c-format
msgid ""
"You are about to do something potentially harmful.\n"
@@ -767,74 +767,74 @@ msgid ""
" ?] "
msgstr ""
-#: cmdline/apt-get.cc:899 cmdline/apt-get.cc:918
+#: cmdline/apt-get.cc:902 cmdline/apt-get.cc:921
msgid "Abort."
msgstr ""
-#: cmdline/apt-get.cc:914
+#: cmdline/apt-get.cc:917
msgid "Do you want to continue [Y/n]? "
msgstr ""
-#: cmdline/apt-get.cc:986 cmdline/apt-get.cc:2225 apt-pkg/algorithms.cc:1389
+#: cmdline/apt-get.cc:989 cmdline/apt-get.cc:2264 apt-pkg/algorithms.cc:1389
#, c-format
msgid "Failed to fetch %s %s\n"
msgstr ""
-#: cmdline/apt-get.cc:1004
+#: cmdline/apt-get.cc:1007
msgid "Some files failed to download"
msgstr ""
-#: cmdline/apt-get.cc:1005 cmdline/apt-get.cc:2234
+#: cmdline/apt-get.cc:1008 cmdline/apt-get.cc:2273
msgid "Download complete and in download only mode"
msgstr ""
-#: cmdline/apt-get.cc:1011
+#: cmdline/apt-get.cc:1014
msgid ""
"Unable to fetch some archives, maybe run apt-get update or try with --fix-"
"missing?"
msgstr ""
-#: cmdline/apt-get.cc:1015
+#: cmdline/apt-get.cc:1018
msgid "--fix-missing and media swapping is not currently supported"
msgstr ""
-#: cmdline/apt-get.cc:1020
+#: cmdline/apt-get.cc:1023
msgid "Unable to correct missing packages."
msgstr ""
-#: cmdline/apt-get.cc:1021
+#: cmdline/apt-get.cc:1024
msgid "Aborting install."
msgstr ""
-#: cmdline/apt-get.cc:1055
+#: cmdline/apt-get.cc:1058
#, c-format
msgid "Note, selecting %s instead of %s\n"
msgstr ""
-#: cmdline/apt-get.cc:1065
+#: cmdline/apt-get.cc:1068
#, c-format
msgid "Skipping %s, it is already installed and upgrade is not set.\n"
msgstr ""
-#: cmdline/apt-get.cc:1083
+#: cmdline/apt-get.cc:1086
#, c-format
msgid "Package %s is not installed, so not removed\n"
msgstr ""
-#: cmdline/apt-get.cc:1094
+#: cmdline/apt-get.cc:1097
#, c-format
msgid "Package %s is a virtual package provided by:\n"
msgstr ""
-#: cmdline/apt-get.cc:1106
+#: cmdline/apt-get.cc:1109
msgid " [Installed]"
msgstr ""
-#: cmdline/apt-get.cc:1111
+#: cmdline/apt-get.cc:1114
msgid "You should explicitly select one to install."
msgstr ""
-#: cmdline/apt-get.cc:1116
+#: cmdline/apt-get.cc:1119
#, c-format
msgid ""
"Package %s is not available, but is referred to by another package.\n"
@@ -842,68 +842,73 @@ msgid ""
"is only available from another source\n"
msgstr ""
-#: cmdline/apt-get.cc:1135
+#: cmdline/apt-get.cc:1138
msgid "However the following packages replace it:"
msgstr ""
-#: cmdline/apt-get.cc:1138
+#: cmdline/apt-get.cc:1141
#, c-format
msgid "Package %s has no installation candidate"
msgstr ""
-#: cmdline/apt-get.cc:1158
+#: cmdline/apt-get.cc:1161
#, c-format
msgid "Reinstallation of %s is not possible, it cannot be downloaded.\n"
msgstr ""
-#: cmdline/apt-get.cc:1166
+#: cmdline/apt-get.cc:1169
#, c-format
msgid "%s is already the newest version.\n"
msgstr ""
-#: cmdline/apt-get.cc:1195
+#: cmdline/apt-get.cc:1198
#, c-format
msgid "Release '%s' for '%s' was not found"
msgstr ""
-#: cmdline/apt-get.cc:1197
+#: cmdline/apt-get.cc:1200
#, c-format
msgid "Version '%s' for '%s' was not found"
msgstr ""
-#: cmdline/apt-get.cc:1203
+#: cmdline/apt-get.cc:1206
#, c-format
msgid "Selected version %s (%s) for %s\n"
msgstr ""
-#: cmdline/apt-get.cc:1309
+#: cmdline/apt-get.cc:1323
#, c-format
msgid "No source package '%s' picking '%s' instead\n"
msgstr ""
-#: cmdline/apt-get.cc:1346
+#: cmdline/apt-get.cc:1360
msgid "The update command takes no arguments"
msgstr ""
-#: cmdline/apt-get.cc:1359
+#: cmdline/apt-get.cc:1373
msgid "Unable to lock the list directory"
msgstr ""
-#: cmdline/apt-get.cc:1411
+#: cmdline/apt-get.cc:1429
msgid "We are not supposed to delete stuff, can't start AutoRemover"
msgstr ""
-#: cmdline/apt-get.cc:1443
+#: cmdline/apt-get.cc:1478
msgid ""
"The following packages were automatically installed and are no longer "
"required:"
msgstr ""
-#: cmdline/apt-get.cc:1445
+#: cmdline/apt-get.cc:1480
+#, c-format
+msgid "%lu packages were automatically installed and are no longer required.\n"
+msgstr ""
+
+#: cmdline/apt-get.cc:1481
msgid "Use 'apt-get autoremove' to remove them."
msgstr ""
-#: cmdline/apt-get.cc:1450
+#: cmdline/apt-get.cc:1486
msgid ""
"Hmm, seems like the AutoRemover destroyed something which really\n"
"shouldn't happen. Please file a bug report against apt."
@@ -919,49 +924,49 @@ msgstr ""
#. "that package should be filed.") << endl;
#. }
#.
-#: cmdline/apt-get.cc:1453 cmdline/apt-get.cc:1743
+#: cmdline/apt-get.cc:1489 cmdline/apt-get.cc:1779
msgid "The following information may help to resolve the situation:"
msgstr ""
-#: cmdline/apt-get.cc:1457
+#: cmdline/apt-get.cc:1493
msgid "Internal Error, AutoRemover broke stuff"
msgstr ""
-#: cmdline/apt-get.cc:1476
+#: cmdline/apt-get.cc:1512
msgid "Internal error, AllUpgrade broke stuff"
msgstr ""
-#: cmdline/apt-get.cc:1531
+#: cmdline/apt-get.cc:1567
#, c-format
msgid "Couldn't find task %s"
msgstr ""
-#: cmdline/apt-get.cc:1646 cmdline/apt-get.cc:1682
+#: cmdline/apt-get.cc:1682 cmdline/apt-get.cc:1718
#, c-format
msgid "Couldn't find package %s"
msgstr ""
-#: cmdline/apt-get.cc:1669
+#: cmdline/apt-get.cc:1705
#, c-format
msgid "Note, selecting %s for regex '%s'\n"
msgstr ""
-#: cmdline/apt-get.cc:1700
+#: cmdline/apt-get.cc:1736
#, c-format
msgid "%s set to manually installed.\n"
msgstr ""
-#: cmdline/apt-get.cc:1713
+#: cmdline/apt-get.cc:1749
msgid "You might want to run `apt-get -f install' to correct these:"
msgstr ""
-#: cmdline/apt-get.cc:1716
+#: cmdline/apt-get.cc:1752
msgid ""
"Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a "
"solution)."
msgstr ""
-#: cmdline/apt-get.cc:1728
+#: cmdline/apt-get.cc:1764
msgid ""
"Some packages could not be installed. This may mean that you have\n"
"requested an impossible situation or if you are using the unstable\n"
@@ -969,152 +974,152 @@ msgid ""
"or been moved out of Incoming."
msgstr ""
-#: cmdline/apt-get.cc:1746
+#: cmdline/apt-get.cc:1782
msgid "Broken packages"
msgstr ""
-#: cmdline/apt-get.cc:1775
+#: cmdline/apt-get.cc:1811
msgid "The following extra packages will be installed:"
msgstr ""
-#: cmdline/apt-get.cc:1864
+#: cmdline/apt-get.cc:1900
msgid "Suggested packages:"
msgstr ""
-#: cmdline/apt-get.cc:1865
+#: cmdline/apt-get.cc:1901
msgid "Recommended packages:"
msgstr ""
-#: cmdline/apt-get.cc:1894
+#: cmdline/apt-get.cc:1930
msgid "Calculating upgrade... "
msgstr ""
-#: cmdline/apt-get.cc:1897 methods/ftp.cc:702 methods/connect.cc:112
+#: cmdline/apt-get.cc:1933 methods/ftp.cc:702 methods/connect.cc:112
msgid "Failed"
msgstr ""
-#: cmdline/apt-get.cc:1902
+#: cmdline/apt-get.cc:1938
msgid "Done"
msgstr ""
-#: cmdline/apt-get.cc:1969 cmdline/apt-get.cc:1977
+#: cmdline/apt-get.cc:2005 cmdline/apt-get.cc:2013
msgid "Internal error, problem resolver broke stuff"
msgstr ""
-#: cmdline/apt-get.cc:2077
+#: cmdline/apt-get.cc:2113
msgid "Must specify at least one package to fetch source for"
msgstr ""
-#: cmdline/apt-get.cc:2107 cmdline/apt-get.cc:2346
+#: cmdline/apt-get.cc:2143 cmdline/apt-get.cc:2385
#, c-format
msgid "Unable to find a source package for %s"
msgstr ""
-#: cmdline/apt-get.cc:2156
+#: cmdline/apt-get.cc:2192
#, c-format
msgid "Skipping already downloaded file '%s'\n"
msgstr ""
-#: cmdline/apt-get.cc:2184
+#: cmdline/apt-get.cc:2223
#, c-format
msgid "You don't have enough free space in %s"
msgstr ""
-#: cmdline/apt-get.cc:2190
+#: cmdline/apt-get.cc:2229
#, c-format
msgid "Need to get %sB/%sB of source archives.\n"
msgstr ""
-#: cmdline/apt-get.cc:2193
+#: cmdline/apt-get.cc:2232
#, c-format
msgid "Need to get %sB of source archives.\n"
msgstr ""
-#: cmdline/apt-get.cc:2199
+#: cmdline/apt-get.cc:2238
#, c-format
msgid "Fetch source %s\n"
msgstr ""
-#: cmdline/apt-get.cc:2230
+#: cmdline/apt-get.cc:2269
msgid "Failed to fetch some archives."
msgstr ""
-#: cmdline/apt-get.cc:2258
+#: cmdline/apt-get.cc:2297
#, c-format
msgid "Skipping unpack of already unpacked source in %s\n"
msgstr ""
-#: cmdline/apt-get.cc:2270
+#: cmdline/apt-get.cc:2309
#, c-format
msgid "Unpack command '%s' failed.\n"
msgstr ""
-#: cmdline/apt-get.cc:2271
+#: cmdline/apt-get.cc:2310
#, c-format
msgid "Check if the 'dpkg-dev' package is installed.\n"
msgstr ""
-#: cmdline/apt-get.cc:2288
+#: cmdline/apt-get.cc:2327
#, c-format
msgid "Build command '%s' failed.\n"
msgstr ""
-#: cmdline/apt-get.cc:2307
+#: cmdline/apt-get.cc:2346
msgid "Child process failed"
msgstr ""
-#: cmdline/apt-get.cc:2323
+#: cmdline/apt-get.cc:2362
msgid "Must specify at least one package to check builddeps for"
msgstr ""
-#: cmdline/apt-get.cc:2351
+#: cmdline/apt-get.cc:2390
#, c-format
msgid "Unable to get build-dependency information for %s"
msgstr ""
-#: cmdline/apt-get.cc:2371
+#: cmdline/apt-get.cc:2410
#, c-format
msgid "%s has no build depends.\n"
msgstr ""
-#: cmdline/apt-get.cc:2423
+#: cmdline/apt-get.cc:2462
#, c-format
msgid ""
"%s dependency for %s cannot be satisfied because the package %s cannot be "
"found"
msgstr ""
-#: cmdline/apt-get.cc:2476
+#: cmdline/apt-get.cc:2515
#, c-format
msgid ""
"%s dependency for %s cannot be satisfied because no available versions of "
"package %s can satisfy version requirements"
msgstr ""
-#: cmdline/apt-get.cc:2512
+#: cmdline/apt-get.cc:2551
#, c-format
msgid "Failed to satisfy %s dependency for %s: Installed package %s is too new"
msgstr ""
-#: cmdline/apt-get.cc:2539
+#: cmdline/apt-get.cc:2578
#, c-format
msgid "Failed to satisfy %s dependency for %s: %s"
msgstr ""
-#: cmdline/apt-get.cc:2553
+#: cmdline/apt-get.cc:2594
#, c-format
msgid "Build-dependencies for %s could not be satisfied."
msgstr ""
-#: cmdline/apt-get.cc:2557
+#: cmdline/apt-get.cc:2599
msgid "Failed to process build dependencies"
msgstr ""
-#: cmdline/apt-get.cc:2589
+#: cmdline/apt-get.cc:2631
msgid "Supported modules:"
msgstr ""
-#: cmdline/apt-get.cc:2630
+#: cmdline/apt-get.cc:2672
msgid ""
"Usage: apt-get [options] command\n"
" apt-get [options] install|remove pkg1 [pkg2 ...]\n"
@@ -1158,7 +1163,7 @@ msgid ""
" This APT has Super Cow Powers.\n"
msgstr ""
-#: cmdline/apt-get.cc:2797
+#: cmdline/apt-get.cc:2839
msgid ""
"NOTE: This is only a simulation!\n"
" apt-get needs root privileges for real execution.\n"
@@ -1381,9 +1386,11 @@ msgstr ""
msgid "File %s/%s overwrites the one in the package %s"
msgstr ""
+#. Only warn if there are no sources.list.d.
+#. Only warn if there is no sources.list file.
#: apt-inst/extract.cc:464 apt-pkg/contrib/configuration.cc:822
-#: apt-pkg/contrib/cdromutl.cc:157 apt-pkg/sourcelist.cc:163
-#: apt-pkg/sourcelist.cc:169 apt-pkg/sourcelist.cc:324 apt-pkg/acquire.cc:419
+#: apt-pkg/contrib/cdromutl.cc:157 apt-pkg/sourcelist.cc:166
+#: apt-pkg/sourcelist.cc:172 apt-pkg/sourcelist.cc:327 apt-pkg/acquire.cc:419
#: apt-pkg/init.cc:89 apt-pkg/init.cc:97 apt-pkg/clean.cc:33
#: apt-pkg/policy.cc:281 apt-pkg/policy.cc:287
#, c-format
@@ -1610,7 +1617,7 @@ msgstr ""
msgid "Server closed the connection"
msgstr ""
-#: methods/ftp.cc:338 apt-pkg/contrib/fileutl.cc:541 methods/rsh.cc:190
+#: methods/ftp.cc:338 apt-pkg/contrib/fileutl.cc:543 methods/rsh.cc:190
msgid "Read error"
msgstr ""
@@ -1622,7 +1629,7 @@ msgstr ""
msgid "Protocol corruption"
msgstr ""
-#: methods/ftp.cc:446 apt-pkg/contrib/fileutl.cc:580 methods/rsh.cc:232
+#: methods/ftp.cc:446 apt-pkg/contrib/fileutl.cc:582 methods/rsh.cc:232
msgid "Write error"
msgstr ""
@@ -2075,50 +2082,50 @@ msgstr ""
msgid "Waited for %s but it wasn't there"
msgstr ""
-#: apt-pkg/contrib/fileutl.cc:455
+#: apt-pkg/contrib/fileutl.cc:456
#, c-format
msgid "Sub-process %s received a segmentation fault."
msgstr ""
-#: apt-pkg/contrib/fileutl.cc:457
+#: apt-pkg/contrib/fileutl.cc:458
#, c-format
msgid "Sub-process %s received signal %u."
msgstr ""
-#: apt-pkg/contrib/fileutl.cc:460
+#: apt-pkg/contrib/fileutl.cc:462
#, c-format
msgid "Sub-process %s returned an error code (%u)"
msgstr ""
-#: apt-pkg/contrib/fileutl.cc:462
+#: apt-pkg/contrib/fileutl.cc:464
#, c-format
msgid "Sub-process %s exited unexpectedly"
msgstr ""
-#: apt-pkg/contrib/fileutl.cc:506
+#: apt-pkg/contrib/fileutl.cc:508
#, c-format
msgid "Could not open file %s"
msgstr ""
-#: apt-pkg/contrib/fileutl.cc:562
+#: apt-pkg/contrib/fileutl.cc:564
#, c-format
msgid "read, still have %lu to read but none left"
msgstr ""
-#: apt-pkg/contrib/fileutl.cc:592
+#: apt-pkg/contrib/fileutl.cc:594
#, c-format
msgid "write, still have %lu to write but couldn't"
msgstr ""
-#: apt-pkg/contrib/fileutl.cc:667
+#: apt-pkg/contrib/fileutl.cc:669
msgid "Problem closing the file"
msgstr ""
-#: apt-pkg/contrib/fileutl.cc:673
+#: apt-pkg/contrib/fileutl.cc:675
msgid "Problem unlinking the file"
msgstr ""
-#: apt-pkg/contrib/fileutl.cc:684
+#: apt-pkg/contrib/fileutl.cc:686
msgid "Problem syncing the file"
msgstr ""
@@ -2211,16 +2218,16 @@ msgstr ""
msgid "Dependency generation"
msgstr ""
-#: apt-pkg/depcache.cc:173 apt-pkg/depcache.cc:192 apt-pkg/depcache.cc:196
+#: apt-pkg/depcache.cc:173 apt-pkg/depcache.cc:193 apt-pkg/depcache.cc:197
msgid "Reading state information"
msgstr ""
-#: apt-pkg/depcache.cc:220
+#: apt-pkg/depcache.cc:223
#, c-format
msgid "Failed to open StateFile %s"
msgstr ""
-#: apt-pkg/depcache.cc:226
+#: apt-pkg/depcache.cc:229
#, c-format
msgid "Failed to write temporary StateFile %s"
msgstr ""
@@ -2260,27 +2267,27 @@ msgstr ""
msgid "Malformed line %lu in source list %s (dist parse)"
msgstr ""
-#: apt-pkg/sourcelist.cc:203
+#: apt-pkg/sourcelist.cc:206
#, c-format
msgid "Opening %s"
msgstr ""
-#: apt-pkg/sourcelist.cc:220 apt-pkg/cdrom.cc:445
+#: apt-pkg/sourcelist.cc:223 apt-pkg/cdrom.cc:445
#, c-format
msgid "Line %u too long in source list %s."
msgstr ""
-#: apt-pkg/sourcelist.cc:240
+#: apt-pkg/sourcelist.cc:243
#, c-format
msgid "Malformed line %u in source list %s (type)"
msgstr ""
-#: apt-pkg/sourcelist.cc:244
+#: apt-pkg/sourcelist.cc:247
#, c-format
msgid "Type '%s' is not known on line %u in source list %s"
msgstr ""
-#: apt-pkg/sourcelist.cc:252 apt-pkg/sourcelist.cc:255
+#: apt-pkg/sourcelist.cc:255 apt-pkg/sourcelist.cc:258
#, c-format
msgid "Malformed line %u in source list %s (vendor id)"
msgstr ""
@@ -2490,44 +2497,44 @@ msgstr ""
msgid "IO Error saving source cache"
msgstr ""
-#: apt-pkg/acquire-item.cc:127
+#: apt-pkg/acquire-item.cc:128
#, c-format
msgid "rename failed, %s (%s -> %s)."
msgstr ""
-#: apt-pkg/acquire-item.cc:394
+#: apt-pkg/acquire-item.cc:395
msgid "MD5Sum mismatch"
msgstr ""
-#: apt-pkg/acquire-item.cc:644 apt-pkg/acquire-item.cc:1406
+#: apt-pkg/acquire-item.cc:649 apt-pkg/acquire-item.cc:1411
msgid "Hash Sum mismatch"
msgstr ""
-#: apt-pkg/acquire-item.cc:1101
+#: apt-pkg/acquire-item.cc:1106
msgid "There is no public key available for the following key IDs:\n"
msgstr ""
-#: apt-pkg/acquire-item.cc:1211
+#: apt-pkg/acquire-item.cc:1216
#, c-format
msgid ""
"I wasn't able to locate a file for the %s package. This might mean you need "
"to manually fix this package. (due to missing arch)"
msgstr ""
-#: apt-pkg/acquire-item.cc:1270
+#: apt-pkg/acquire-item.cc:1275
#, c-format
msgid ""
"I wasn't able to locate file for the %s package. This might mean you need to "
"manually fix this package."
msgstr ""
-#: apt-pkg/acquire-item.cc:1311
+#: apt-pkg/acquire-item.cc:1316
#, c-format
msgid ""
"The package index files are corrupted. No Filename: field for package %s."
msgstr ""
-#: apt-pkg/acquire-item.cc:1398
+#: apt-pkg/acquire-item.cc:1403
msgid "Size mismatch"
msgstr ""
@@ -2634,22 +2641,22 @@ msgstr ""
msgid "Source list entries for this disc are:\n"
msgstr ""
-#: apt-pkg/indexcopy.cc:263 apt-pkg/indexcopy.cc:832
+#: apt-pkg/indexcopy.cc:263 apt-pkg/indexcopy.cc:835
#, c-format
msgid "Wrote %i records.\n"
msgstr ""
-#: apt-pkg/indexcopy.cc:265 apt-pkg/indexcopy.cc:834
+#: apt-pkg/indexcopy.cc:265 apt-pkg/indexcopy.cc:837
#, c-format
msgid "Wrote %i records with %i missing files.\n"
msgstr ""
-#: apt-pkg/indexcopy.cc:268 apt-pkg/indexcopy.cc:837
+#: apt-pkg/indexcopy.cc:268 apt-pkg/indexcopy.cc:840
#, c-format
msgid "Wrote %i records with %i mismatched files\n"
msgstr ""
-#: apt-pkg/indexcopy.cc:271 apt-pkg/indexcopy.cc:840
+#: apt-pkg/indexcopy.cc:271 apt-pkg/indexcopy.cc:843
#, c-format
msgid "Wrote %i records with %i missing files and %i mismatched files\n"
msgstr ""