HCoop
/
ntk
/
apt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
968179c
)
fix vim-style foldmarker
author
David Kalnischkies
<kalnischkies@gmail.com>
Fri, 30 Aug 2013 15:18:20 +0000
(17:18 +0200)
committer
David Kalnischkies
<kalnischkies@gmail.com>
Tue, 3 Sep 2013 21:11:58 +0000
(23:11 +0200)
Git-Dch: Ignore
apt-private/private-install.cc
patch
|
blob
|
blame
|
history
apt-private/private-list.cc
patch
|
blob
|
blame
|
history
apt-private/private-output.cc
patch
|
blob
|
blame
|
history
apt-private/private-search.cc
patch
|
blob
|
blame
|
history
apt-private/private-show.cc
patch
|
blob
|
blame
|
history
apt-private/private-upgrade.cc
patch
|
blob
|
blame
|
history
cmdline/apt-get.cc
patch
|
blob
|
blame
|
history
diff --git
a/apt-private/private-install.cc
b/apt-private/private-install.cc
index
b03f131
..
9808c3d
100644
(file)
--- a/
apt-private/private-install.cc
+++ b/
apt-private/private-install.cc
@@
-94,8
+94,6
@@
static bool CheckAuth(pkgAcquire& Fetcher)
return _error->Error(_("There are problems and -y was used without --force-yes"));
}
/*}}}*/
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
// InstallPackages - Actually download and install the packages /*{{{*/
// ---------------------------------------------------------------------
/* This displays the informative messages describing what is going to
@@
-429,8
+427,6
@@
bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask, bool Safety)
return true;
}
/*}}}*/
return true;
}
/*}}}*/
-
-
// DoAutomaticRemove - Remove all automatic unused packages /*{{{*/
// ---------------------------------------------------------------------
/* Remove unused automatic packages */
// DoAutomaticRemove - Remove all automatic unused packages /*{{{*/
// ---------------------------------------------------------------------
/* Remove unused automatic packages */
@@
-576,7
+572,7
@@
bool DoAutomaticRemove(CacheFile &Cache)
return true;
}
/*}}}*/
return true;
}
/*}}}*/
-
+// DoCacheManipulationFromCommandLine /*{{{*/
static const unsigned short MOD_REMOVE = 1;
static const unsigned short MOD_INSTALL = 2;
static const unsigned short MOD_REMOVE = 1;
static const unsigned short MOD_INSTALL = 2;
@@
-585,7
+581,6
@@
bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, CacheFile &Cache)
std::map<unsigned short, APT::VersionSet> verset;
return DoCacheManipulationFromCommandLine(CmdL, Cache, verset);
}
std::map<unsigned short, APT::VersionSet> verset;
return DoCacheManipulationFromCommandLine(CmdL, Cache, verset);
}
-
bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, CacheFile &Cache,
std::map<unsigned short, APT::VersionSet> &verset)
{
bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, CacheFile &Cache,
std::map<unsigned short, APT::VersionSet> &verset)
{
@@
-719,8
+714,7
@@
bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, CacheFile &Cache,
return true;
}
return true;
}
-
-
+ /*}}}*/
// DoInstall - Install packages from the command line /*{{{*/
// ---------------------------------------------------------------------
/* Install named packages */
// DoInstall - Install packages from the command line /*{{{*/
// ---------------------------------------------------------------------
/* Install named packages */
diff --git
a/apt-private/private-list.cc
b/apt-private/private-list.cc
index
c3a21aa
..
8c61fca
100644
(file)
--- a/
apt-private/private-list.cc
+++ b/
apt-private/private-list.cc
@@
-42,7
+42,7
@@
#include <apti18n.h>
/*}}}*/
#include <apti18n.h>
/*}}}*/
-struct PackageSortAlphabetic
+struct PackageSortAlphabetic
/*{{{*/
{
bool operator () (const pkgCache::PkgIterator &p_lhs,
const pkgCache::PkgIterator &p_rhs)
{
bool operator () (const pkgCache::PkgIterator &p_lhs,
const pkgCache::PkgIterator &p_rhs)
@@
-52,12
+52,12
@@
struct PackageSortAlphabetic
return (l_name < r_name);
}
};
return (l_name < r_name);
}
};
-
+ /*}}}*/
+class PackageNameMatcher : public Matcher /*{{{*/
+{
#ifdef PACKAGE_MATCHER_ABI_COMPAT
#define PackageMatcher PackageNameMatchesFnmatch
#endif
#ifdef PACKAGE_MATCHER_ABI_COMPAT
#define PackageMatcher PackageNameMatchesFnmatch
#endif
-class PackageNameMatcher : public Matcher
-{
public:
PackageNameMatcher(const char **patterns)
{
public:
PackageNameMatcher(const char **patterns)
{
@@
-98,9
+98,8
@@
private:
std::vector<APT::CacheFilter::PackageMatcher*>::const_iterator J;
#undef PackageMatcher
};
std::vector<APT::CacheFilter::PackageMatcher*>::const_iterator J;
#undef PackageMatcher
};
-
-
-void ListAllVersions(pkgCacheFile &CacheFile, pkgRecords &records,
+ /*}}}*/
+void ListAllVersions(pkgCacheFile &CacheFile, pkgRecords &records, /*{{{*/
pkgCache::PkgIterator P,
std::ostream &outs)
{
pkgCache::PkgIterator P,
std::ostream &outs)
{
@@
-108,7
+107,7
@@
void ListAllVersions(pkgCacheFile &CacheFile, pkgRecords &records,
Ver.end() == false; Ver++)
ListSingleVersion(CacheFile, records, Ver, outs);
}
Ver.end() == false; Ver++)
ListSingleVersion(CacheFile, records, Ver, outs);
}
-
+ /*}}}*/
// list - list package based on criteria /*{{{*/
// ---------------------------------------------------------------------
bool List(CommandLine &Cmd)
// list - list package based on criteria /*{{{*/
// ---------------------------------------------------------------------
bool List(CommandLine &Cmd)
diff --git
a/apt-private/private-output.cc
b/apt-private/private-output.cc
index
6599754
..
6fadf72
100644
(file)
--- a/
apt-private/private-output.cc
+++ b/
apt-private/private-output.cc
@@
-28,8
+28,7
@@
std::ostream c2out(0);
std::ofstream devnull("/dev/null");
unsigned int ScreenWidth = 80 - 1; /* - 1 for the cursor */
std::ofstream devnull("/dev/null");
unsigned int ScreenWidth = 80 - 1; /* - 1 for the cursor */
-
-bool InitOutput()
+bool InitOutput() /*{{{*/
{
c0out.rdbuf(cout.rdbuf());
c1out.rdbuf(cout.rdbuf());
{
c0out.rdbuf(cout.rdbuf());
c1out.rdbuf(cout.rdbuf());
@@
-60,8
+59,8
@@
bool InitOutput()
return true;
}
return true;
}
-
-std::string GetArchiveSuite(pkgCacheFile &CacheFile, pkgCache::VerIterator ver)
+ /*}}}*/
+std::string GetArchiveSuite(pkgCacheFile &CacheFile, pkgCache::VerIterator ver)
/*{{{*/
{
std::string suite = "";
if (ver && ver.FileList() && ver.FileList())
{
std::string suite = "";
if (ver && ver.FileList() && ver.FileList())
@@
-77,8
+76,8
@@
std::string GetArchiveSuite(pkgCacheFile &CacheFile, pkgCache::VerIterator ver)
}
return suite;
}
}
return suite;
}
-
-std::string GetFlagsStr(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)
+ /*}}}*/
+std::string GetFlagsStr(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)
/*{{{*/
{
pkgDepCache *DepCache = CacheFile.GetDepCache();
pkgDepCache::StateCache &state = (*DepCache)[P];
{
pkgDepCache *DepCache = CacheFile.GetDepCache();
pkgDepCache::StateCache &state = (*DepCache)[P];
@@
-94,23
+93,23
@@
std::string GetFlagsStr(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)
flags_str = "-";
return flags_str;
}
flags_str = "-";
return flags_str;
}
-
-std::string GetCandidateVersion(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)
+ /*}}}*/
+std::string GetCandidateVersion(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)
/*{{{*/
{
pkgPolicy *policy = CacheFile.GetPolicy();
pkgCache::VerIterator cand = policy->GetCandidateVer(P);
return cand ? cand.VerStr() : "(none)";
}
{
pkgPolicy *policy = CacheFile.GetPolicy();
pkgCache::VerIterator cand = policy->GetCandidateVer(P);
return cand ? cand.VerStr() : "(none)";
}
-
-std::string GetInstalledVersion(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)
+ /*}}}*/
+std::string GetInstalledVersion(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)
/*{{{*/
{
pkgCache::VerIterator inst = P.CurrentVer();
return inst ? inst.VerStr() : "(none)";
}
{
pkgCache::VerIterator inst = P.CurrentVer();
return inst ? inst.VerStr() : "(none)";
}
-
-std::string GetVersion(pkgCacheFile &CacheFile, pkgCache::VerIterator V)
+ /*}}}*/
+std::string GetVersion(pkgCacheFile &CacheFile, pkgCache::VerIterator V)
/*{{{*/
{
pkgCache::PkgIterator P = V.ParentPkg();
if (V == P.CurrentVer())
{
pkgCache::PkgIterator P = V.ParentPkg();
if (V == P.CurrentVer())
@@
-127,8
+126,8
@@
std::string GetVersion(pkgCacheFile &CacheFile, pkgCache::VerIterator V)
return DeNull(V.VerStr());
return "(none)";
}
return DeNull(V.VerStr());
return "(none)";
}
-
-std::string GetArchitecture(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)
+ /*}}}*/
+std::string GetArchitecture(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)
/*{{{*/
{
pkgPolicy *policy = CacheFile.GetPolicy();
pkgCache::VerIterator inst = P.CurrentVer();
{
pkgPolicy *policy = CacheFile.GetPolicy();
pkgCache::VerIterator inst = P.CurrentVer();
@@
-136,8
+135,8
@@
std::string GetArchitecture(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)
return inst ? inst.Arch() : cand.Arch();
}
return inst ? inst.Arch() : cand.Arch();
}
-
-std::string GetShortDescription(pkgCacheFile &CacheFile, pkgRecords &records, pkgCache::PkgIterator P)
+ /*}}}*/
+std::string GetShortDescription(pkgCacheFile &CacheFile, pkgRecords &records, pkgCache::PkgIterator P)
/*{{{*/
{
pkgPolicy *policy = CacheFile.GetPolicy();
{
pkgPolicy *policy = CacheFile.GetPolicy();
@@
-157,8
+156,8
@@
std::string GetShortDescription(pkgCacheFile &CacheFile, pkgRecords &records, pk
}
return ShortDescription;
}
}
return ShortDescription;
}
-
-void ListSingleVersion(pkgCacheFile &CacheFile, pkgRecords &records,
+ /*}}}*/
+void ListSingleVersion(pkgCacheFile &CacheFile, pkgRecords &records,
/*{{{*/
pkgCache::VerIterator V, std::ostream &out)
{
pkgCache::PkgIterator P = V.ParentPkg();
pkgCache::VerIterator V, std::ostream &out)
{
pkgCache::PkgIterator P = V.ParentPkg();
@@
-230,8
+229,7
@@
void ListSingleVersion(pkgCacheFile &CacheFile, pkgRecords &records,
<< std::endl;
}
}
<< std::endl;
}
}
-
-
+ /*}}}*/
// ShowList - Show a list /*{{{*/
// ---------------------------------------------------------------------
/* This prints out a string of space separated words with a title and
// ShowList - Show a list /*{{{*/
// ---------------------------------------------------------------------
/* This prints out a string of space separated words with a title and
diff --git
a/apt-private/private-search.cc
b/apt-private/private-search.cc
index
6881f48
..
ff4140f
100644
(file)
--- a/
apt-private/private-search.cc
+++ b/
apt-private/private-search.cc
@@
-1,3
+1,4
@@
+// Includes /*{{{*/
#include <apt-pkg/error.h>
#include <apt-pkg/cachefile.h>
#include <apt-pkg/cachefilter.h>
#include <apt-pkg/error.h>
#include <apt-pkg/cachefile.h>
#include <apt-pkg/cachefilter.h>
@@
-34,9
+35,9
@@
#include "private-search.h"
#include "private-cacheset.h"
#include "private-search.h"
#include "private-cacheset.h"
+ /*}}}*/
-
-bool FullTextSearch(CommandLine &CmdL)
+bool FullTextSearch(CommandLine &CmdL) /*{{{*/
{
pkgCacheFile CacheFile;
pkgCache *Cache = CacheFile.GetPkgCache();
{
pkgCacheFile CacheFile;
pkgCache *Cache = CacheFile.GetPkgCache();
@@
-97,3
+98,4
@@
bool FullTextSearch(CommandLine &CmdL)
return true;
}
return true;
}
+ /*}}}*/
diff --git
a/apt-private/private-show.cc
b/apt-private/private-show.cc
index
e26a2b3
..
7f4beb7
100644
(file)
--- a/
apt-private/private-show.cc
+++ b/
apt-private/private-show.cc
@@
-1,3
+1,4
@@
+// Includes /*{{{*/
#include <apt-pkg/error.h>
#include <apt-pkg/cachefile.h>
#include <apt-pkg/cachefilter.h>
#include <apt-pkg/error.h>
#include <apt-pkg/cachefile.h>
#include <apt-pkg/cachefilter.h>
@@
-23,6
+24,7
@@
#include "private-output.h"
#include "private-cacheset.h"
#include "private-output.h"
#include "private-cacheset.h"
+ /*}}}*/
namespace APT {
namespace Cmd {
namespace APT {
namespace Cmd {
@@
-87,8
+89,7
@@
bool DisplayRecord(pkgCacheFile &CacheFile, pkgCache::VerIterator V,
return true;
}
/*}}}*/
return true;
}
/*}}}*/
-
-bool ShowPackage(CommandLine &CmdL)
+bool ShowPackage(CommandLine &CmdL) /*{{{*/
{
pkgCacheFile CacheFile;
CacheSetHelperVirtuals helper(true, GlobalError::NOTICE);
{
pkgCacheFile CacheFile;
CacheSetHelperVirtuals helper(true, GlobalError::NOTICE);
diff --git
a/apt-private/private-upgrade.cc
b/apt-private/private-upgrade.cc
index
09085c2
..
9a5286b
100644
(file)
--- a/
apt-private/private-upgrade.cc
+++ b/
apt-private/private-upgrade.cc
@@
-1,13
+1,13
@@
-
+// Includes /*{{{*/
#include <apt-pkg/algorithms.h>
#include "private-install.h"
#include "private-cachefile.h"
#include "private-upgrade.h"
#include "private-output.h"
#include <apt-pkg/algorithms.h>
#include "private-install.h"
#include "private-cachefile.h"
#include "private-upgrade.h"
#include "private-output.h"
+ /*}}}*/
-
-// DoUpgradeNoNewPackages - Upgrade all packages /*{{{*/
+// DoUpgradeNoNewPackages - Upgrade all packages /*{{{*/
// ---------------------------------------------------------------------
/* Upgrade all packages without installing new packages or erasing old
packages */
// ---------------------------------------------------------------------
/* Upgrade all packages without installing new packages or erasing old
packages */
@@
-31,7
+31,6
@@
bool DoUpgradeNoNewPackages(CommandLine &CmdL)
return InstallPackages(Cache,true);
}
/*}}}*/
return InstallPackages(Cache,true);
}
/*}}}*/
-
// DoSafeUpgrade - Upgrade all packages with install but not remove /*{{{*/
bool DoUpgradeWithAllowNewPackages(CommandLine &CmdL)
{
// DoSafeUpgrade - Upgrade all packages with install but not remove /*{{{*/
bool DoUpgradeWithAllowNewPackages(CommandLine &CmdL)
{
diff --git
a/cmdline/apt-get.cc
b/cmdline/apt-get.cc
index
c273dfa
..
8a30ac3
100644
(file)
--- a/
cmdline/apt-get.cc
+++ b/
cmdline/apt-get.cc
@@
-84,11
+84,8
@@
#include <apti18n.h>
/*}}}*/
#include <apti18n.h>
/*}}}*/
-
using namespace std;
using namespace std;
-
-
// TryToInstallBuildDep - Try to install a single package /*{{{*/
// ---------------------------------------------------------------------
/* This used to be inlined in DoInstall, but with the advent of regex package
// TryToInstallBuildDep - Try to install a single package /*{{{*/
// ---------------------------------------------------------------------
/* This used to be inlined in DoInstall, but with the advent of regex package
@@
-1625,15
+1622,14
@@
void SigWinch(int)
#endif
}
/*}}}*/
#endif
}
/*}}}*/
-
-bool DoUpgrade(CommandLine &CmdL)
+bool DoUpgrade(CommandLine &CmdL) /*{{{*/
{
if (_config->FindB("APT::Get::UpgradeAllowNew", false) == true)
return DoUpgradeWithAllowNewPackages(CmdL);
else
return DoUpgradeNoNewPackages(CmdL);
}
{
if (_config->FindB("APT::Get::UpgradeAllowNew", false) == true)
return DoUpgradeWithAllowNewPackages(CmdL);
else
return DoUpgradeNoNewPackages(CmdL);
}
-
+ /*}}}*/
int main(int argc,const char *argv[]) /*{{{*/
{
CommandLine::Dispatch Cmds[] = {{"update",&DoUpdate},
int main(int argc,const char *argv[]) /*{{{*/
{
CommandLine::Dispatch Cmds[] = {{"update",&DoUpdate},