[elbe-devel] [PATCH 1/8] elbepack: commands: drop internal hdimg command
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Mon Jul 8 11:23:54 CEST 2024
The hdimg command is a remnant from the time before the SOAP service
managing all buildenv interaction.
Nowadays it is only a maintenance burden, remove it.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
debian/python3-elbe-buildenv.install | 1 -
docs/elbe-hdimg.rst | 63 -------------------------------
docs/elbe.rst | 3 --
elbepack/commands/hdimg.py | 73 ------------------------------------
newsfragments/+hdimg.removal.rst | 1 +
5 files changed, 1 insertion(+), 140 deletions(-)
diff --git a/debian/python3-elbe-buildenv.install b/debian/python3-elbe-buildenv.install
index 689ab07be2c9..0fa636f09a08 100644
--- a/debian/python3-elbe-buildenv.install
+++ b/debian/python3-elbe-buildenv.install
@@ -7,7 +7,6 @@ usr/lib/python3.*/*-packages/elbepack/commands/db.py
usr/lib/python3.*/*-packages/elbepack/commands/fetch_initvm_pkgs.py
usr/lib/python3.*/*-packages/elbepack/commands/genlicence.py
usr/lib/python3.*/*-packages/elbepack/commands/gen_update.py
-usr/lib/python3.*/*-packages/elbepack/commands/hdimg.py
usr/lib/python3.*/*-packages/elbepack/commands/mkcdrom.py
usr/lib/python3.*/*-packages/elbepack/commands/toolchainextract.py
usr/lib/python3.*/*-packages/elbepack/makofiles/environment-setup-elbe.mako
diff --git a/docs/elbe-hdimg.rst b/docs/elbe-hdimg.rst
deleted file mode 100644
index 945a44f7d3a3..000000000000
--- a/docs/elbe-hdimg.rst
+++ /dev/null
@@ -1,63 +0,0 @@
-************************
-elbe-hdimg
-************************
-
-NAME
-====
-
-elbe-hdimg - Create hard disk and flash images from the given XML file.
-
-SYNOPSIS
-========
-
- ::
-
- elbe hdimg --target <dir> --output <out> \
- [ --buildtype <type> ] \
- [ --skip-validation ] \
- [ --skip-grub ] \
- <xmlfile>
-
-DESCRIPTION
-===========
-
-*elbe hdimg* creates hard disk and flash images from the *images*
-section in the given XML file. The command has to be run as root
-**inside the Elbe build VM**.
-
-OPTIONS
-=======
-
---target <dir>
- Operate on the given project directory.
-
---output <out>
- Name of the log file.
-
---buildtype <type>
- Override the build type specified in the XML file.
-
---skip-validation
- Do not validate the XML file against the Elbe XML schema (Not
- recommended).
-
---skip-grub
- Skip GRUB installation.
-
-<xmlfile>
- The XML file to use.
-
-EXAMPLES
-========
-
-- Build images for the project in */root/myproject*
-
- ::
-
- elbe hdimg --target /root/myproject --output /root/hdimg.log \
- /root/myproject/source.xml
-
-ELBE
-====
-
-Part of the ``elbe(1)`` suite
diff --git a/docs/elbe.rst b/docs/elbe.rst
index 6639e8b812e7..236919dac426 100644
--- a/docs/elbe.rst
+++ b/docs/elbe.rst
@@ -60,9 +60,6 @@ Elbe COMMANDS
``elbe-get_archive(1)``
extract a config archive (.tbz) from a XML file.
-``elbe-hdimg(1)``
- create a hard disk image from the given XML file.
-
``elbe-init(1)``
create a project for an Elbe build virtual machine.
diff --git a/elbepack/commands/hdimg.py b/elbepack/commands/hdimg.py
deleted file mode 100644
index d54b744321e1..000000000000
--- a/elbepack/commands/hdimg.py
+++ /dev/null
@@ -1,73 +0,0 @@
-# ELBE - Debian Based Embedded Rootfilesystem Builder
-# SPDX-License-Identifier: GPL-3.0-or-later
-# SPDX-FileCopyrightText: 2012-2017 Linutronix GmbH
-
-import logging
-import sys
-from optparse import OptionParser
-
-from elbepack.elbeproject import ElbeProject
-from elbepack.elbexml import ValidationError
-from elbepack.log import elbe_logging
-
-
-def run_command(argv):
-
- oparser = OptionParser(
- usage='usage: %prog hdimg --target <dir> --output <out> <xmlfile>')
- oparser.add_option('--target', dest='target',
- help='target directory',
- metavar='FILE')
- oparser.add_option('-o', '--output', dest='output',
- help='name of logfile')
- oparser.add_option('--buildtype', dest='buildtype',
- help='Override the buildtype')
- oparser.add_option('--skip-validation', action='store_true',
- dest='skip_validation', default=False,
- help='Skip xml schema validation')
- oparser.add_option('--skip-grub', action='store_true',
- dest='skip_grub', default=False,
- help='Skip grub install')
- oparser.add_option(
- '--grub-version',
- type='int',
- dest='grub_version',
- default=202,
- help='use specific grub version (possible values are 0, 97, and 202)')
-
- (opt, args) = oparser.parse_args(argv)
-
- if len(args) != 1:
- print('Wrong number of arguments')
- oparser.print_help()
- sys.exit(65)
-
- if not opt.target:
- print('No directory specified!')
- oparser.print_help()
- sys.exit(66)
-
- if not opt.output:
- print('No Log output')
- oparser.print_help()
- sys.exit(67)
-
- if opt.skip_grub:
- opt.grub_version = 0
-
- if opt.grub_version not in [0, 97, 202]:
- print('invalid grub version')
- oparser.print_help()
- sys.exit(68)
-
- with elbe_logging({'files': opt.output}):
- try:
- project = ElbeProject(opt.target,
- override_buildtype=opt.buildtype,
- xmlpath=args[0],
- skip_validate=opt.skip_validation)
- except ValidationError:
- logging.exception('XML validation failed. Bailing out')
- sys.exit(69)
-
- project.targetfs.part_target(opt.target, opt.grub_version)
diff --git a/newsfragments/+hdimg.removal.rst b/newsfragments/+hdimg.removal.rst
new file mode 100644
index 000000000000..66c55c53399b
--- /dev/null
+++ b/newsfragments/+hdimg.removal.rst
@@ -0,0 +1 @@
+The *internal* command `elbe hdimg`.
--
2.45.2
More information about the elbe-devel
mailing list