[PATCH 1/9] patman: Replace the tool with a stub for patch-manager

Simon Glass sjg at chromium.org
Tue Jun 16 16:28:41 CEST 2026


patman is now maintained as a standalone 'patch-manager' package, rather
than in the U-Boot tree. Replace the command with a small stub which
tells people how to install it.

buildman still uses the shared modules commit and patchstream (and their
dependencies), so leave those in place; the patches that follow remove
the patch-management code itself.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 tools/patman/__main__.py | 68 +++++++++++++---------------------------
 1 file changed, 21 insertions(+), 47 deletions(-)

diff --git a/tools/patman/__main__.py b/tools/patman/__main__.py
index edfb1b5927c..a497f6ced7e 100755
--- a/tools/patman/__main__.py
+++ b/tools/patman/__main__.py
@@ -4,56 +4,30 @@
 # Copyright (c) 2011 The Chromium OS Authors.
 #
 
-"""See README for more information"""
+"""Stub for the former in-tree patman tool
 
-import os
-import sys
-
-# Allow 'from patman import xxx to work'
-# pylint: disable=C0413
-our_path = os.path.dirname(os.path.realpath(__file__))
-sys.path.append(os.path.join(our_path, '..'))
-
-# Our modules
-from u_boot_pylib import test_util
-from u_boot_pylib import tout
-from patman import cmdline
-from patman import control
-
-
-def run_patman():
-    """Run patamn
+patman is now maintained as a standalone 'patch-manager' package, rather
+than living in the U-Boot tree. This stub just tells the user how to get
+it.
+"""
 
-    This is the main program. It collects arguments and runs either the tests or
-    the control module.
-    """
-    args = cmdline.parse_args()
-
-    if not args.debug:
-        sys.tracebacklimit = 0
-
-    tout.init(tout.INFO if args.verbose else tout.WARNING)
-
-    # Run our reasonably good tests
-    if args.cmd == 'test':
-        # pylint: disable=C0415
-        from patman import func_test
-        from patman import test_checkpatch
-        from patman import test_cseries
+import sys
 
-        to_run = args.testname if args.testname not in [None, 'test'] else None
-        result = test_util.run_test_suites(
-            'patman', False, args.verbose, args.no_capture,
-            args.test_preserve_dirs, None, to_run, None,
-            [test_checkpatch.TestPatch, func_test.TestFunctional, 'settings',
-             test_cseries.TestCseries])
-        sys.exit(0 if result.wasSuccessful() else 1)
 
-    # Process commits, produce patches files, check them, email them
-    else:
-        exit_code = control.do_patman(args)
-        sys.exit(exit_code)
+def main():
+    """Print instructions for installing the patch-manager package"""
+    print(
+        'patman is no longer part of U-Boot. It is now maintained as a\n'
+        "separate package called 'patch-manager'.\n"
+        '\n'
+        'Install it with:\n'
+        '\n'
+        '    pip install patch-manager\n'
+        '\n'
+        'Documentation: https://deinde.dev/patman\n',
+        file=sys.stderr)
+    return 1
 
 
-if __name__ == "__main__":
-    sys.exit(run_patman())
+if __name__ == '__main__':
+    sys.exit(main())
-- 
2.43.0



More information about the U-Boot mailing list