image, part = image.split(':')
if '/' in part:
part, path = part.split('/', 1)
+ if not path:
+ path = '/'
if not os.path.isfile(image):
err = "%s is not a regular file or symlink" % image
subparser.add_argument("-n", "--native-sysroot",
help="path to the native sysroot containing the tools")
+def imgpathtype(arg):
+ img = imgtype(arg)
+ if img.part is None:
+ raise argparse.ArgumentTypeError("partition number is not specified")
+ return img
+
+def wic_init_parser_cp(subparser):
+ subparser.add_argument("src",
+ help="source spec")
+ subparser.add_argument("dest", type=imgpathtype,
+ help="image spec: <image>:<vfat partition>[<path>]")
+ subparser.add_argument("-n", "--native-sysroot",
+ help="path to the native sysroot containing the tools")
+
def wic_init_parser_help(subparser):
helpparsers = subparser.add_subparsers(dest='help_topic', help=hlp.wic_usage)
for helptopic in helptopics: