diff options
author | David Kalnischkies <david@kalnischkies.de> | 2018-01-26 23:33:25 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2018-05-11 17:58:46 +0200 |
commit | ce9223cc4e4ffcc43d17ae97ff8c57fb759a2c49 (patch) | |
tree | 97e3a97c145abd660ebe8f09ac2fcc97f558075d /apt-private/private-install.h | |
parent | 9169cd5049bd7f0d5dcc56c40d567a766cf5b851 (diff) |
Support release selector for volatile files as well
The syntax is a bit awkward, but it is the same as for a package name
and introducing another syntax wouldn't really help usability, so with
apt install ./foo.deb/experimental you will get the dependencies of foo
satisfied by your default release, but if this wouldn't satisfy the
version requirements the candidate for this dependency is switched to
the version from the experimental release. The same applies for apt
build-dep ./foo.dsc/stable-backports which was the initial request.
Diffstat (limited to 'apt-private/private-install.h')
-rw-r--r-- | apt-private/private-install.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/apt-private/private-install.h b/apt-private/private-install.h index 2d27756c9..07aa582be 100644 --- a/apt-private/private-install.h +++ b/apt-private/private-install.h @@ -17,9 +17,22 @@ class pkgProblemResolver; APT_PUBLIC bool DoInstall(CommandLine &Cmd); -bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, std::vector<std::string> &VolatileCmdL, CacheFile &Cache, +struct PseudoPkg +{ + std::string name; + std::string arch; + std::string release; + ssize_t index; + PseudoPkg(std::string const &n, std::string const &a, std::string const &r) : name(n), arch(a), release(r), index(-1) {} + PseudoPkg(std::string const &n, std::string const &a, std::string const &r, ssize_t i) : name(n), arch(a), release(r), index(i) {} +}; +std::vector<PseudoPkg> GetPseudoPackages(pkgSourceList *const SL, CommandLine &CmdL, bool (*Add)(pkgSourceList *const, PseudoPkg &&, std::vector<PseudoPkg> &), std::string const &pseudoArch); +bool AddVolatileBinaryFile(pkgSourceList *const SL, PseudoPkg &&pkg, std::vector<PseudoPkg> &VolatileCmdL); +bool AddVolatileSourceFile(pkgSourceList *const SL, PseudoPkg &&pkg, std::vector<PseudoPkg> &VolatileCmdL); + +bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, std::vector<PseudoPkg> &VolatileCmdL, CacheFile &Cache, std::map<unsigned short, APT::VersionSet> &verset, int UpgradeMode, std::set<std::string> &UnknownPackages); -bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, std::vector<std::string> &VolatileCmdL, CacheFile &Cache, int UpgradeMode); +bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, std::vector<PseudoPkg> &VolatileCmdL, CacheFile &Cache, int UpgradeMode); bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, CacheFile &Cache, int UpgradeMode); APT_PUBLIC bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, |