// ProblemResolver::Resolve - calls a resolver to fix the situation /*{{{*/
// ---------------------------------------------------------------------
/* */
+#if APT_PKG_ABI < 413
+bool pkgProblemResolver::Resolve(bool BrokenFix)
+{
+ return Resolve(BrokenFix, NULL);
+}
+#endif
bool pkgProblemResolver::Resolve(bool BrokenFix, OpProgress * const Progress)
{
std::string const solver = _config->Find("APT::Solver", "internal");
/* This is the work horse of the soft upgrade routine. It is very gental
in that it does not install or remove any packages. It is assumed that the
system was non-broken previously. */
+#if APT_PKG_ABI < 413
+bool pkgProblemResolver::ResolveByKeep()
+{
+ return ResolveByKeep(NULL);
+}
+#endif
bool pkgProblemResolver::ResolveByKeep(OpProgress * const Progress)
{
std::string const solver = _config->Find("APT::Solver", "internal");
inline void Clear(pkgCache::PkgIterator Pkg) {Flags[Pkg->ID] &= ~(Protected | ToRemove);};
// Try to intelligently resolve problems by installing and removing packages
+#if APT_PKG_ABI >= 413
bool Resolve(bool BrokenFix = false, OpProgress * const Progress = NULL);
+#else
+ bool Resolve(bool BrokenFix = false);
+ bool Resolve(bool BrokenFix, OpProgress * const Progress);
+#endif
// Try to resolve problems only by using keep
+#if APT_PKG_ABI >= 413
bool ResolveByKeep(OpProgress * const Progress = NULL);
+#else
+ bool ResolveByKeep();
+ bool ResolveByKeep(OpProgress * const Progress);
+#endif
APT_DEPRECATED void InstallProtect();
// Configuration::FindVector - Find a vector of values /*{{{*/
// ---------------------------------------------------------------------
/* Returns a vector of config values under the given item */
+#if APT_PKG_ABI < 413
+vector<string> Configuration::FindVector(const char *Name) const
+{
+ return FindVector(Name, "");
+}
+#endif
vector<string> Configuration::FindVector(const char *Name, std::string const &Default) const
{
vector<string> Vec;
*
* \param Name of the parent node
* \param Default list of values separated by commas */
+#if APT_PKG_ABI >= 413
std::vector<std::string> FindVector(const char *Name, std::string const &Default = "") const;
std::vector<std::string> FindVector(std::string const &Name, std::string const &Default = "") const { return FindVector(Name.c_str(), Default); };
+#else
+ std::vector<std::string> FindVector(const char *Name, std::string const &Default) const;
+ std::vector<std::string> FindVector(std::string const &Name, std::string const &Default) const { return FindVector(Name.c_str(), Default); };
+ std::vector<std::string> FindVector(const char *Name) const;
+ std::vector<std::string> FindVector(std::string const &Name) const { return FindVector(Name.c_str(), ""); };
+#endif
+
int FindI(const char *Name,int const &Default = 0) const;
int FindI(std::string const &Name,int const &Default = 0) const {return FindI(Name.c_str(),Default);};
bool FindB(const char *Name,bool const &Default = false) const;
*
* \return \b false if an error occurred.
*/
- APT_HIDDEN bool MarkRequired(InRootSetFunc &rootFunc);
+ bool MarkRequired(InRootSetFunc &rootFunc);
/** \brief Set the StateCache::Garbage flag on all packages that
* should be removed.
*
* \return \b false if an error occurred.
*/
- APT_HIDDEN bool Sweep();
+ bool Sweep();
public:
this->Trusted = NEVER_TRUSTED;
}
+#if APT_PKG_ABI >= 413
indexRecords::indexRecords(const string &ExpectedDist) :
Trusted(CHECK_TRUST), d(NULL), ExpectedDist(ExpectedDist), ValidUntil(0),
SupportsAcquireByHash(false)
{
}
+#else
+indexRecords::indexRecords() :
+ Trusted(CHECK_TRUST), d(NULL), ExpectedDist(""), ValidUntil(0),
+ SupportsAcquireByHash(false)
+{
+}
+indexRecords::indexRecords(const string ExpectedDist) :
+ Trusted(CHECK_TRUST), d(NULL), ExpectedDist(ExpectedDist), ValidUntil(0),
+ SupportsAcquireByHash(false)
+{
+}
+#endif
indexRecords::~indexRecords() {}
std::map<std::string,checkSum *> Entries;
public:
-
+#if APT_PKG_ABI >= 413
indexRecords(const std::string &ExpectedDist = "");
+#else
+ indexRecords();
+ indexRecords(const std::string ExpectedDist);
+#endif
// Lookup function
virtual checkSum *Lookup(const std::string MetaKey);
}
/*}}}*/
// TagSection::Scan - Scan for the end of the header information /*{{{*/
+#if APT_PKG_ABI < 413
+bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength)
+{
+ return Scan(Start, MaxLength, true);
+}
+#endif
bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength, bool const Restart)
{
Section = Start;
* @return \b true if section end was found, \b false otherwise.
* Beware that internal state will be inconsistent if \b false is returned!
*/
+#if APT_PKG_ABI >= 413
APT_MUSTCHECK bool Scan(const char *Start, unsigned long MaxLength, bool const Restart = true);
+#else
+ APT_MUSTCHECK bool Scan(const char *Start, unsigned long MaxLength, bool const Restart);
+ APT_MUSTCHECK bool Scan(const char *Start, unsigned long MaxLength);
+#endif
+
inline unsigned long size() const {return Stop - Section;};
void Trim();
virtual void TrimRecord(bool BeforeRecord, const char* &End);
The problem resolver is used to resolve the problems.
*/
-bool pkgDistUpgrade(pkgDepCache &Cache, OpProgress * const Progress)
+static bool pkgDistUpgrade(pkgDepCache &Cache, OpProgress * const Progress)
{
std::string const solver = _config->Find("APT::Solver", "internal");
if (solver != "internal")
if (Progress != NULL)
Progress->Done();
return success;
+}
+bool pkgDistUpgrade(pkgDepCache &Cache)
+{
+ return pkgDistUpgrade(Cache, NULL);
}
/*}}}*/
// AllUpgradeNoNewPackages - Upgrade but no removals or new pkgs /*{{{*/
/* Right now the system must be consistent before this can be called.
It also will not change packages marked for install, it only tries
to install packages not marked for install */
-bool pkgAllUpgrade(pkgDepCache &Cache, OpProgress * const Progress)
+static bool pkgAllUpgrade(pkgDepCache &Cache, OpProgress * const Progress)
{
return pkgAllUpgradeNoNewPackages(Cache, Progress);
+}
+bool pkgAllUpgrade(pkgDepCache &Cache)
+{
+ return pkgAllUpgrade(Cache, NULL);
}
/*}}}*/
// MinimizeUpgrade - Minimizes the set of packages to be upgraded /*{{{*/
}
/*}}}*/
// APT::Upgrade::Upgrade - Upgrade using a specific strategy /*{{{*/
+#if APT_PKG_ABI < 413
+bool APT::Upgrade::Upgrade(pkgDepCache &Cache, int mode)
+{
+ return Upgrade(Cache, mode, NULL);
+}
+#endif
bool APT::Upgrade::Upgrade(pkgDepCache &Cache, int mode, OpProgress * const Progress)
{
APT_IGNORE_DEPRECATED_PUSH
namespace Upgrade {
// FIXME: make this "enum class UpgradeMode {" once we enable c++11
enum UpgradeMode {
- ALLOW_EVERYTHING = 0,
FORBID_REMOVE_PACKAGES = 1,
- FORBID_INSTALL_NEW_PACKAGES = 2
+ FORBID_INSTALL_NEW_PACKAGES = 2,
+ ALLOW_EVERYTHING = 0
};
+#if APT_PKG_ABI >= 413
bool Upgrade(pkgDepCache &Cache, int UpgradeMode, OpProgress * const Progress = NULL);
+#else
+ bool Upgrade(pkgDepCache &Cache, int UpgradeMode);
+ bool Upgrade(pkgDepCache &Cache, int UpgradeMode, OpProgress * const Progress);
+#endif
}
}
// please use APT::Upgrade::Upgrade() instead
-APT_DEPRECATED bool pkgDistUpgrade(pkgDepCache &Cache, OpProgress * const Progress = NULL);
-APT_DEPRECATED bool pkgAllUpgrade(pkgDepCache &Cache, OpProgress * const Progress = NULL);
+APT_DEPRECATED bool pkgDistUpgrade(pkgDepCache &Cache);
+APT_DEPRECATED bool pkgAllUpgrade(pkgDepCache &Cache);
bool pkgMinimizeUpgrade(pkgDepCache &Cache);
#endif
(c++)"pkgPrioSortList(pkgCache&, pkgCache::Version**)@Base" 0.8.0
(c++)"pkgMakeStatusCache(pkgSourceList&, OpProgress&, MMap**, bool)@Base" 0.8.0
(c++)"pkgMinimizeUpgrade(pkgDepCache&)@Base" 0.8.0
+ (c++)"pkgAllUpgrade(pkgDepCache&)@Base" 0.8.0
+ (c++)"pkgDistUpgrade(pkgDepCache&)@Base" 0.8.0
(c++)"GetListOfFilesInDir(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool const&)@Base" 0.8.0
(c++)"GetListOfFilesInDir(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool const&, bool const&)@Base" 0.8.0
(c++)"pkgMakeOnlyStatusCache(OpProgress&, DynamicMMap**)@Base" 0.8.0
(c++)"pkgDepCache::CheckDep(pkgCache::DepIterator, int, pkgCache::PkgIterator&)@Base" 0.8.0
(c++)"pkgDepCache::MarkAuto(pkgCache::PkgIterator const&, bool)@Base" 0.8.0
(c++)"pkgDepCache::MarkKeep(pkgCache::PkgIterator const&, bool, bool, unsigned long)@Base" 0.8.0
+ (c++)"pkgDepCache::MarkRequired(pkgDepCache::InRootSetFunc&)@Base" 0.8.0
+ (c++)"pkgDepCache::Sweep()@Base" 0.8.0
(c++)"pkgDepCache::pkgDepCache(pkgCache*, pkgDepCache::Policy*)@Base" 0.8.0
(c++)"pkgDepCache::~pkgDepCache()@Base" 0.8.0
(c++)"pkgSimulate::Policy::GetCandidateVer(pkgCache::PkgIterator const&)@Base" 0.8.0
(c++)"Popen(char const**, FileFd&, int&, FileFd::OpenMode)@Base" 1.1~exp1
(c++)"APT::String::Startswith(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 1.1~exp2
(c++)"APT::Upgrade::Upgrade(pkgDepCache&, int, OpProgress*)@Base" 1.1~exp4
- (c++)"pkgAllUpgrade(pkgDepCache&, OpProgress*)@Base" 1.1~exp4
- (c++)"pkgDistUpgrade(pkgDepCache&, OpProgress*)@Base" 1.1~exp4
(c++)"pkgProblemResolver::Resolve(bool, OpProgress*)@Base" 1.1~exp4
(c++)"pkgProblemResolver::ResolveByKeep(OpProgress*)@Base" 1.1~exp4
(c++)"pkgCache::PkgIterator::Section() const@Base" 1.1~exp4