Message ID | 20250910135508.2383081-1-ross.burton@arm.com |
---|---|
State | New |
Headers | show |
Series | wic: add --extra-space back for compatibility | expand |
Why not fix the files? When can this be removed? Alex On Wed 10. Sep 2025 at 15.55, Ross Burton via lists.openembedded.org <ross.burton=arm.com@lists.openembedded.org> wrote: > 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") > > Signed-off-by: Ross Burton <ross.burton@arm.com> > --- > scripts/lib/wic/ksparser.py | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py > index 705f9897508..8ca5f77ff53 100644 > --- a/scripts/lib/wic/ksparser.py > +++ b/scripts/lib/wic/ksparser.py > @@ -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: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ > alex.kanavin@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > >
On 10 Sep 2025, at 15:31, Alexander Kanavin <alex.kanavin@gmail.com> wrote: > > 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
Hi Ross, On 9/10/25 3:55 PM, Ross Burton via lists.openembedded.org wrote: > 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") > > Signed-off-by: Ross Burton <ross.burton@arm.com> > --- > scripts/lib/wic/ksparser.py | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py > index 705f9897508..8ca5f77ff53 100644 > --- a/scripts/lib/wic/ksparser.py > +++ b/scripts/lib/wic/ksparser.py > @@ -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. >>> import argparse >>> parser = argparse.ArgumentParser(exit_on_error=False) >>> p = parser.add_argument("--test", "--other-test") >>> parser.parse_args(["--test", "plep"]) Namespace(test='plep') >>> parser.parse_args(["--other-test", "plep"]) Namespace(test='plep') Cheers, Quentin
On 10 Sep 2025, at 15:38, Quentin Schulz <quentin.schulz@cherry.de> wrote: > I believe you can simply add the string to the existing argument, c.f. > > >>> import argparse > >>> parser = argparse.ArgumentParser(exit_on_error=False) > >>> p = parser.add_argument("--test", "--other-test") > >>> parser.parse_args(["--test", "plep"]) > Namespace(test='plep') > >>> parser.parse_args(["--other-test", "plep"]) > Namespace(test='plep’)
diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py index 705f9897508..8ca5f77ff53 100644 --- a/scripts/lib/wic/ksparser.py +++ b/scripts/lib/wic/ksparser.py @@ -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',
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") Signed-off-by: Ross Burton <ross.burton@arm.com> --- scripts/lib/wic/ksparser.py | 2 ++ 1 file changed, 2 insertions(+)