summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.h
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-02-08 11:02:46 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2011-02-08 11:02:46 +0100
commit86e2dc4dd728924d71995ebaeb83a4d9abba94d5 (patch)
treeb535bac6a1c5d75a3db5c810fb225c1e26f080b7 /apt-pkg/depcache.h
parentde6d91438ef2e3632615647647099f4c6fa227fa (diff)
parent33e46bc7032c2bcab654ab3f6a0a10ad82264ead (diff)
merged from the debian-sid branch
Diffstat (limited to 'apt-pkg/depcache.h')
-rw-r--r--apt-pkg/depcache.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h
index 2d3dbdf77..dba3e22dc 100644
--- a/apt-pkg/depcache.h
+++ b/apt-pkg/depcache.h
@@ -396,6 +396,25 @@ class pkgDepCache : protected pkgCache::Namespace
void SetReInstall(PkgIterator const &Pkg,bool To);
void SetCandidateVersion(VerIterator TargetVer, bool const &Pseudo = true);
+ bool SetCandidateRelease(pkgCache::VerIterator TargetVer,
+ std::string const &TargetRel);
+ /** Set the candidate version for dependencies too if needed.
+ *
+ * Sets not only the candidate version as SetCandidateVersion does,
+ * but walks also down the dependency tree and checks if it is required
+ * to set the candidate of the dependency to a version from the given
+ * release, too.
+ *
+ * \param TargetVer new candidate version of the package
+ * \param TargetRel try to switch to this release if needed
+ * \param[out] Changed a list of pairs consisting of the \b old
+ * version of the changed package and the version which
+ * required the switch of this dependency
+ * \return \b true if the switch was successful, \b false otherwise
+ */
+ bool SetCandidateRelease(pkgCache::VerIterator TargetVer,
+ std::string const &TargetRel,
+ std::list<std::pair<pkgCache::VerIterator, pkgCache::VerIterator> > &Changed);
/** Set the "is automatically installed" flag of Pkg. */
void MarkAuto(const PkgIterator &Pkg, bool Auto);