chore: drop DWARFSEXTRACT_MINIMAL completely

Extracting by pattern is a mandatory feature for the `fuse-extract` use
case, so no point in being able to disable this.
This commit is contained in:
Marcus Holland-Moritz 2025-04-17 06:47:42 +02:00
parent 84157a1c9e
commit 24f87bbeaa
5 changed files with 1 additions and 21 deletions

View File

@ -171,7 +171,7 @@ case "-$BUILD_TYPE-" in
*-minimal-*)
CMAKE_ARGS="${CMAKE_ARGS} -DENABLE_PERFMON=0 -DWITH_MAN_OPTION=0 -DENABLE_RICEPP=0"
CMAKE_ARGS="${CMAKE_ARGS} -DTRY_ENABLE_BROTLI=0 -DTRY_ENABLE_LZ4=0 -DTRY_ENABLE_FLAC=0"
CMAKE_ARGS="${CMAKE_ARGS} -DDWARFSEXTRACT_MINIMAL=1 -DDISABLE_FILESYSTEM_EXTRACTOR_FORMAT=1"
CMAKE_ARGS="${CMAKE_ARGS} -DDISABLE_FILESYSTEM_EXTRACTOR_FORMAT=1"
;;
esac

View File

@ -44,7 +44,6 @@ option(WITH_FUSE_EXTRACT_BINARY "build with fuse-extract binary" OFF)
option(WITH_PXATTR "build with pxattr binary" OFF)
option(WITH_EXAMPLE "build with example binary" OFF)
option(ENABLE_STACKTRACE "build with stack trace support" OFF)
option(DWARFSEXTRACT_MINIMAL "disable patterns support in dwarfsextract" OFF)
option(DISABLE_FILESYSTEM_EXTRACTOR_FORMAT "disable filesystem extractor format support" OFF)
if(APPLE)
option(USE_HOMEBREW_LIBARCHIVE "use libarchive from homebrew" ON)
@ -300,9 +299,6 @@ if(WITH_TOOLS)
target_link_libraries(mkdwarfs_main PRIVATE dwarfs_reader dwarfs_writer dwarfs_rewrite)
target_link_libraries(dwarfsck_main PRIVATE dwarfs_reader)
target_link_libraries(dwarfsextract_main PRIVATE dwarfs_extractor)
target_compile_definitions(dwarfsextract_main PRIVATE
$<$<BOOL:${DWARFSEXTRACT_MINIMAL}>:DWARFSEXTRACT_MINIMAL>
)
if(WITH_UNIVERSAL_BINARY)
add_executable(dwarfsuniversal tools/src/universal.cpp)
@ -582,9 +578,6 @@ if(WITH_TESTS)
if(TARGET tool_main_test)
target_link_libraries(tool_main_test PRIVATE mkdwarfs_main dwarfsck_main dwarfsextract_main PkgConfig::LIBARCHIVE)
target_compile_definitions(tool_main_test PRIVATE
$<$<BOOL:${DWARFSEXTRACT_MINIMAL}>:DWARFSEXTRACT_MINIMAL>
)
endif()
if(TARGET manpage_test)
@ -596,9 +589,6 @@ if(WITH_TESTS)
target_compile_definitions(manpage_test PRIVATE DWARFS_WITH_FUSE_DRIVER)
target_link_libraries(manpage_test PRIVATE dwarfs_main)
endif()
target_compile_definitions(manpage_test PRIVATE
$<$<BOOL:${DWARFSEXTRACT_MINIMAL}>:DWARFSEXTRACT_MINIMAL>
)
endif()
if(TARGET tools_test)

View File

@ -195,9 +195,7 @@ TEST_P(manpage_coverage_test, options) {
#ifdef DWARFS_FILESYSTEM_EXTRACTOR_NO_OPEN_FORMAT
man_opts.erase("format");
#endif
#ifdef DWARFSEXTRACT_MINIMAL
man_opts.erase("pattern");
#endif
}
for (auto const& [opt, short_opt] : man_opts) {

View File

@ -2159,7 +2159,6 @@ TEST(dwarfsextract_test, mtree) {
EXPECT_THAT(out, ::testing::HasSubstr("type=file"));
}
#ifndef DWARFSEXTRACT_MINIMAL
TEST(dwarfsextract_test, patterns) {
auto mkdt = mkdwarfs_tester::create_empty();
mkdt.add_test_file_tree();
@ -2190,7 +2189,6 @@ TEST(dwarfsextract_test, patterns) {
}
EXPECT_EQ(expected, actual);
}
#endif
TEST(dwarfsextract_test, stdout_progress_error) {
auto t = dwarfsextract_tester::create_with_image();

View File

@ -90,11 +90,9 @@ int dwarfsextract_main(int argc, sys_char** argv, iolayer const& iol) {
("output,o",
po_sys_value<sys_string>(&output),
"output file or directory")
#ifndef DWARFSEXTRACT_MINIMAL
("pattern",
po::value<std::vector<std::string>>(),
"only extract files matching these patterns")
#endif
("image-offset,O",
po::value<std::string>(&image_offset)->default_value("auto"),
"filesystem image offset in bytes")
@ -132,9 +130,7 @@ int dwarfsextract_main(int argc, sys_char** argv, iolayer const& iol) {
tool::add_common_options(opts, logopts);
po::positional_options_description pos;
#ifndef DWARFSEXTRACT_MINIMAL
pos.add("pattern", -1);
#endif
po::variables_map vm;
@ -172,12 +168,10 @@ int dwarfsextract_main(int argc, sys_char** argv, iolayer const& iol) {
std::unique_ptr<glob_matcher> matcher;
#ifndef DWARFSEXTRACT_MINIMAL
if (vm.contains("pattern")) {
matcher = std::make_unique<glob_matcher>(
vm["pattern"].as<std::vector<std::string>>());
}
#endif
int rv = 0;