diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/wic/plugins/imager/direct_plugin.py | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/scripts/lib/wic/plugins/imager/direct_plugin.py b/scripts/lib/wic/plugins/imager/direct_plugin.py index 91a9792814..c6df5fbb7d 100644 --- a/scripts/lib/wic/plugins/imager/direct_plugin.py +++ b/scripts/lib/wic/plugins/imager/direct_plugin.py | |||
@@ -53,21 +53,8 @@ class DirectPlugin(ImagerPlugin): | |||
53 | 53 | ||
54 | name = 'direct' | 54 | name = 'direct' |
55 | 55 | ||
56 | @classmethod | 56 | @staticmethod |
57 | def __rootfs_dir_to_dict(cls, rootfs_dirs): | 57 | def do_create(opts, *args): |
58 | """ | ||
59 | Gets a string that contain 'connection=dir' splitted by | ||
60 | space and return a dict | ||
61 | """ | ||
62 | krootfs_dir = {} | ||
63 | for rootfs_dir in rootfs_dirs.split(' '): | ||
64 | key, val = rootfs_dir.split('=') | ||
65 | krootfs_dir[key] = val | ||
66 | |||
67 | return krootfs_dir | ||
68 | |||
69 | @classmethod | ||
70 | def do_create(cls, opts, *args): | ||
71 | """ | 58 | """ |
72 | Create direct image, called from creator as 'direct' cmd | 59 | Create direct image, called from creator as 'direct' cmd |
73 | """ | 60 | """ |
@@ -92,7 +79,9 @@ class DirectPlugin(ImagerPlugin): | |||
92 | 79 | ||
93 | image_name = "%s-%s" % (splitext(basename(ksconf))[0], | 80 | image_name = "%s-%s" % (splitext(basename(ksconf))[0], |
94 | strftime("%Y%m%d%H%M")) | 81 | strftime("%Y%m%d%H%M")) |
95 | krootfs_dir = cls.__rootfs_dir_to_dict(rootfs_dir) | 82 | |
83 | # parse possible 'rootfs=name' items | ||
84 | krootfs_dir = dict(rdir.split('=') for rdir in rootfs_dir.split(' ')) | ||
96 | 85 | ||
97 | creator = DirectImageCreator(image_name, ksobj, oe_builddir, | 86 | creator = DirectImageCreator(image_name, ksobj, oe_builddir, |
98 | image_output_dir, krootfs_dir, | 87 | image_output_dir, krootfs_dir, |