Skip to contentSkip to conversation

patman: Separate gitutil fully

PATCH In review Simon Glass 2 participants 10 messages Apr 7, 2025 – Apr 9, 2025

lore
Share & tools
lore
#0 lore raw

cover patman: Separate gitutil fully

The gitutil module uses Patman's settings module, which is not allowed as it is supposed to be a separate package. This series ties up this dependency.

This series depends on these two patches being applied:

https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Simon Glass (5):
patman: Untangle settings from gitutil
patman: Pass the alias dict into gitutil.build_email_list()
patman: Pass the alias dict into gitutil.email_patches()
patman: Pass aliases to Series.MakeCcFile()
patman: Update Series.ShowActions() to pass alias

 tools/patman/control.py       | 11 ++++++++---
 tools/patman/func_test.py     |  8 ++++----
 tools/patman/series.py        | 32 ++++++++++++++++++++++----------
 tools/u_boot_pylib/gitutil.py | 34 ++++++++++++++--------------------
 4 files changed, 48 insertions(+), 37 deletions(-)
Signature · 4 lines
2.43.0

base-commit: d47b5693e21f78d8cd8caa8fcd9e64fd6ae85759
branch: pata
#1 lore raw

PATCH 1/5 patman: Untangle settings from gitutil

The gitutil module is supposed to be independent from patman but one piece was missed in the series which separated them.

Move the settings setup out of gitutil

---

 tools/patman/control.py       | 4 ++++
 tools/u_boot_pylib/gitutil.py | 3 ---
 2 files changed, 4 insertions(+), 3 deletions(-)
tools/patman/control.py +4 -0
index b8a45912058..c1b6e41e2d2 100644
@@ -13,6 +13,7 @@ import sys
 
 from patman import checkpatch
 from patman import patchstream
+from patman import settings
 from u_boot_pylib import gitutil
 from u_boot_pylib import terminal
 
@@ -20,6 +21,9 @@ from u_boot_pylib import terminal
 def setup():
     """Do required setup before doing anything"""
     gitutil.setup()
+    alias_fname = gitutil.get_alias_file()
+    if alias_fname:
+        settings.ReadGitAliases(alias_fname)
 
 
 def prepare_patches(col, branch, count, start, end, ignore_binary, signoff,
tools/u_boot_pylib/gitutil.py +0 -3
index 0376bece3e6..8935b6cc847 100644
@@ -693,9 +693,6 @@ def setup():
     # Check for a git alias file also
     global USE_NO_DECORATE
 
-    alias_fname = get_alias_file()
-    if alias_fname:
-        settings.ReadGitAliases(alias_fname)
     cmd = log_cmd(None, count=0)
     USE_NO_DECORATE = (command.run_one(*cmd, raise_on_error=False)
                        .return_code == 0)
Signature · 1 line
2.43.0
#2 lore raw

PATCH 2/5 patman: Pass the alias dict into gitutil.build_email_list()

In reply to Simon Glass

Rather than accessing the settings module in this function, require the alias dict to be passed in.

---

 tools/patman/series.py        | 14 ++++++++------
 tools/u_boot_pylib/gitutil.py | 18 +++++++++---------
 2 files changed, 17 insertions(+), 15 deletions(-)
tools/patman/series.py +8 -6
index b73e9c58de4..51ae7f04c89 100644
@@ -110,8 +110,8 @@ class Series(dict):
             cmd: The git command we would have run
             process_tags: Process tags as if they were aliases
         """
-        to_set = set(gitutil.build_email_list(self.to));
-        cc_set = set(gitutil.build_email_list(self.cc));
+        to_set = set(gitutil.build_email_list(self.to, settings.alias));
+        cc_set = set(gitutil.build_email_list(self.cc, settings.alias));
 
         col = terminal.Color()
         print('Dry run, so not doing much. But I would do this:')
@@ -140,7 +140,8 @@ class Series(dict):
         print('Postfix:\t ', self.get('postfix'))
         if self.cover:
             print('Cover: %d lines' % len(self.cover))
-            cover_cc = gitutil.build_email_list(self.get('cover_cc', ''))
+            cover_cc = gitutil.build_email_list(self.get('cover_cc', ''),
+                                                settings.alias)
             all_ccs = itertools.chain(cover_cc, *self._generated_cc.values())
             for email in sorted(set(all_ccs) - to_set - cc_set):
                     print('      Cc: ', email)
@@ -267,9 +268,9 @@ class Series(dict):
         """
         cc = []
         if process_tags:
-            cc += gitutil.build_email_list(commit.tags,
+            cc += gitutil.build_email_list(commit.tags, settings.alias,
                                            warn_on_error=warn_on_error)
-        cc += gitutil.build_email_list(commit.cc_list,
+        cc += gitutil.build_email_list(commit.cc_list, settings.alias,
                                        warn_on_error=warn_on_error)
         if type(add_maintainers) == type(cc):
             cc += add_maintainers
@@ -344,7 +345,8 @@ class Series(dict):
             print(col.build(col.YELLOW, f'Skipping "{x}"'))
 
         if cover_fname:
-            cover_cc = gitutil.build_email_list(self.get('cover_cc', ''))
+            cover_cc = gitutil.build_email_list(
+                self.get('cover_cc', ''), settings.alias)
             cover_cc = list(set(cover_cc + all_ccs))
             if limit is not None:
                 cover_cc = cover_cc[:limit]
tools/u_boot_pylib/gitutil.py +9 -9
index 8935b6cc847..7c9d0deecbb 100644
@@ -361,7 +361,7 @@ def create_patches(branch, start, count, ignore_binary, series, signoff=True):
     return None, files
 
 
-def build_email_list(in_list, tag=None, alias=None, warn_on_error=True):
+def build_email_list(in_list, alias, tag=None, warn_on_error=True):
     """Build a list of email addresses based on an input list.
 
     Takes a list of email addresses and aliases, and turns this into a list
@@ -373,10 +373,10 @@ def build_email_list(in_list, tag=None, alias=None, warn_on_error=True):
 
     Args:
         in_list (list of str): List of aliases/email addresses
-        tag (str): Text to put before each address
         alias (dict): Alias dictionary:
             key: alias
             value: list of aliases or email addresses
+        tag (str): Text to put before each address
         warn_on_error (bool): True to raise an error when an alias fails to
             match, False to just print a message.
 
@@ -389,12 +389,12 @@ def build_email_list(in_list, tag=None, alias=None, warn_on_error=True):
     >>> alias['mary'] = ['Mary Poppins <[email protected]>']
     >>> alias['boys'] = ['fred', ' john']
     >>> alias['all'] = ['fred ', 'john', '   mary   ']
-    >>> build_email_list(['john', 'mary'], None, alias)
+    >>> build_email_list(['john', 'mary'], alias, None)
     ['[email protected]', 'Mary Poppins <[email protected]>']
-    >>> build_email_list(['john', 'mary'], '--to', alias)
+    >>> build_email_list(['john', 'mary'], alias, '--to')
     ['--to "[email protected]"', \
 '--to "Mary Poppins <[email protected]>"']
-    >>> build_email_list(['john', 'mary'], 'Cc', alias)
+    >>> build_email_list(['john', 'mary'], alias, 'Cc')
     ['Cc [email protected]', 'Cc Mary Poppins <[email protected]>']
     """
     quote = '"' if tag and tag[0] == '-' else ''
@@ -498,7 +498,7 @@ send --cc-cmd cc-fname" cover p1 p2'
     # Restore argv[0] since we clobbered it.
     >>> sys.argv[0] = _old_argv0
     """
-    to = build_email_list(series.get('to'), '--to', alias, warn_on_error)
+    to = build_email_list(series.get('to'), settings.alias, '--to', warn_on_error)
     if not to:
         git_config_to = command.output('git', 'config', 'sendemail.to',
                                        raise_on_error=False)
@@ -510,10 +510,10 @@ send --cc-cmd cc-fname" cover p1 p2'
                   "git config sendemail.to [email protected]")
             return None
     cc = build_email_list(list(set(series.get('cc')) - set(series.get('to'))),
-                          '--cc', alias, warn_on_error)
+                          settings.alias, '--cc', warn_on_error)
     if self_only:
-        to = build_email_list([os.getenv('USER')], '--to',
-                              alias, warn_on_error)
+        to = build_email_list([os.getenv('USER')], '--to', settings.alias,
+                              warn_on_error)
         cc = []
     cmd = ['git', 'send-email', '--annotate']
     if smtp_server:
Signature · 1 line
2.43.0
#3 lore raw

PATCH 3/5 patman: Pass the alias dict into gitutil.email_patches()

In reply to Simon Glass

Rather than accessing the settings module in this function, require the alias dict to be passed in.

---

 tools/patman/control.py       |  2 +-
 tools/patman/func_test.py     |  5 +++--
 tools/u_boot_pylib/gitutil.py | 19 ++++++++-----------
 3 files changed, 12 insertions(+), 14 deletions(-)
tools/patman/control.py +1 -1
index c1b6e41e2d2..f578336c7cc 100644
@@ -153,7 +153,7 @@ def email_patches(col, series, cover_fname, patch_files, process_tags, its_a_go,
     if its_a_go:
         cmd = gitutil.email_patches(
             series, cover_fname, patch_files, dry_run, not ignore_bad_tags,
-            cc_file, in_reply_to=in_reply_to, thread=thread,
+            cc_file, settings.alias, in_reply_to=in_reply_to, thread=thread,
             smtp_server=smtp_server)
     else:
         print(col.build(col.RED, "Not sending emails due to errors/warnings"))
tools/patman/func_test.py +3 -2
index 720746e21f5..b8fb49c34ba 100644
@@ -206,13 +206,14 @@ class TestFunctional(unittest.TestCase):
         dry_run = True
         in_reply_to = mel
         count = 2
-        settings.alias = {
+        alias = {
             'fdt': ['simon'],
             'u-boot': ['[email protected]'],
             'simon': [self.leb],
             'fred': [self.fred],
             'joe': [self.joe],
         }
+        settings.alias = alias
 
         text = self._get_text('test01.txt')
         series = patchstream.get_metadata_for_test(text)
@@ -231,7 +232,7 @@ class TestFunctional(unittest.TestCase):
                                         None, get_maintainer_script)
             cmd = gitutil.email_patches(
                 series, cover_fname, args, dry_run, not ignore_bad_tags,
-                cc_file, in_reply_to=in_reply_to, thread=None)
+                cc_file, alias, in_reply_to=in_reply_to, thread=None)
             series.ShowActions(args, cmd, process_tags)
         cc_lines = open(cc_file, encoding='utf-8').read().splitlines()
         os.remove(cc_file)
tools/u_boot_pylib/gitutil.py +8 -11
index 7c9d0deecbb..7d3a0b68c53 100644
@@ -5,7 +5,6 @@
 import os
 import sys
 
-from patman import settings
 from u_boot_pylib import command
 from u_boot_pylib import terminal
 
@@ -437,7 +436,7 @@ def check_suppress_cc_config():
 
 
 def email_patches(series, cover_fname, args, dry_run, warn_on_error, cc_fname,
-                  self_only=False, alias=None, in_reply_to=None, thread=False,
+                  alias, self_only=False, in_reply_to=None, thread=False,
                   smtp_server=None):
     """Email a patch series.
 
@@ -449,10 +448,10 @@ def email_patches(series, cover_fname, args, dry_run, warn_on_error, cc_fname,
         warn_on_error (bool): True to print a warning when an alias fails to
             match, False to ignore it.
         cc_fname (str): Filename of Cc file for per-commit Cc
-        self_only (bool): True to just email to yourself as a test
-        alias (dict or None): Alias dictionary: (None to use settings default)
+        alias (dict): Alias dictionary:
             key: alias
             value: list of aliases or email addresses
+        self_only (bool): True to just email to yourself as a test
         in_reply_to (str or None): If set we'll pass this to git as
             --in-reply-to - should be a message ID that this is in reply to.
         thread (bool): True to add --thread to git send-email (make
@@ -498,7 +497,7 @@ send --cc-cmd cc-fname" cover p1 p2'
     # Restore argv[0] since we clobbered it.
     >>> sys.argv[0] = _old_argv0
     """
-    to = build_email_list(series.get('to'), settings.alias, '--to', warn_on_error)
+    to = build_email_list(series.get('to'), alias, '--to', warn_on_error)
     if not to:
         git_config_to = command.output('git', 'config', 'sendemail.to',
                                        raise_on_error=False)
@@ -510,9 +509,9 @@ send --cc-cmd cc-fname" cover p1 p2'
                   "git config sendemail.to [email protected]")
             return None
     cc = build_email_list(list(set(series.get('cc')) - set(series.get('to'))),
-                          settings.alias, '--cc', warn_on_error)
+                          alias, '--cc', warn_on_error)
     if self_only:
-        to = build_email_list([os.getenv('USER')], '--to', settings.alias,
+        to = build_email_list([os.getenv('USER')], '--to', alias,
                               warn_on_error)
         cc = []
     cmd = ['git', 'send-email', '--annotate']
@@ -535,14 +534,14 @@ send --cc-cmd cc-fname" cover p1 p2'
     return cmdstr
 
 
-def lookup_email(lookup_name, alias=None, warn_on_error=True, level=0):
+def lookup_email(lookup_name, alias, warn_on_error=True, level=0):
     """If an email address is an alias, look it up and return the full name
 
     TODO: Why not just use git's own alias feature?
 
     Args:
         lookup_name (str): Alias or email address to look up
-        alias (dict or None): Alias dictionary: (None to use settings default)
+        alias (dict): Alias dictionary
             key: alias
             value: list of aliases or email addresses
         warn_on_error (bool): True to print a warning when an alias fails to
@@ -589,8 +588,6 @@ def lookup_email(lookup_name, alias=None, warn_on_error=True, level=0):
     Recursive email alias at 'mary'
     ['[email protected]', '[email protected]']
     """
-    if not alias:
-        alias = settings.alias
     lookup_name = lookup_name.strip()
     if '@' in lookup_name:      # Perhaps a real email address
         return [lookup_name]
Signature · 1 line
2.43.0
#4 lore raw

PATCH 4/5 patman: Pass aliases to Series.MakeCcFile()

In reply to Simon Glass

Rather than accessing settings directly, pass the aliases in, so that we can do the same from tests. With further work this will allow the tests to work without using settings.alias

---

 tools/patman/control.py   |  3 ++-
 tools/patman/func_test.py |  2 +-
 tools/patman/series.py    | 13 ++++++++++---
 3 files changed, 13 insertions(+), 5 deletions(-)
tools/patman/control.py +2 -1
index f578336c7cc..13de9b6abfc 100644
@@ -146,7 +146,8 @@ def email_patches(col, series, cover_fname, patch_files, process_tags, its_a_go,
         smtp_server (str): SMTP server to use to send patches (None for default)
     """
     cc_file = series.MakeCcFile(process_tags, cover_fname, not ignore_bad_tags,
-                                add_maintainers, limit, get_maintainer_script)
+                                add_maintainers, limit, get_maintainer_script,
+                                settings.alias)
 
     # Email the patches out (giving the user time to check / cancel)
     cmd = ''
tools/patman/func_test.py +1 -1
index b8fb49c34ba..c87c938808c 100644
@@ -229,7 +229,7 @@ class TestFunctional(unittest.TestCase):
             series.DoChecks()
             cc_file = series.MakeCcFile(process_tags, cover_fname,
                                         not ignore_bad_tags, add_maintainers,
-                                        None, get_maintainer_script)
+                                        None, get_maintainer_script, alias)
             cmd = gitutil.email_patches(
                 series, cover_fname, args, dry_run, not ignore_bad_tags,
                 cc_file, alias, in_reply_to=in_reply_to, thread=None)
tools/patman/series.py +10 -3
index 51ae7f04c89..4322882abd5 100644
@@ -242,7 +242,7 @@ class Series(dict):
 
     def GetCcForCommit(self, commit, process_tags, warn_on_error,
                        add_maintainers, limit, get_maintainer_script,
-                       all_skips):
+                       all_skips, alias):
         """Get the email CCs to use with a particular commit
 
         Uses subject tags and get_maintainers.pl script to find people to cc
@@ -262,6 +262,9 @@ class Series(dict):
             all_skips (set of str): Updated to include the set of bouncing email
                 addresses that were dropped from the output. This is essentially
                 a return value from this function.
+            alias (dict): Alias dictionary
+                key: alias
+                value: list of aliases or email addresses
 
         Returns:
             list of str: List of email addresses to cc
@@ -284,7 +287,7 @@ class Series(dict):
         return cc
 
     def MakeCcFile(self, process_tags, cover_fname, warn_on_error,
-                   add_maintainers, limit, get_maintainer_script):
+                   add_maintainers, limit, get_maintainer_script, alias):
         """Make a cc file for us to use for per-commit Cc automation
 
         Also stores in self._generated_cc to make ShowActions() faster.
@@ -300,6 +303,9 @@ class Series(dict):
             limit (int): Limit the length of the Cc list (None if no limit)
             get_maintainer_script (str): The file name of the get_maintainer.pl
                 script (or compatible).
+            alias (dict): Alias dictionary
+                key: alias
+                value: list of aliases or email addresses
         Return:
             Filename of temp file created
         """
@@ -314,7 +320,8 @@ class Series(dict):
                 commit.seq = i
                 commit.future = executor.submit(
                     self.GetCcForCommit, commit, process_tags, warn_on_error,
-                    add_maintainers, limit, get_maintainer_script, all_skips)
+                    add_maintainers, limit, get_maintainer_script, all_skips,
+                    alias)
 
             # Show progress any commits that are taking forever
             lastlen = 0
Signature · 1 line
2.43.0
#5 lore raw

PATCH 5/5 patman: Update Series.ShowActions() to pass alias

In reply to Simon Glass

Instead of using settings.alias pass this value in. This allows tests to work without using settings.alias

---

 tools/patman/control.py   |  2 +-
 tools/patman/func_test.py |  3 +--
 tools/patman/series.py    | 17 ++++++++++-------
 3 files changed, 12 insertions(+), 10 deletions(-)
tools/patman/control.py +1 -1
index 13de9b6abfc..9d7c9ef4478 100644
@@ -161,7 +161,7 @@ def email_patches(col, series, cover_fname, patch_files, process_tags, its_a_go,
 
     # For a dry run, just show our actions as a sanity check
     if dry_run:
-        series.ShowActions(patch_files, cmd, process_tags)
+        series.ShowActions(patch_files, cmd, process_tags, settings.alias)
         if not its_a_go:
             print(col.build(col.RED, "Email would not be sent"))
 
tools/patman/func_test.py +1 -2
index c87c938808c..ce39f561f63 100644
@@ -213,7 +213,6 @@ class TestFunctional(unittest.TestCase):
             'fred': [self.fred],
             'joe': [self.joe],
         }
-        settings.alias = alias
 
         text = self._get_text('test01.txt')
         series = patchstream.get_metadata_for_test(text)
@@ -233,7 +232,7 @@ class TestFunctional(unittest.TestCase):
             cmd = gitutil.email_patches(
                 series, cover_fname, args, dry_run, not ignore_bad_tags,
                 cc_file, alias, in_reply_to=in_reply_to, thread=None)
-            series.ShowActions(args, cmd, process_tags)
+            series.ShowActions(args, cmd, process_tags, alias)
         cc_lines = open(cc_file, encoding='utf-8').read().splitlines()
         os.remove(cc_file)
 
tools/patman/series.py +10 -7
index 4322882abd5..3ec33e022d0 100644
@@ -102,16 +102,19 @@ class Series(dict):
         commit.check_tags()
         self.commits.append(commit)
 
-    def ShowActions(self, args, cmd, process_tags):
+    def ShowActions(self, args, cmd, process_tags, alias):
         """Show what actions we will/would perform
 
         Args:
             args: List of patch files we created
             cmd: The git command we would have run
             process_tags: Process tags as if they were aliases
+            alias (dict): Alias dictionary
+                key: alias
+                value: list of aliases or email addresses
         """
-        to_set = set(gitutil.build_email_list(self.to, settings.alias));
-        cc_set = set(gitutil.build_email_list(self.cc, settings.alias));
+        to_set = set(gitutil.build_email_list(self.to, alias));
+        cc_set = set(gitutil.build_email_list(self.cc, alias));
 
         col = terminal.Color()
         print('Dry run, so not doing much. But I would do this:')
@@ -141,7 +144,7 @@ class Series(dict):
         if self.cover:
             print('Cover: %d lines' % len(self.cover))
             cover_cc = gitutil.build_email_list(self.get('cover_cc', ''),
-                                                settings.alias)
+                                                alias)
             all_ccs = itertools.chain(cover_cc, *self._generated_cc.values())
             for email in sorted(set(all_ccs) - to_set - cc_set):
                     print('      Cc: ', email)
@@ -271,9 +274,9 @@ class Series(dict):
         """
         cc = []
         if process_tags:
-            cc += gitutil.build_email_list(commit.tags, settings.alias,
+            cc += gitutil.build_email_list(commit.tags, alias,
                                            warn_on_error=warn_on_error)
-        cc += gitutil.build_email_list(commit.cc_list, settings.alias,
+        cc += gitutil.build_email_list(commit.cc_list, alias,
                                        warn_on_error=warn_on_error)
         if type(add_maintainers) == type(cc):
             cc += add_maintainers
@@ -353,7 +356,7 @@ class Series(dict):
 
         if cover_fname:
             cover_cc = gitutil.build_email_list(
-                self.get('cover_cc', ''), settings.alias)
+                self.get('cover_cc', ''), alias)
             cover_cc = list(set(cover_cc + all_ccs))
             if limit is not None:
                 cover_cc = cover_cc[:limit]
Signature · 1 line
2.43.0
#6 lore raw
In reply to Simon Glass
Quoted 18 lines · Simon Glass

The gitutil module uses Patman's settings module, which is not allowed as it is supposed to be a separate package. This series ties up this dependency.

This series depends on these two patches being applied:

https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Simon Glass (5):
patman: Untangle settings from gitutil
patman: Pass the alias dict into gitutil.build_email_list()
patman: Pass the alias dict into gitutil.email_patches()
patman: Pass aliases to Series.MakeCcFile()
patman: Update Series.ShowActions() to pass alias

Quoted 5 lines
 tools/patman/control.py       | 11 ++++++++---
 tools/patman/func_test.py     |  8 ++++----
 tools/patman/series.py        | 32 ++++++++++++++++++++++----------
 tools/u_boot_pylib/gitutil.py | 34 ++++++++++++++--------------------
 4 files changed, 48 insertions(+), 37 deletions(-)

I just want to reiterate my question / request to host these outside of the U-Boot sources themselves so they can be managed (both in the sense of U-Boot as user and as maintainer of sources) following normal Python best practices? I'd be fine even with something under
https://source.denx.de/u-boot/<something>/patman, etc.

Signature · 1 line
Tom
#7 lore raw

Hi Tom,

Quoted 27 lines · Tom Rini
Quoted 18 lines · Simon Glass

The gitutil module uses Patman's settings module, which is not allowed as it is supposed to be a separate package. This series ties up this dependency.

This series depends on these two patches being applied:

https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Simon Glass (5):
patman: Untangle settings from gitutil
patman: Pass the alias dict into gitutil.build_email_list()
patman: Pass the alias dict into gitutil.email_patches()
patman: Pass aliases to Series.MakeCcFile()
patman: Update Series.ShowActions() to pass alias

Quoted 5 lines
 tools/patman/control.py       | 11 ++++++++---
 tools/patman/func_test.py     |  8 ++++----
 tools/patman/series.py        | 32 ++++++++++++++++++++++----------
 tools/u_boot_pylib/gitutil.py | 34 ++++++++++++++--------------------
 4 files changed, 48 insertions(+), 37 deletions(-)
Quoted 5 lines

I just want to reiterate my question / request to host these outside of the U-Boot sources themselves so they can be managed (both in the sense of U-Boot as user and as maintainer of sources) following normal Python best practices? I'd be fine even with something under
https://source.denx.de/u-boot/<something>/patman, etc.

Yes I am working towards that. This series cleans up something missed in the last series.

After this series there is really just 'patchstream' left, which is used by buildman and patman. I haven't quite come to terms with the idea of moving it to u_boot_pylib yet.

What are the best practices you are referring to?

As to location, I can keep it in my tree and just delete it from yours if you like.

Regards,
Simon

#8 lore raw

Hi Tom,

Quoted 40 lines · Simon Glass

Hi Tom,

Quoted 27 lines · Tom Rini
Quoted 18 lines · Simon Glass

The gitutil module uses Patman's settings module, which is not allowed as it is supposed to be a separate package. This series ties up this dependency.

This series depends on these two patches being applied:

https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Simon Glass (5):
patman: Untangle settings from gitutil
patman: Pass the alias dict into gitutil.build_email_list()
patman: Pass the alias dict into gitutil.email_patches()
patman: Pass aliases to Series.MakeCcFile()
patman: Update Series.ShowActions() to pass alias

Quoted 5 lines
 tools/patman/control.py       | 11 ++++++++---
 tools/patman/func_test.py     |  8 ++++----
 tools/patman/series.py        | 32 ++++++++++++++++++++++----------
 tools/u_boot_pylib/gitutil.py | 34 ++++++++++++++--------------------
 4 files changed, 48 insertions(+), 37 deletions(-)
Quoted 5 lines

I just want to reiterate my question / request to host these outside of the U-Boot sources themselves so they can be managed (both in the sense of U-Boot as user and as maintainer of sources) following normal Python best practices? I'd be fine even with something under
https://source.denx.de/u-boot/<something>/patman, etc.

Yes I am working towards that. This series cleans up something missed in the last series.

Quoted 8 lines

After this series there is really just 'patchstream' left, which is used by buildman and patman. I haven't quite come to terms with the idea of moving it to u_boot_pylib yet.

What are the best practices you are referring to?

As to location, I can keep it in my tree and just delete it from yours if you like.

BTW I'm working on better support for handling lots of series, as mentioned a while back. I need to add some docs, but will send some patches at some point in the next month.

Regards,
Simon

#9 lore raw
In reply to Simon Glass
Quoted 36 lines · Simon Glass

Hi Tom,

Quoted 27 lines · Tom Rini
Quoted 18 lines · Simon Glass

The gitutil module uses Patman's settings module, which is not allowed as it is supposed to be a separate package. This series ties up this dependency.

This series depends on these two patches being applied:

https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Simon Glass (5):
patman: Untangle settings from gitutil
patman: Pass the alias dict into gitutil.build_email_list()
patman: Pass the alias dict into gitutil.email_patches()
patman: Pass aliases to Series.MakeCcFile()
patman: Update Series.ShowActions() to pass alias

Quoted 5 lines
 tools/patman/control.py       | 11 ++++++++---
 tools/patman/func_test.py     |  8 ++++----
 tools/patman/series.py        | 32 ++++++++++++++++++++++----------
 tools/u_boot_pylib/gitutil.py | 34 ++++++++++++++--------------------
 4 files changed, 48 insertions(+), 37 deletions(-)
Quoted 5 lines

I just want to reiterate my question / request to host these outside of the U-Boot sources themselves so they can be managed (both in the sense of U-Boot as user and as maintainer of sources) following normal Python best practices? I'd be fine even with something under
https://source.denx.de/u-boot/<something>/patman, etc.

Quoted 8 lines

Yes I am working towards that. This series cleans up something missed in the last series.

After this series there is really just 'patchstream' left, which is used by buildman and patman. I haven't quite come to terms with the idea of moving it to u_boot_pylib yet.

What are the best practices you are referring to?

Hosting python projects in their own repository, and versioning them and managing them via pip/etc.

Quoted 2 lines

As to location, I can keep it in my tree and just delete it from yours if you like.

That would be very silly. Aside from the whole thing about you needing to close down your fork, which this isn't even about.

Signature · 1 line
Tom