From 90e7c7dc234596273111504639a2d7258c3ed5da Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Thu, 24 Oct 2024 15:11:08 +0200 Subject: [PATCH] build.py: Require --etc-portage on non-Gentoo hosts --- binary_gentoo/internal/cli/build.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/binary_gentoo/internal/cli/build.py b/binary_gentoo/internal/cli/build.py index 4c8b598..e21f162 100644 --- a/binary_gentoo/internal/cli/build.py +++ b/binary_gentoo/internal/cli/build.py @@ -164,8 +164,13 @@ def parse_command_line(argv): "--etc-portage", dest="host_etc_portage", metavar="DIR", + required=not HOST_IS_GENTOO, default="/etc/portage", - help='enforce specific location for /etc/portage (default: "%(default)s")', + help=( + 'enforce specific location for /etc/portage (default: "%(default)s")' + if HOST_IS_GENTOO + else "specify /etc/portage location (required)" + ), ) parser_group_flavors_or_image = parser.add_mutually_exclusive_group()