summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/ksparser.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/wic/ksparser.py')
-rw-r--r--scripts/lib/wic/ksparser.py25
1 files changed, 13 insertions, 12 deletions
diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py
index a1aaf1b4b3..705f989750 100644
--- a/scripts/lib/wic/ksparser.py
+++ b/scripts/lib/wic/ksparser.py
@@ -132,7 +132,7 @@ def systemidtype(arg):
132class KickStart(): 132class KickStart():
133 """Kickstart parser implementation.""" 133 """Kickstart parser implementation."""
134 134
135 DEFAULT_EXTRA_SPACE = 10*1024 135 DEFAULT_EXTRA_FILESYSTEM_SPACE = 10*1024
136 DEFAULT_OVERHEAD_FACTOR = 1.3 136 DEFAULT_OVERHEAD_FACTOR = 1.3
137 137
138 def __init__(self, confpath): 138 def __init__(self, confpath):
@@ -153,7 +153,7 @@ class KickStart():
153 part.add_argument('--exclude-path', nargs='+') 153 part.add_argument('--exclude-path', nargs='+')
154 part.add_argument('--include-path', nargs='+', action='append') 154 part.add_argument('--include-path', nargs='+', action='append')
155 part.add_argument('--change-directory') 155 part.add_argument('--change-directory')
156 part.add_argument("--extra-space", type=sizetype("M")) 156 part.add_argument('--extra-filesystem-space', type=sizetype("M"))
157 part.add_argument('--extra-partition-space', type=sizetype("M")) 157 part.add_argument('--extra-partition-space', type=sizetype("M"))
158 part.add_argument('--fsoptions', dest='fsopts') 158 part.add_argument('--fsoptions', dest='fsopts')
159 part.add_argument('--fspassno', dest='fspassno') 159 part.add_argument('--fspassno', dest='fspassno')
@@ -175,9 +175,9 @@ class KickStart():
175 part.add_argument('--hidden', action='store_true') 175 part.add_argument('--hidden', action='store_true')
176 176
177 # --size and --fixed-size cannot be specified together; options 177 # --size and --fixed-size cannot be specified together; options
178 # ----extra-space and --overhead-factor should also raise a parser 178 # ----extra-filesystem-space and --overhead-factor should also raise a
179 # --error, but since nesting mutually exclusive groups does not work, 179 # parser error, but since nesting mutually exclusive groups does not work,
180 # ----extra-space/--overhead-factor are handled later 180 # ----extra-filesystem-space/--overhead-factor are handled later
181 sizeexcl = part.add_mutually_exclusive_group() 181 sizeexcl = part.add_mutually_exclusive_group()
182 sizeexcl.add_argument('--size', type=sizetype("M"), default=0) 182 sizeexcl.add_argument('--size', type=sizetype("M"), default=0)
183 sizeexcl.add_argument('--fixed-size', type=sizetype("M"), default=0) 183 sizeexcl.add_argument('--fixed-size', type=sizetype("M"), default=0)
@@ -264,12 +264,13 @@ class KickStart():
264 parsed.extra_partition_space = 0 264 parsed.extra_partition_space = 0
265 # using ArgumentParser one cannot easily tell if option 265 # using ArgumentParser one cannot easily tell if option
266 # was passed as argument, if said option has a default 266 # was passed as argument, if said option has a default
267 # value; --overhead-factor/--extra-space cannot be used 267 # value; --overhead-factor/--extra-filesystem-space
268 # with --fixed-size, so at least detect when these were 268 # cannot be used with --fixed-size, so at least detect
269 # passed with non-0 values ... 269 # when these were passed with non-0 values ...
270 if parsed.fixed_size: 270 if parsed.fixed_size:
271 if parsed.overhead_factor or parsed.extra_space: 271 if parsed.overhead_factor or parsed.extra_filesystem_space:
272 err = "%s:%d: arguments --overhead-factor and --extra-space not "\ 272 err = "%s:%d: arguments --overhead-factor and "\
273 "--extra-filesystem-space not "\
273 "allowed with argument --fixed-size" \ 274 "allowed with argument --fixed-size" \
274 % (confpath, lineno) 275 % (confpath, lineno)
275 raise KickStartError(err) 276 raise KickStartError(err)
@@ -280,8 +281,8 @@ class KickStart():
280 # with value equal to 0) 281 # with value equal to 0)
281 if not parsed.overhead_factor: 282 if not parsed.overhead_factor:
282 parsed.overhead_factor = self.DEFAULT_OVERHEAD_FACTOR 283 parsed.overhead_factor = self.DEFAULT_OVERHEAD_FACTOR
283 if not parsed.extra_space: 284 if not parsed.extra_filesystem_space:
284 parsed.extra_space = self.DEFAULT_EXTRA_SPACE 285 parsed.extra_filesystem_space = self.DEFAULT_EXTRA_FILESYSTEM_SPACE
285 286
286 self.partnum += 1 287 self.partnum += 1
287 self.partitions.append(Partition(parsed, self.partnum)) 288 self.partitions.append(Partition(parsed, self.partnum))