From 6f4bcf1d0f2eb99336c9e75b7bf34e7e5010a43d Mon Sep 17 00:00:00 2001 From: Eyal Itkin Date: Mon, 13 Oct 2025 16:51:02 +0300 Subject: pkgconfig: Improve handling of empty string deps Fix the original bug fix for #13950 to only warn about empty required strings, instead of failing the entire build. This will simplify the workflow for users that build the string from a possibly empty list, and save them the need for the added if-check. Signed-off-by: Eyal Itkin --- test cases/common/44 pkgconfig-gen/meson.build | 8 ++++++++ test cases/common/44 pkgconfig-gen/test.json | 1 + 2 files changed, 9 insertions(+) (limited to 'test cases/common') diff --git a/test cases/common/44 pkgconfig-gen/meson.build b/test cases/common/44 pkgconfig-gen/meson.build index fd6371ef4..c31287348 100644 --- a/test cases/common/44 pkgconfig-gen/meson.build +++ b/test cases/common/44 pkgconfig-gen/meson.build @@ -193,3 +193,11 @@ simple7 = library('simple7', include_directories: 'inc1') dep = declare_dependency(include_directories: 'inc2') install_headers('inc1/inc1.h', 'inc2/inc2.h') pkgg.generate(simple7, libraries: dep) + +# Regression test: empty string passed to requires.private should not +# fail the build +pkgg.generate( + name : 'emptytest', + description : 'Check that requires.private can be an empty string', + requires_private: '', +) diff --git a/test cases/common/44 pkgconfig-gen/test.json b/test cases/common/44 pkgconfig-gen/test.json index 01786d424..36c7e95e1 100644 --- a/test cases/common/44 pkgconfig-gen/test.json +++ b/test cases/common/44 pkgconfig-gen/test.json @@ -16,6 +16,7 @@ {"type": "file", "file": "usr/lib/pkgconfig/simple5.pc"}, {"type": "file", "file": "usr/lib/pkgconfig/simple6.pc"}, {"type": "file", "file": "usr/lib/pkgconfig/simple7.pc"}, + {"type": "file", "file": "usr/lib/pkgconfig/emptytest.pc"}, {"type": "file", "file": "usr/lib/pkgconfig/ct.pc"}, {"type": "file", "file": "usr/lib/pkgconfig/ct0.pc"}, {"type": "file", "file": "usr/share/pkgconfig/libhello_nolib.pc"} -- cgit v1.2.3