File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -163,19 +163,18 @@ def build_drgn_in_rootfs(rootfs: Path) -> None:
163163 help = "make the rootfs a Btrfs subvolume and create a read-only snapshot" ,
164164 )
165165 parser .add_argument (
166- "architectures" ,
167- choices = ["foreign" , "all" , * sorted (ARCHITECTURES )],
168- nargs = "*" ,
169- # It would make more sense for this to be ["foreign"], but argparse
170- # checks that the default itself is in choices, not each item. We fix
171- # it up to a list below.
172- default = "foreign" ,
173- help = 'architecture to build for, or "foreign" for all architectures other than the host architecture; may be given multiple times' ,
166+ "-a" ,
167+ "--architecture" ,
168+ dest = "architectures" ,
169+ action = "append" ,
170+ choices = ["all" , "foreign" , * sorted (ARCHITECTURES )],
171+ default = argparse .SUPPRESS ,
172+ help = 'architecture to build for, or "foreign" for all architectures other than the host architecture; may be given multiple times (default: foreign)' ,
174173 )
175174 args = parser .parse_args ()
176175
177- if isinstance (args . architectures , str ):
178- args .architectures = [args . architectures ]
176+ if not hasattr (args , "architectures" ):
177+ args .architectures = ["foreign" ]
179178 architectures = []
180179 for name in args .architectures :
181180 if name == "foreign" :
You can’t perform that action at this time.
0 commit comments