summaryrefslogtreecommitdiff
path: root/methods/CMakeLists.txt
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2017-10-27 18:39:36 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2018-01-03 18:55:41 +0100
commit57fa854e4cdb060e87ca265abd5a83364f9fa681 (patch)
treef360e6166d8c5352e3954a0c9129b57a3dcfaf69 /methods/CMakeLists.txt
parentef9677831f62a1554a888ebc7b162517d7881116 (diff)
reimplement and simplify mirror:// method
Embedding an entire acquire stack and HTTP logic in the mirror method made it rather heavy weight and fragile. This reimplement goes the other way by doing only the bare minimum in the method itself and instead redirect the actual download of files to their proper methods. The reimplementation drops the (in the real world) unused query-string feature as it isn't really implementable in the new architecture.
Diffstat (limited to 'methods/CMakeLists.txt')
-rw-r--r--methods/CMakeLists.txt8
1 files changed, 3 insertions, 5 deletions
diff --git a/methods/CMakeLists.txt b/methods/CMakeLists.txt
index a25d4b525..cf5ab799d 100644
--- a/methods/CMakeLists.txt
+++ b/methods/CMakeLists.txt
@@ -2,7 +2,6 @@
include_directories($<$<BOOL:${SECCOMP_FOUND}>:${SECCOMP_INCLUDE_DIR}>)
link_libraries(apt-pkg $<$<BOOL:${SECCOMP_FOUND}>:${SECCOMP_LIBRARIES}>)
-add_library(httplib OBJECT http.cc basehttp.cc)
add_library(connectlib OBJECT connect.cc rfc2553emu.cc)
add_executable(file file.cc)
@@ -10,8 +9,8 @@ add_executable(copy copy.cc)
add_executable(store store.cc)
add_executable(gpgv gpgv.cc)
add_executable(cdrom cdrom.cc)
-add_executable(http http_main.cc $<TARGET_OBJECTS:httplib> $<TARGET_OBJECTS:connectlib>)
-add_executable(mirror mirror.cc $<TARGET_OBJECTS:httplib> $<TARGET_OBJECTS:connectlib>)
+add_executable(http http.cc basehttp.cc $<TARGET_OBJECTS:connectlib>)
+add_executable(mirror mirror.cc)
add_executable(ftp ftp.cc $<TARGET_OBJECTS:connectlib>)
add_executable(rred rred.cc)
add_executable(rsh rsh.cc)
@@ -21,14 +20,13 @@ target_include_directories(connectlib PRIVATE ${GNUTLS_INCLUDE_DIR})
# Additional libraries to link against for networked stuff
target_link_libraries(http ${GNUTLS_LIBRARIES})
-target_link_libraries(mirror ${RESOLV_LIBRARIES} ${GNUTLS_LIBRARIES})
target_link_libraries(ftp ${GNUTLS_LIBRARIES})
# Install the library
install(TARGETS file copy store gpgv cdrom http ftp rred rsh mirror
RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/apt/methods)
-add_slaves(${CMAKE_INSTALL_LIBEXECDIR}/apt/methods store)
+add_slaves(${CMAKE_INSTALL_LIBEXECDIR}/apt/methods mirror mirror+http mirror+https mirror+file)
add_slaves(${CMAKE_INSTALL_LIBEXECDIR}/apt/methods rsh ssh)