@@ -176,8 +176,8 @@ def doParseArgs():
176176 build_system = build_parser .add_mutually_exclusive_group ()
177177 build_system .add_argument ("--always-prefer-system" , dest = "preferSystem" , action = "store_true" ,
178178 help = "Always use system packages when compatible." )
179- build_system .add_argument ("--no-system" , dest = "noSystem" , action = "store_true " ,
180- help = "Never use system packages, even if compatible." )
179+ build_system .add_argument ("--no-system" , dest = "noSystem" , nargs = "?" , const = "*" , default = None , metavar = "PACKAGES " ,
180+ help = "Never use system packages for the provided, command separated, PACKAGES , even if compatible." )
181181
182182 # Options for clean subcommand
183183 clean_parser .add_argument ("-a" , "--architecture" , dest = "architecture" , metavar = "ARCH" , default = detectedArch ,
@@ -237,8 +237,8 @@ def doParseArgs():
237237 deps_system = deps_parser .add_mutually_exclusive_group ()
238238 deps_system .add_argument ("--always-prefer-system" , dest = "preferSystem" , action = "store_true" ,
239239 help = "Always use system packages when compatible." )
240- deps_system .add_argument ("--no-system" , dest = "noSystem" , action = "store_true " ,
241- help = "Never use system packages, even if compatible." )
240+ deps_system .add_argument ("--no-system" , dest = "noSystem" , nargs = "?" , const = "*" , default = None , metavar = "PACKAGES " ,
241+ help = "Never use system packages for PACKAGES , even if compatible." )
242242
243243 # Options for the doctor subcommand
244244 doctor_parser .add_argument ("packages" , metavar = "PACKAGE" , nargs = "+" ,
@@ -258,8 +258,8 @@ def doParseArgs():
258258 doctor_system = doctor_parser .add_mutually_exclusive_group ()
259259 doctor_system .add_argument ("--always-prefer-system" , dest = "preferSystem" , action = "store_true" ,
260260 help = "Always use system packages when compatible." )
261- doctor_system .add_argument ("--no-system" , dest = "noSystem" , action = "store_true " ,
262- help = "Never use system packages, even if compatible." )
261+ doctor_system .add_argument ("--no-system" , dest = "noSystem" , nargs = "?" , const = "*" , default = None , metavar = "PACKAGES " ,
262+ help = "Never use system packages for the provided, command separated, PACKAGES , even if compatible." )
263263
264264 doctor_docker = doctor_parser .add_argument_group (title = "Use a Docker container" , description = """\
265265 If you're planning to build inside a Docker container, e.g. using aliBuild
@@ -457,14 +457,14 @@ def finaliseArgs(args, parser):
457457
458458 # On selected platforms, caching is active by default
459459 if args .architecture in S3_SUPPORTED_ARCHS and not args .preferSystem and not args .no_remote_store :
460- args .noSystem = True
460+ args .noSystem = "*"
461461 if not args .remoteStore :
462462 args .remoteStore = "https://s3.cern.ch/swift/v1/alibuild-repo"
463463 elif args .no_remote_store :
464464 args .remoteStore = ""
465465
466466 if args .remoteStore or args .writeStore :
467- args .noSystem = True
467+ args .noSystem = "*"
468468
469469 if args .remoteStore .endswith ("::rw" ) and args .writeStore :
470470 parser .error ("cannot specify ::rw and --write-store at the same time" )
0 commit comments