1From 4ccef40918a539905a2951bfb81cf8dba4a245c6 Mon Sep 17 00:00:00 2001 2From: Thomas Petazzoni <thomas.petazzoni@bootlin.com> 3Date: Wed, 2 Jan 2019 18:15:50 +0100 4Subject: [PATCH] Revert "main: assume --modversion insted of --version if 5 other flags or module names are provided" 6 7This reverts commit 12a0eb124cea85586e57f33c91a1e4c73459eef6, as it 8causes pkg-config to assume --modversion is used when something as 9simple as 'pkg-config --static --version' is used, leading to a 10failure instead of the expected behavior: the one of "pkg-config 11--version". 12 13Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> 14--- 15 cli/main.c | 14 ++------------ 16 1 file changed, 2 insertions(+), 12 deletions(-) 17 18diff --git a/cli/main.c b/cli/main.c 19index b52cc85..c5acc10 100644 20--- a/cli/main.c 21+++ b/cli/main.c 22@@ -1002,18 +1002,8 @@ main(int argc, char *argv[]) 23 24 if ((want_flags & PKG_VERSION) == PKG_VERSION) 25 { 26- if (argc > 2) 27- { 28- fprintf(stderr, "%s: --version specified with other options or module names, assuming --modversion.\n", argv[0]); 29- 30- want_flags &= ~PKG_VERSION; 31- want_flags |= PKG_MODVERSION; 32- } 33- else 34- { 35- version(); 36- return EXIT_SUCCESS; 37- } 38+ version(); 39+ return EXIT_SUCCESS; 40 } 41 42 if ((want_flags & PKG_HELP) == PKG_HELP) 43-- 442.20.1 45 46