From d4f626ff09383873c7b1ae42b744293c940c9c2c Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 25 Apr 2011 15:59:19 +0200 Subject: reorganize WriteScenario to add a WriteLimitedScenario in which a scenario can be limited to a subset of packages with only relevant dependencies --- apt-pkg/edsp.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'apt-pkg/edsp.h') diff --git a/apt-pkg/edsp.h b/apt-pkg/edsp.h index 31f8891f3..db4f06a7c 100644 --- a/apt-pkg/edsp.h +++ b/apt-pkg/edsp.h @@ -8,20 +8,37 @@ #define PKGLIB_EDSP_H #include +#include #include class EDSP /*{{{*/ { + // we could use pkgCache::DepType and ::Priority, but these would be localized stringsā€¦ + static const char * const PrioMap[]; + static const char * const DepMap[]; + bool static ReadLine(int const input, std::string &line); bool static StringToBool(char const *answer, bool const defValue); + void static WriteScenarioVersion(pkgDepCache &Cache, FILE* output, + pkgCache::PkgIterator const &Pkg, + pkgCache::VerIterator const &Ver); + void static WriteScenarioDependency(pkgDepCache &Cache, FILE* output, + pkgCache::PkgIterator const &Pkg, + pkgCache::VerIterator const &Ver); + void static WriteScenarioLimitedDependency(pkgDepCache &Cache, FILE* output, + pkgCache::PkgIterator const &Pkg, + pkgCache::VerIterator const &Ver, + APT::PackageSet const &pkgset); public: bool static WriteRequest(pkgDepCache &Cache, FILE* output, bool const upgrade = false, bool const distUpgrade = false, bool const autoRemove = false); bool static WriteScenario(pkgDepCache &Cache, FILE* output); + bool static WriteLimitedScenario(pkgDepCache &Cache, FILE* output, + APT::PackageSet const &pkgset); bool static ReadResponse(int const input, pkgDepCache &Cache); // ReadScenario is provided by the listparser infrastructure -- cgit v1.2.3