All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Cc: Simon Glass <sjg@chromium.org>, Tom Rini <trini@konsulko.com>
Subject: [PATCH v2 04/11] patman: Replace the tool with a stub for patch-manager
Date: Sun,  5 Jul 2026 13:32:15 -0600	[thread overview]
Message-ID: <20260705193251.2190705-5-sjg@chromium.org> (raw)
In-Reply-To: <20260705193251.2190705-1-sjg@chromium.org>

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>
---

(no changes since v1)

 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


  parent reply	other threads:[~2026-07-05 19:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-05 19:32 [PATCH v2 00/11] Remove patman from the U-Boot tree Simon Glass
2026-07-05 19:32 ` [PATCH v2 01/11] doc: Move the b4 guide into sending_patches Simon Glass
2026-07-05 20:26   ` Tom Rini
2026-07-06 11:59   ` Mattijs Korpershoek
2026-07-05 19:32 ` [PATCH v2 02/11] doc: Remove the patman documentation Simon Glass
2026-07-05 20:26   ` Tom Rini
2026-07-06 12:00   ` Mattijs Korpershoek
2026-07-05 19:32 ` [PATCH v2 03/11] patman: Add a .patman-defaults file for U-Boot Simon Glass
2026-07-05 20:26   ` Tom Rini
2026-07-05 19:32 ` Simon Glass [this message]
2026-07-05 19:32 ` [PATCH v2 05/11] patman: Remove the test suite Simon Glass
2026-07-05 19:32 ` [PATCH v2 06/11] patman: Remove the patch-management code Simon Glass
2026-07-05 19:32 ` [PATCH v2 07/11] CI: Install pylibfdt's requirements in the tool jobs Simon Glass
2026-07-05 20:26   ` Tom Rini
2026-07-05 19:32 ` [PATCH v2 08/11] CI: Stop building and testing patman Simon Glass
2026-07-05 20:27   ` Tom Rini
2026-07-05 19:32 ` [PATCH v2 09/11] tools: docker: Drop patman from the CI image Simon Glass
2026-07-05 19:32 ` [PATCH v2 10/11] tools: Stop packaging patman as a pip module Simon Glass
2026-07-05 19:32 ` [PATCH v2 11/11] test: Stop running the patman tests Simon Glass
2026-07-06 16:40 ` [PATCH v2 00/11] Remove patman from the U-Boot tree Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260705193251.2190705-5-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.