0001-cli-remove-version-to-modversion-remapping.patch 996 B

123456789101112131415161718192021222324252627282930313233343536
  1. From 62bbd3b664d4b03011a4b382ed20353a91c30406 Mon Sep 17 00:00:00 2001
  2. From: Ariadne Conill <[email protected]>
  3. Date: Tue, 21 Jan 2020 10:32:36 -0600
  4. Subject: [PATCH] cli: remove --version to --modversion remapping
  5. This has been a source of frequent complaints, so we drop it.
  6. Resolves: https://todo.sr.ht/~kaniini/pkgconf/6
  7. ---
  8. cli/main.c | 14 ++------------
  9. 1 file changed, 2 insertions(+), 12 deletions(-)
  10. diff --git a/cli/main.c b/cli/main.c
  11. index 563ec8f0cfcd..fc698a4f9191 100644
  12. --- a/cli/main.c
  13. +++ b/cli/main.c
  14. @@ -1005,18 +1005,8 @@ main(int argc, char *argv[])
  15. if ((want_flags & PKG_VERSION) == PKG_VERSION)
  16. {
  17. - if (argc > 2)
  18. - {
  19. - fprintf(stderr, "%s: --version specified with other options or module names, assuming --modversion.\n", argv[0]);
  20. -
  21. - want_flags &= ~PKG_VERSION;
  22. - want_flags |= PKG_MODVERSION;
  23. - }
  24. - else
  25. - {
  26. - version();
  27. - return EXIT_SUCCESS;
  28. - }
  29. + version();
  30. + return EXIT_SUCCESS;
  31. }
  32. if ((want_flags & PKG_HELP) == PKG_HELP)