Skip to content

Commit 24f87bb

Browse files
committed
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.
1 parent 84157a1 commit 24f87bb

File tree

5 files changed

+1
-21
lines changed

5 files changed

+1
-21
lines changed

.docker/build-linux.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ case "-$BUILD_TYPE-" in
171171
*-minimal-*)
172172
CMAKE_ARGS="${CMAKE_ARGS} -DENABLE_PERFMON=0 -DWITH_MAN_OPTION=0 -DENABLE_RICEPP=0"
173173
CMAKE_ARGS="${CMAKE_ARGS} -DTRY_ENABLE_BROTLI=0 -DTRY_ENABLE_LZ4=0 -DTRY_ENABLE_FLAC=0"
174-
CMAKE_ARGS="${CMAKE_ARGS} -DDWARFSEXTRACT_MINIMAL=1 -DDISABLE_FILESYSTEM_EXTRACTOR_FORMAT=1"
174+
CMAKE_ARGS="${CMAKE_ARGS} -DDISABLE_FILESYSTEM_EXTRACTOR_FORMAT=1"
175175
;;
176176
esac
177177

CMakeLists.txt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ option(WITH_FUSE_EXTRACT_BINARY "build with fuse-extract binary" OFF)
4444
option(WITH_PXATTR "build with pxattr binary" OFF)
4545
option(WITH_EXAMPLE "build with example binary" OFF)
4646
option(ENABLE_STACKTRACE "build with stack trace support" OFF)
47-
option(DWARFSEXTRACT_MINIMAL "disable patterns support in dwarfsextract" OFF)
4847
option(DISABLE_FILESYSTEM_EXTRACTOR_FORMAT "disable filesystem extractor format support" OFF)
4948
if(APPLE)
5049
option(USE_HOMEBREW_LIBARCHIVE "use libarchive from homebrew" ON)
@@ -300,9 +299,6 @@ if(WITH_TOOLS)
300299
target_link_libraries(mkdwarfs_main PRIVATE dwarfs_reader dwarfs_writer dwarfs_rewrite)
301300
target_link_libraries(dwarfsck_main PRIVATE dwarfs_reader)
302301
target_link_libraries(dwarfsextract_main PRIVATE dwarfs_extractor)
303-
target_compile_definitions(dwarfsextract_main PRIVATE
304-
$<$<BOOL:${DWARFSEXTRACT_MINIMAL}>:DWARFSEXTRACT_MINIMAL>
305-
)
306302

307303
if(WITH_UNIVERSAL_BINARY)
308304
add_executable(dwarfsuniversal tools/src/universal.cpp)
@@ -582,9 +578,6 @@ if(WITH_TESTS)
582578

583579
if(TARGET tool_main_test)
584580
target_link_libraries(tool_main_test PRIVATE mkdwarfs_main dwarfsck_main dwarfsextract_main PkgConfig::LIBARCHIVE)
585-
target_compile_definitions(tool_main_test PRIVATE
586-
$<$<BOOL:${DWARFSEXTRACT_MINIMAL}>:DWARFSEXTRACT_MINIMAL>
587-
)
588581
endif()
589582

590583
if(TARGET manpage_test)
@@ -596,9 +589,6 @@ if(WITH_TESTS)
596589
target_compile_definitions(manpage_test PRIVATE DWARFS_WITH_FUSE_DRIVER)
597590
target_link_libraries(manpage_test PRIVATE dwarfs_main)
598591
endif()
599-
target_compile_definitions(manpage_test PRIVATE
600-
$<$<BOOL:${DWARFSEXTRACT_MINIMAL}>:DWARFSEXTRACT_MINIMAL>
601-
)
602592
endif()
603593

604594
if(TARGET tools_test)

test/manpage_test.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,7 @@ TEST_P(manpage_coverage_test, options) {
195195
#ifdef DWARFS_FILESYSTEM_EXTRACTOR_NO_OPEN_FORMAT
196196
man_opts.erase("format");
197197
#endif
198-
#ifdef DWARFSEXTRACT_MINIMAL
199198
man_opts.erase("pattern");
200-
#endif
201199
}
202200

203201
for (auto const& [opt, short_opt] : man_opts) {

test/tool_main_test.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2159,7 +2159,6 @@ TEST(dwarfsextract_test, mtree) {
21592159
EXPECT_THAT(out, ::testing::HasSubstr("type=file"));
21602160
}
21612161

2162-
#ifndef DWARFSEXTRACT_MINIMAL
21632162
TEST(dwarfsextract_test, patterns) {
21642163
auto mkdt = mkdwarfs_tester::create_empty();
21652164
mkdt.add_test_file_tree();
@@ -2190,7 +2189,6 @@ TEST(dwarfsextract_test, patterns) {
21902189
}
21912190
EXPECT_EQ(expected, actual);
21922191
}
2193-
#endif
21942192

21952193
TEST(dwarfsextract_test, stdout_progress_error) {
21962194
auto t = dwarfsextract_tester::create_with_image();

tools/src/dwarfsextract_main.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,9 @@ int dwarfsextract_main(int argc, sys_char** argv, iolayer const& iol) {
9090
("output,o",
9191
po_sys_value<sys_string>(&output),
9292
"output file or directory")
93-
#ifndef DWARFSEXTRACT_MINIMAL
9493
("pattern",
9594
po::value<std::vector<std::string>>(),
9695
"only extract files matching these patterns")
97-
#endif
9896
("image-offset,O",
9997
po::value<std::string>(&image_offset)->default_value("auto"),
10098
"filesystem image offset in bytes")
@@ -132,9 +130,7 @@ int dwarfsextract_main(int argc, sys_char** argv, iolayer const& iol) {
132130
tool::add_common_options(opts, logopts);
133131

134132
po::positional_options_description pos;
135-
#ifndef DWARFSEXTRACT_MINIMAL
136133
pos.add("pattern", -1);
137-
#endif
138134

139135
po::variables_map vm;
140136

@@ -172,12 +168,10 @@ int dwarfsextract_main(int argc, sys_char** argv, iolayer const& iol) {
172168

173169
std::unique_ptr<glob_matcher> matcher;
174170

175-
#ifndef DWARFSEXTRACT_MINIMAL
176171
if (vm.contains("pattern")) {
177172
matcher = std::make_unique<glob_matcher>(
178173
vm["pattern"].as<std::vector<std::string>>());
179174
}
180-
#endif
181175

182176
int rv = 0;
183177

0 commit comments

Comments
 (0)