diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2010-12-03 17:06:34 +0100 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2010-12-03 17:06:34 +0100 |
commit | 2c085486d34c45e123c24b0e36294245fd5bf734 (patch) | |
tree | ca6976cd1eba978e74016d34068dce26b65eac3a /apt-pkg/depcache.h | |
parent | a8dfff90aa740889eb99d00fde5d70908d9fd88a (diff) |
* apt-pkg/depcache.cc:
- add SetCandidateRelease() to set a candidate version and
the candidates of dependencies if needed to a specified
release (Closes: #572709)
- change pkg/release behavior to use the new SetCandidateRelease
so installing packages from experimental or backports is easier
Diffstat (limited to 'apt-pkg/depcache.h')
-rw-r--r-- | apt-pkg/depcache.h | 19 |
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); |