From 715cc306b0e4add06523b8fcce49867da469a728 Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Thu, 16 May 2013 07:03:27 -0700 Subject: Allow errors in .pc files for --list-all Normally, the parser will exit immediately when it encounters errors in .pc files. This is good most of the time, but for --list-all, the purpose is to just get a quick list of packages and not to validate .pc files. This is especially the case for pkg-config wrappers such as the Ruby or Bash completion modules that scrape the output from --list-all and don't expect to encounter errors there. Freedesktop #26615 (https://bugs.freedesktop.org/show_bug.cgi?id=26615) --- check/Makefile.am | 1 + check/check-print-options | 5 +++-- check/sub/broken.pc | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 check/sub/broken.pc (limited to 'check') diff --git a/check/Makefile.am b/check/Makefile.am index f348128..9bef3b4 100644 --- a/check/Makefile.am +++ b/check/Makefile.am @@ -44,6 +44,7 @@ EXTRA_DIST = \ fields-blank.pc \ sub/sub1.pc \ sub/sub2.pc \ + sub/broken.pc \ inst.pc \ inst-uninstalled.pc \ other.pc \ diff --git a/check/check-print-options b/check/check-print-options index a2a41e7..fcd94d6 100755 --- a/check/check-print-options +++ b/check/check-print-options @@ -34,8 +34,9 @@ RESULT="private-dep >= 1" run_test --print-requires-private requires-test # --list-all, limit to a subdirectory -RESULT="sub1 Subdirectory package 1 - Test package 1 for subdirectory -sub2 Subdirectory package 2 - Test package 2 for subdirectory" +RESULT="sub1 Subdirectory package 1 - Test package 1 for subdirectory +sub2 Subdirectory package 2 - Test package 2 for subdirectory +broken Broken package - Module with broken .pc file" PKG_CONFIG_LIBDIR="$srcdir/sub" run_test --list-all # Check handling when multiple incompatible options are set diff --git a/check/sub/broken.pc b/check/sub/broken.pc new file mode 100644 index 0000000..684d027 --- /dev/null +++ b/check/sub/broken.pc @@ -0,0 +1,4 @@ +Name: Broken package +Description: Module with broken .pc file +Version: 1.0 +Name: 2nd name -- cgit v1.2.1