From 6c2b392584ef51cad164248a403162784ff10711 Mon Sep 17 00:00:00 2001 From: Ozan Unsal Date: Dec 07 2021 11:31:49 +0000 Subject: Improve odcs create-module user experience - If there is more than one module included, and there are no restrictions on base module stream, warn user that unless they add some --base-module-X or --modular-tag option, there's no guarantee the result will be meaningful Jira: RHELCMP-7365 Signed-off-by: Ozan Unsal --- diff --git a/client/contrib/odcs b/client/contrib/odcs index 48c9714..ce261d0 100755 --- a/client/contrib/odcs +++ b/client/contrib/odcs @@ -448,6 +448,19 @@ try: elif args.command == "create-module": if not args.modules and not args.scratch_module: create_module_parser.error("Please give a module or --scratch-module") + if ( + len(args.modules) + len(args.scratch_module) > 1 + and not ( + args.base_module_br_stream + or args.base_module_br_stream_version_lte + or args.base_module_br_stream_version_gte + or args.modular_tag + ) + and args.infra == "redhat" + ): + print( + "WARNING: Please add --base-module-X or --modular-tag option to the arguments to ensure all composed modules are built for the same release." + ) source = odcs.client.odcs.ComposeSourceModule( args.modules, args.sigkey,