summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2024-05-14 10:26:45 +0000
committerJulian Andres Klode <jak@debian.org>2024-05-14 10:26:45 +0000
commit422fb4f9637d0164dec9e55dc3df56c89af65a64 (patch)
tree3fef52a852123c958314cd2d2a4ec319a58b1523 /cmdline
parent6d96601ede7164620cc404ef8ead7d72c3010b8d (diff)
parentd2323b179c4fafa0424177a8c702166722384b14 (diff)
Merge branch 'solver3' into 'main'
Initial implementation of the 3.0 solver See merge request apt-team/apt!347
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/CMakeLists.txt1
-rw-r--r--cmdline/apt-internal-solver.cc5
2 files changed, 5 insertions, 1 deletions
diff --git a/cmdline/CMakeLists.txt b/cmdline/CMakeLists.txt
index 91bf9bb0c..28a14ddf9 100644
--- a/cmdline/CMakeLists.txt
+++ b/cmdline/CMakeLists.txt
@@ -54,6 +54,7 @@ install(TARGETS apt-dump-solver apt-internal-solver RUNTIME DESTINATION ${CMAKE_
install(TARGETS apt-internal-planner RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/apt/planners)
add_links(${CMAKE_INSTALL_LIBEXECDIR}/apt/planners ../solvers/dump planners/dump)
+add_links(${CMAKE_INSTALL_LIBEXECDIR}/apt/solvers apt solver3)
# Install the not-to-be-compiled programs
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/apt-key DESTINATION ${CMAKE_INSTALL_BINDIR})
diff --git a/cmdline/apt-internal-solver.cc b/cmdline/apt-internal-solver.cc
index 094ed183c..d596dcb5e 100644
--- a/cmdline/apt-internal-solver.cc
+++ b/cmdline/apt-internal-solver.cc
@@ -119,7 +119,10 @@ int main(int argc,const char *argv[]) /*{{{*/
_config->Set("Debug::EDSP::WriteSolution", true);
_config->Set("APT::System", "Debian APT solver interface");
- _config->Set("APT::Solver", "internal");
+ if (strcmp(basename(argv[0]), "solver3") == 0)
+ _config->Set("APT::Solver", "3.0");
+ else if (_config->Find("APT::Solver") != "3.0")
+ _config->Set("APT::Solver", "internal");
_config->Set("edsp::scenario", "/nonexistent/stdin");
_config->Clear("Dir::Log");
FileFd output;