summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2026-07-05 13:32:15 -0600
committerTom Rini <trini@konsulko.com>2026-07-06 08:28:51 -0600
commitf2cf4315339271d48b40628c04c25be24c231a4f (patch)
treec32bcbc68765624bb7196276abe00c28c384e30c
parenta24a86b547700359e46b4ae87731985661fe3334 (diff)
downloadu-boot-f2cf4315339271d48b40628c04c25be24c231a4f.tar.gz
u-boot-f2cf4315339271d48b40628c04c25be24c231a4f.zip
patman: Replace the tool with a stub for patch-manager
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@chromium.org>
-rwxr-xr-xtools/patman/__main__.py68
1 files 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())