Skip to contentSkip to conversation

wic: add --extra-space back for compatibility

PATCH Superseded Ross Burton 3 participants 5 messages Sep 10, 2025

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wic: add --extra-space back for compatibility

The --extra-space argument was renamed to --extra-filesystem-space to be clear what space is being added to, but this breaks existing wic files.

Add back --extra-space as an alias for --extra-file-system-space so that existing wks files don't fail.

[1] oe-core 39d10137b86 ("wic: rename wks flag --extra-space to --extra-filesystem-space")

---
 scripts/lib/wic/ksparser.py | 2 ++
 1 file changed, 2 insertions(+)
scripts/lib/wic/ksparser.py +2 -0
index 705f9897508..8ca5f77ff53 100644
@@ -155,6 +155,8 @@ class KickStart():
         part.add_argument('--change-directory')
         part.add_argument('--extra-filesystem-space', type=sizetype("M"))
         part.add_argument('--extra-partition-space', type=sizetype("M"))
+        # Deprecated, just for compatibility
+        part.add_argument("--extra-space", dest='extra_filesystem_space', type=sizetype("M"))
         part.add_argument('--fsoptions', dest='fsopts')
         part.add_argument('--fspassno', dest='fspassno')
         part.add_argument('--fstype', default='vfat',
Signature · 1 line
2.43.0
#1 lore raw

Why not fix the files? When can this be removed?

Alex

Quoted 44 lines · Ross Burton via lists.openembedded.org

The --extra-space argument was renamed to --extra-filesystem-space to be clear what space is being added to, but this breaks existing wic files.

Add back --extra-space as an alias for --extra-file-system-space so that existing wks files don't fail.

[1] oe-core 39d10137b86 ("wic: rename wks flag --extra-space to --extra-filesystem-space")

---
 scripts/lib/wic/ksparser.py | 2 ++
 1 file changed, 2 insertions(+)
scripts/lib/wic/ksparser.py +2 -0
index 705f9897508..8ca5f77ff53 100644
@@ -155,6 +155,8 @@ class KickStart():
         part.add_argument('--change-directory')
         part.add_argument('--extra-filesystem-space', type=sizetype("M"))
         part.add_argument('--extra-partition-space', type=sizetype("M"))
+        # Deprecated, just for compatibility
+        part.add_argument("--extra-space", dest='extra_filesystem_space',
 type=sizetype("M"))
         part.add_argument('--fsoptions', dest='fsopts')
         part.add_argument('--fspassno', dest='fspassno')
         part.add_argument('--fstype', default='vfat',

--
2.43.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#223217):
https://lists.openembedded.org/g/openembedded-core/message/223217
Mute This Topic: https://lists.openembedded.org/mt/115169720/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw
Quoted 2 lines · Alexander Kanavin

Why not fix the files? When can this be removed?

Because as much as I enjoy breaking changes, this one is trivial to mitigate.

We _could_ remove it at any point but the overhead isn’t exactly massive, it’s just an alias for the argument.

Ross

#3 lore raw
In reply to Ross Burton

Hi Ross,

Quoted 19 lines · Ross Burton via lists.openembedded.org

The --extra-space argument was renamed to --extra-filesystem-space to be clear what space is being added to, but this breaks existing wic files.

Add back --extra-space as an alias for --extra-file-system-space so that existing wks files don't fail.

[1] oe-core 39d10137b86 ("wic: rename wks flag --extra-space to --extra-filesystem-space")

---
  scripts/lib/wic/ksparser.py | 2 ++
  1 file changed, 2 insertions(+)
scripts/lib/wic/ksparser.py +0 -0
index 705f9897508..8ca5f77ff53 100644

scripts/lib/wic/ksparser.py class KickStart(): · line 159

Quoted 5 lines
scripts/lib/wic/ksparser.py +2 -0
@@ -155,6 +155,8 @@ class KickStart():
          part.add_argument('--change-directory')
          part.add_argument('--extra-filesystem-space', type=sizetype("M"))
          part.add_argument('--extra-partition-space', type=sizetype("M"))
+        # Deprecated, just for compatibility
+        part.add_argument("--extra-space", dest='extra_filesystem_space', type=sizetype("M"))

I believe you can simply add the string to the existing argument, c.f.

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

import argparse
parser = argparse.ArgumentParser(exit_on_error=False) p = parser.add_argument("--test", "--other-test") parser.parse_args(["--test", "plep"])

Namespace(test='plep')

Quoted 1 line
Quoted 1 line
Quoted 1 line

parser.parse_args(["--other-test", "plep"])

Namespace(test='plep')

Cheers,
Quentin

#4 lore raw
Quoted 9 lines · Quentin Schulz

I believe you can simply add the string to the existing argument, c.f.

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

import argparse
parser = argparse.ArgumentParser(exit_on_error=False) p = parser.add_argument("--test", "--other-test") parser.parse_args(["--test", "plep"])

Namespace(test='plep')

Quoted 1 line
Quoted 1 line
Quoted 1 line

parser.parse_args(["--other-test", "plep"])

Namespace(test='plep’)

🤦‍♂️

Yes, of course. For some reason I always think that the arguments are “short form, long form” but obviously that’s not the case.

Ross