summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-07-21 18:31:36 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2009-07-21 18:31:36 +0200
commitd59725349555939d39af81cf7746069d6aa3536c (patch)
tree90a85a3e4ffef76d9572ecf4a1dc8323f7ea38c9 /cmdline
parent02e8ba352f71b82a936f5034059251425ab183d5 (diff)
parentc5f44afc2446d738e30ea4c6021d4b60915546b1 (diff)
The 'not dead yet' release
* add hook for MarkInstall and MarkDelete (closes: #470035) * add the various foldmarkers in apt-pkg & cmdline (no code change) * versions with a pin of -1 shouldn't be a candidate (Closes: #355237) * prefer mmap as memory allocator in MMap instead of a static char array which can (at least in theory) grow dynamic * eliminate (hopefully all) segfaults in pkgcachegen.cc and mmap.cc which can arise if cache doesn't fit into the mmap (Closes: #535218) * display warnings instead of errors if the parts dirs doesn't exist * honor the dpkg hold state in new Marker hooks (closes: #64141)
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-cache.cc19
-rw-r--r--cmdline/apt-cdrom.cc10
-rw-r--r--cmdline/apt-config.cc4
-rw-r--r--cmdline/apt-extracttemplates.cc4
-rw-r--r--cmdline/apt-get.cc29
-rw-r--r--cmdline/apt-sortpkgs.cc8
6 files changed, 32 insertions, 42 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index c30e22b76..0e950310b 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -626,7 +626,7 @@ bool Depends(CommandLine &CmdL)
return true;
}
-
+ /*}}}*/
// RDepends - Print out a reverse dependency tree - mbc /*{{{*/
// ---------------------------------------------------------------------
/* */
@@ -714,10 +714,7 @@ bool RDepends(CommandLine &CmdL)
return true;
}
-
/*}}}*/
-
-
// xvcg - Generate a graph for xvcg /*{{{*/
// ---------------------------------------------------------------------
// Code contributed from Junichi Uekawa <dancer@debian.org> on 20 June 2002.
@@ -937,8 +934,6 @@ bool XVcg(CommandLine &CmdL)
return true;
}
/*}}}*/
-
-
// Dotty - Generate a graph for Dotty /*{{{*/
// ---------------------------------------------------------------------
/* Dotty is the graphvis program for generating graphs. It is a fairly
@@ -1274,15 +1269,16 @@ bool DisplayRecord(pkgCache::VerIterator V)
return true;
}
/*}}}*/
-// Search - Perform a search /*{{{*/
-// ---------------------------------------------------------------------
-/* This searches the package names and package descriptions for a pattern */
+
struct ExDescFile
{
pkgCache::DescFile *Df;
bool NameMatch;
};
+// Search - Perform a search /*{{{*/
+// ---------------------------------------------------------------------
+/* This searches the package names and package descriptions for a pattern */
bool Search(CommandLine &CmdL)
{
pkgCache &Cache = *GCache;
@@ -1696,7 +1692,6 @@ bool Madison(CommandLine &CmdL)
return true;
}
-
/*}}}*/
// GenCaches - Call the main cache generator /*{{{*/
// ---------------------------------------------------------------------
@@ -1770,8 +1765,7 @@ void CacheInitialize()
_config->Set("help",false);
}
/*}}}*/
-
-int main(int argc,const char *argv[])
+int main(int argc,const char *argv[]) /*{{{*/
{
CommandLine::Args Args[] = {
{'h',"help","help",0},
@@ -1878,3 +1872,4 @@ int main(int argc,const char *argv[])
return 0;
}
+ /*}}}*/
diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc
index 379a433ea..342b6314a 100644
--- a/cmdline/apt-cdrom.cc
+++ b/cmdline/apt-cdrom.cc
@@ -40,8 +40,7 @@
using namespace std;
- /*{{{*/
-class pkgCdromTextStatus : public pkgCdromStatus
+class pkgCdromTextStatus : public pkgCdromStatus /*{{{*/
{
protected:
OpTextProgress Progress;
@@ -98,9 +97,7 @@ OpProgress* pkgCdromTextStatus::GetOpProgress()
{
return &Progress;
};
-
/*}}}*/
-
// DoAdd - Add a new CDROM /*{{{*/
// ---------------------------------------------------------------------
/* This does the main add bit.. We show some status and things. The
@@ -129,7 +126,6 @@ bool DoIdent(CommandLine &)
return cdrom.Ident(ident, &log);
}
/*}}}*/
-
// ShowHelp - Show the help screen /*{{{*/
// ---------------------------------------------------------------------
/* */
@@ -164,8 +160,7 @@ int ShowHelp()
return 0;
}
/*}}}*/
-
-int main(int argc,const char *argv[])
+int main(int argc,const char *argv[]) /*{{{*/
{
CommandLine::Args Args[] = {
{'h',"help","help",0},
@@ -222,3 +217,4 @@ int main(int argc,const char *argv[])
return 0;
}
+ /*}}}*/
diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc
index 63fa0867c..9919a9c94 100644
--- a/cmdline/apt-config.cc
+++ b/cmdline/apt-config.cc
@@ -88,8 +88,7 @@ int ShowHelp()
return 0;
}
/*}}}*/
-
-int main(int argc,const char *argv[])
+int main(int argc,const char *argv[]) /*{{{*/
{
CommandLine::Args Args[] = {
{'h',"help","help",0},
@@ -133,3 +132,4 @@ int main(int argc,const char *argv[])
return 0;
}
+ /*}}}*/
diff --git a/cmdline/apt-extracttemplates.cc b/cmdline/apt-extracttemplates.cc
index de22386b9..21ef1a050 100644
--- a/cmdline/apt-extracttemplates.cc
+++ b/cmdline/apt-extracttemplates.cc
@@ -348,8 +348,7 @@ bool Go(CommandLine &CmdL)
return !_error->PendingError();
}
/*}}}*/
-
-int main(int argc, const char **argv)
+int main(int argc, const char **argv) /*{{{*/
{
CommandLine::Args Args[] = {
{'h',"help","help",0},
@@ -391,3 +390,4 @@ int main(int argc, const char **argv)
return 0;
}
+ /*}}}*/
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index f5642c04d..2ca0855b6 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -597,7 +597,6 @@ void Stats(ostream &out,pkgDepCache &Dep)
Dep.BadCount());
}
/*}}}*/
-
// CacheFile::NameComp - QSort compare by name /*{{{*/
// ---------------------------------------------------------------------
/* */
@@ -690,7 +689,10 @@ bool CacheFile::CheckDeps(bool AllowBroken)
return true;
}
-
+ /*}}}*/
+// CheckAuth - check if each download comes form a trusted source /*{{{*/
+// ---------------------------------------------------------------------
+/* */
static bool CheckAuth(pkgAcquire& Fetcher)
{
string UntrustedList;
@@ -731,10 +733,7 @@ static bool CheckAuth(pkgAcquire& Fetcher)
return _error->Error(_("There are problems and -y was used without --force-yes"));
}
-
-
/*}}}*/
-
// InstallPackages - Actually download and install the packages /*{{{*/
// ---------------------------------------------------------------------
/* This displays the informative messages describing what is going to
@@ -1338,7 +1337,6 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
return Last;
}
/*}}}*/
-
// DoUpdate - Update the package lists /*{{{*/
// ---------------------------------------------------------------------
/* */
@@ -1460,7 +1458,7 @@ bool DoAutomaticRemove(CacheFile &Cache)
}
return true;
}
-
+ /*}}}*/
// DoUpgrade - Upgrade all packages /*{{{*/
// ---------------------------------------------------------------------
/* Upgrade all packages without installing new packages or erasing old
@@ -1535,7 +1533,7 @@ bool TryInstallTask(pkgDepCache &Cache, pkgProblemResolver &Fix,
regfree(&Pattern);
return res;
}
-
+ /*}}}*/
// DoInstall - Install packages from the command line /*{{{*/
// ---------------------------------------------------------------------
/* Install named packages */
@@ -2702,8 +2700,7 @@ void SigWinch(int)
#endif
}
/*}}}*/
-
-int main(int argc,const char *argv[])
+int main(int argc,const char *argv[]) /*{{{*/
{
CommandLine::Args Args[] = {
{'h',"help","help",0},
@@ -2796,11 +2793,12 @@ int main(int argc,const char *argv[])
// simulate user-friendly if apt-get has no root privileges
if (getuid() != 0 && _config->FindB("APT::Get::Simulate") == true)
{
- cout << _("NOTE: This is only a simulation!\n"
- " apt-get needs root privileges for real execution.\n"
- " Keep also in mind that locking is deactivated,\n"
- " so don't depend on the relevance to the real current situation!"
- ) << std::endl;
+ if (_config->FindB("APT::Get::Show-User-Simulation-Note",true) == true)
+ cout << _("NOTE: This is only a simulation!\n"
+ " apt-get needs root privileges for real execution.\n"
+ " Keep also in mind that locking is deactivated,\n"
+ " so don't depend on the relevance to the real current situation!"
+ ) << std::endl;
_config->Set("Debug::NoLocking",true);
}
@@ -2835,3 +2833,4 @@ int main(int argc,const char *argv[])
return 0;
}
+ /*}}}*/
diff --git a/cmdline/apt-sortpkgs.cc b/cmdline/apt-sortpkgs.cc
index 7b2a74aed..171b0ba13 100644
--- a/cmdline/apt-sortpkgs.cc
+++ b/cmdline/apt-sortpkgs.cc
@@ -31,7 +31,7 @@
using namespace std;
-struct PkgName
+struct PkgName /*{{{*/
{
string Name;
string Ver;
@@ -55,7 +55,7 @@ struct PkgName
bool operator >(const PkgName &x) const {return Compare3(x) > 0;};
bool operator ==(const PkgName &x) const {return Compare3(x) == 0;};
};
-
+ /*}}}*/
// DoIt - Sort a single file /*{{{*/
// ---------------------------------------------------------------------
/* */
@@ -161,8 +161,7 @@ int ShowHelp()
return 0;
}
/*}}}*/
-
-int main(int argc,const char *argv[])
+int main(int argc,const char *argv[]) /*{{{*/
{
CommandLine::Args Args[] = {
{'h',"help","help",0},
@@ -206,3 +205,4 @@ int main(int argc,const char *argv[])
return 0;
}
+ /*}}}*/