[elbe-devel] [PATCH 2/8] elbepack: db: remove print_version_xml()

Thomas Weißschuh thomas.weissschuh at linutronix.de
Wed Aug 14 11:26:28 CEST 2024


This function is not reachable by the user, only internal commands.
Drop it and the corresponding internal command.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 docs/elbe-db.rst        |  4 ----
 elbepack/commands/db.py | 12 ------------
 2 files changed, 16 deletions(-)

diff --git a/docs/elbe-db.rst b/docs/elbe-db.rst
index 4a44f10cf8d3..f5437d250ecd 100644
--- a/docs/elbe-db.rst
+++ b/docs/elbe-db.rst
@@ -20,7 +20,6 @@ SYNOPSIS
       elbe db [options] save_version <project_dir>
       elbe db [options] set_xml <project_dir> <xml_file>
       elbe db [options] del_project <project_dir>
-      elbe db [options] print_version_xml <project_dir> <version>
       elbe db [options] init
       elbe db [options] del_user <userid>
       elbe db [options] add_user <username>
@@ -126,9 +125,6 @@ COMMANDS
 *del_versions* <project_dir> <version>
    Deletes the version <version> of project <project_dir>.
 
-*print_version_xml* <project_dir> <version>
-   Prints ELBE xml file in <project_dir> of version <version>.
-
 ELBE
 ====
 
diff --git a/elbepack/commands/db.py b/elbepack/commands/db.py
index 1b9d1bb4aaf5..10d9e57716ff 100644
--- a/elbepack/commands/db.py
+++ b/elbepack/commands/db.py
@@ -3,9 +3,7 @@
 # SPDX-FileCopyrightText: 2014, 2017 Linutronix GmbH
 
 import argparse
-import sys
 from getpass import getpass
-from shutil import copyfileobj
 
 from elbepack.cli import add_argument, add_arguments_from_decorated_function
 from elbepack.db import ElbeDB, ElbeDBError
@@ -162,15 +160,6 @@ def _del_version(args):
     db.del_version(args.project_dir, args.version)
 
 
- at add_argument('project_dir')
- at add_argument('version')
-def _print_version_xml(args):
-    db = ElbeDB()
-    filename = db.get_version_xml(args.project_dir, args.version)
-    with open(filename) as f:
-        copyfileobj(f, sys.stdout)
-
-
 _actions = {
     'init':                _init,
     'add_user':            _add_user,
@@ -186,7 +175,6 @@ _actions = {
     'list_versions':       _list_versions,
     'save_version':        _save_version,
     'del_versions':        _del_version,
-    'print_version_xml':   _print_version_xml,
 }
 
 

-- 
2.46.0



More information about the elbe-devel mailing list