From 4cbbf4ebe67f953f4b4611ec0f7dc34bcc44f43d Mon Sep 17 00:00:00 2001 From: ras0219 Date: Wed, 17 Jun 2020 12:32:05 -0700 Subject: [vcpkg] Fix issue #9781 by exporting from the installed directory (#11015) * [vcpkg] Fix issue #9781 by exporting from the installed directory * [vcpkg] Address code review comments for #11015 * [vcpkg] Remove duplicate triplet in installed path from exports Co-authored-by: Robert Schumacher --- toolsrc/include/vcpkg/base/files.h | 2 ++ toolsrc/include/vcpkg/install.h | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'toolsrc/include') diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h index 909029b55..cb0419221 100644 --- a/toolsrc/include/vcpkg/base/files.h +++ b/toolsrc/include/vcpkg/base/files.h @@ -111,6 +111,8 @@ namespace vcpkg::Files { std::string read_contents(const fs::path& file_path, LineInfo linfo) const; virtual Expected read_contents(const fs::path& file_path) const = 0; + /// Read text lines from a file + /// Lines will have up to one trailing carriage-return character stripped (CRLF) virtual Expected> read_lines(const fs::path& file_path) const = 0; virtual fs::path find_file_recursively_up(const fs::path& starting_dir, const std::string& filename) const = 0; virtual std::vector get_files_recursive(const fs::path& dir) const = 0; diff --git a/toolsrc/include/vcpkg/install.h b/toolsrc/include/vcpkg/install.h index ad91bbb37..9a438b039 100644 --- a/toolsrc/include/vcpkg/install.h +++ b/toolsrc/include/vcpkg/install.h @@ -70,7 +70,13 @@ namespace vcpkg::Install std::vector get_all_port_names(const VcpkgPaths& paths); - void install_files_and_write_listfile(Files::Filesystem& fs, const fs::path& source_dir, const InstallDir& dirs); + void install_package_and_write_listfile(const VcpkgPaths& paths, const PackageSpec& spec, const InstallDir& dirs); + + void install_files_and_write_listfile(Files::Filesystem& fs, + const fs::path& source_dir, + const std::vector& files, + const InstallDir& destination_dir); + InstallResult install_package(const VcpkgPaths& paths, const BinaryControlFile& binary_paragraph, StatusParagraphs* status_db); -- cgit v1.2.3