diff --git a/.github/workflows/example-livemedia-creator.yml b/.github/workflows/example-livemedia-creator.yml index bfdf612b2..53af027c5 100644 --- a/.github/workflows/example-livemedia-creator.yml +++ b/.github/workflows/example-livemedia-creator.yml @@ -44,14 +44,12 @@ jobs: ## Create the ISO - name: Create the custom ISO # --no-virt: Needed since we're in a container, no host CPU - # --squashfs-only: Just to speed things up, not required run: | livemedia-creator \ --ks "${{ inputs.kickstart_path }}" \ --no-virt \ --make-iso \ --iso-only \ - --squashfs-only \ --iso-name Fedora-custom-example.iso \ --project Fedora \ --volid "Fedora-${{ inputs.fedora_release }}" \ diff --git a/src/pylorax/cmdline.py b/src/pylorax/cmdline.py index 343e9f273..866406894 100644 --- a/src/pylorax/cmdline.py +++ b/src/pylorax/cmdline.py @@ -26,6 +26,19 @@ version = "{0}-{1}".format(os.path.basename(sys.argv[0]), vernum) +class NullAction(argparse.Action): + """ + An argparse Action which does nothing. Used to accept but + ignore the old --squashfs-only argument. + """ + def __init__(self, *args, **kwargs): + """Minimal required to let the arg have no value.""" + super().__init__(*args, **kwargs, nargs=0, default=None, required=False) + def __call__(self, *args, **kwargs): + """Do nothing.""" + pass + + def lorax_parser(dracut_default=""): """ Return the ArgumentParser for lorax""" @@ -109,9 +122,8 @@ def lorax_parser(dracut_default=""): help="Do not verify SSL certificates") optional.add_argument("--dnfplugin", action="append", default=[], dest="dnfplugins", help="Enable a DNF plugin by name/glob, or * to enable all of them.") - optional.add_argument("--squashfs-only", action="store_const", const="squashfs", - default="squashfs", dest="rootfs_type", - help="Use a plain squashfs filesystem for the runtime.") + optional.add_argument("--squashfs-only", action=NullAction, + help="Ignored, provided for backward compatibility.") optional.add_argument("--skip-branding", action="store_true", default=False, help="Disable automatic branding package selection. Use --installpkgs to add custom branding.") optional.add_argument("--rootfs-type", metavar="ROOTFSTYPE", default="squashfs", @@ -328,8 +340,8 @@ def lmc_parser(dracut_default=""): parser.add_argument("--releasever", default=DEFAULT_RELEASEVER, help="substituted for @VERSION@ in bootloader config files") parser.add_argument("--volid", default=None, help="volume id") - parser.add_argument("--squashfs-only", action="store_const", const="squashfs", - dest="rootfs_type", + parser.add_argument("--squashfs-only", action=NullAction, + help="Ignored, provided for backward compatibility.") help="Use a plain squashfs filesystem for the runtime.") parser.add_argument("--rootfs-type", metavar="ROOTFSTYPE", default="squashfs", help="Type of rootfs: %s" % ",".join(ROOTFSTYPES))