commit: be23ddefad2d4843dc5fd9db5cd0d2f840ce0fc0
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 23 15:27:06 2018 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri Mar 23 15:27:06 2018 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=be23ddef
version_barf: show EPREFIX configured with, if present
main.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/main.c b/main.c
index 44226db..ec903fe 100644
--- a/main.c
+++ b/main.c
@@ -189,15 +189,21 @@ usage(int status, const char *flags, struct option const
opts[],
static void
version_barf(void)
{
+ const char *eprefixid = "";
+
#ifndef VERSION
# define VERSION "git"
#endif
#ifndef VCSID
# define VCSID "<unknown>"
#endif
+
+ if (strlen(CONFIG_EPREFIX) > 1)
+ eprefixid = "configured for " CONFIG_EPREFIX "\n";
printf("portage-utils-%s: %s\n"
+ "%s"
"%s written for Gentoo by <solar and vapier @ gentoo.org>\n",
- VERSION, VCSID, argv0);
+ VERSION, VCSID, eprefixid, argv0);
exit(EXIT_SUCCESS);
}