<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/tools/patman/settings.py, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>patman: Enhance implementation of file-based defaults</title>
<updated>2025-05-27T09:07:42+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-05-10T11:05:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0ab5e441e7f7433cad6bf16ea509dfc415a18b4f'/>
<id>0ab5e441e7f7433cad6bf16ea509dfc415a18b4f</id>
<content type='text'>
Patman allows defaults for its command-line flags to be read from a
file. The implementation of this does not fully work with subcommands,
since we don't want a default for those.

Also, it relies on being able to parse any sort of cmdline in order to
figure out the options that are available. But in some cases, the
cmdline may not parse, e.g. if there are required options, or
conflicting options.

Add a class which can be safely used to parse any cmdline, since it
allows execution to continue even when errors are obtained. Use this to
determine the defaults, being careful to skip sub/commands.

Another way to handle all of this would be to maintain the defaults
separately and insert them into the parser manually. For now, I'm not
sure which is best.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Patman allows defaults for its command-line flags to be read from a
file. The implementation of this does not fully work with subcommands,
since we don't want a default for those.

Also, it relies on being able to parse any sort of cmdline in order to
figure out the options that are available. But in some cases, the
cmdline may not parse, e.g. if there are required options, or
conflicting options.

Add a class which can be safely used to parse any cmdline, since it
allows execution to continue even when errors are obtained. Use this to
determine the defaults, being careful to skip sub/commands.

Another way to handle all of this would be to maintain the defaults
separately and insert them into the parser manually. For now, I'm not
sure which is best.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>patman: Deal with git safe-directory warning</title>
<updated>2025-05-27T09:07:42+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-05-10T11:04:55+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=212ed6bdb73d7999c8a25ad0c55a5358c0b44f03'/>
<id>212ed6bdb73d7999c8a25ad0c55a5358c0b44f03</id>
<content type='text'>
When running tests where the .git directory is not owned by the current
user, various warnings are produced and the tests fail. This happens in
CI.

For patman itself, modify the gitutil.get_top_level() function to return
None in this case. Ensure that the warning is not shown, since it creates
about 1000 lines of output.

For checkpatch, the same warning is produced even though --no-tree is
given. Suppress that as well.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When running tests where the .git directory is not owned by the current
user, various warnings are produced and the tests fail. This happens in
CI.

For patman itself, modify the gitutil.get_top_level() function to return
None in this case. Ensure that the warning is not shown, since it creates
about 1000 lines of output.

For checkpatch, the same warning is produced even though --no-tree is
given. Suppress that as well.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>patman: Split parser creation from parsing</title>
<updated>2025-05-27T09:07:42+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-05-08T03:58:10+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=79addcc904a5aae798b77bf20d80d03a26b5986b'/>
<id>79addcc904a5aae798b77bf20d80d03a26b5986b</id>
<content type='text'>
Tests may want to parse their own arguments. Refactor the parser code to
support this and allow settings to receive arguments as well.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Tests may want to parse their own arguments. Refactor the parser code to
support this and allow settings to receive arguments as well.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>u_boot_pylib: Move gitutil into the library</title>
<updated>2025-02-17T17:17:55+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-02-09T21:26:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5c33fb028865bdc490aa0db2980987149786b00f'/>
<id>5c33fb028865bdc490aa0db2980987149786b00f</id>
<content type='text'>
Move this file into U-Boot's Python library, so that it is no-longer
part of patman.

This makes a start on:

https://source.denx.de/u-boot/custodians/u-boot-dm/-/issues/35

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move this file into U-Boot's Python library, so that it is no-longer
part of patman.

This makes a start on:

https://source.denx.de/u-boot/custodians/u-boot-dm/-/issues/35

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: patman: fix deprecated Python ConfigParser methods</title>
<updated>2024-07-03T06:36:33+00:00</updated>
<author>
<name>Brandon Maier</name>
<email>brandon.maier@collins.com</email>
</author>
<published>2024-06-04T16:16:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a1488750935342f1750bd4f3cbd999688523898e'/>
<id>a1488750935342f1750bd4f3cbd999688523898e</id>
<content type='text'>
The method `ConfigParser.readfp()` is marked deprecated[1].

In Python 3.12 this method have been removed, so replace it with
`ConfigParser.read_file()`.

[1] https://docs.python.org/3.11/library/configparser.html#configparser.ConfigParser.readfp

Signed-off-by: Brandon Maier &lt;brandon.maier@collins.com&gt;
CC: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The method `ConfigParser.readfp()` is marked deprecated[1].

In Python 3.12 this method have been removed, so replace it with
`ConfigParser.read_file()`.

[1] https://docs.python.org/3.11/library/configparser.html#configparser.ConfigParser.readfp

Signed-off-by: Brandon Maier &lt;brandon.maier@collins.com&gt;
CC: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>patman: additionally honor a local .patman config file</title>
<updated>2023-01-06T02:21:57+00:00</updated>
<author>
<name>Maxim Cournoyer</name>
<email>maxim.cournoyer@gmail.com</email>
</author>
<published>2022-12-20T05:38:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8f8d3f72f28732bff0dc6362a18e3ec55fba2ac1'/>
<id>8f8d3f72f28732bff0dc6362a18e3ec55fba2ac1</id>
<content type='text'>
This enables versioning a project specific patman configuration file.
It also makes it possible to declare the project name, which is not a
useful thing to do in $HOME/.patman.  A new test is added, along
updated documentation.

Signed-off-by: Maxim Cournoyer &lt;maxim.cournoyer@savoirfairelinux.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This enables versioning a project specific patman configuration file.
It also makes it possible to declare the project name, which is not a
useful thing to do in $HOME/.patman.  A new test is added, along
updated documentation.

Signed-off-by: Maxim Cournoyer &lt;maxim.cournoyer@savoirfairelinux.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>patman: fail early in Setup when provided config file does not exist</title>
<updated>2023-01-06T02:21:57+00:00</updated>
<author>
<name>Maxim Cournoyer</name>
<email>maxim.cournoyer@gmail.com</email>
</author>
<published>2022-12-20T05:38:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=db16edd8ced27c06c075999ef95c6a1a57db98e0'/>
<id>db16edd8ced27c06c075999ef95c6a1a57db98e0</id>
<content type='text'>
Rationale: if the user explicitly provide this argument, they probably
intend for it to be used.

Signed-off-by: Maxim Cournoyer &lt;maxim.cournoyer@savoirfairelinux.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rationale: if the user explicitly provide this argument, they probably
intend for it to be used.

Signed-off-by: Maxim Cournoyer &lt;maxim.cournoyer@savoirfairelinux.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>patman: set the default config_fname argument value to None</title>
<updated>2023-01-06T02:21:57+00:00</updated>
<author>
<name>Maxim Cournoyer</name>
<email>maxim.cournoyer@gmail.com</email>
</author>
<published>2022-12-20T05:38:39+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2c58a5e2753e4f0afc4c937b07b9380398bbe8fd'/>
<id>2c58a5e2753e4f0afc4c937b07b9380398bbe8fd</id>
<content type='text'>
This better matches Python conventions, allowing to easily test
whether the optional argument is provided.

Signed-off-by: Maxim Cournoyer &lt;maxim.cournoyer@savoirfairelinux.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This better matches Python conventions, allowing to easily test
whether the optional argument is provided.

Signed-off-by: Maxim Cournoyer &lt;maxim.cournoyer@savoirfairelinux.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>patman: import gitutil module where it is needed</title>
<updated>2023-01-06T02:21:57+00:00</updated>
<author>
<name>Maxim Cournoyer</name>
<email>maxim.cournoyer@gmail.com</email>
</author>
<published>2022-12-20T05:38:38+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=57e3b03fe1ea225eb45ccfa3b0f2d564d95a4717'/>
<id>57e3b03fe1ea225eb45ccfa3b0f2d564d95a4717</id>
<content type='text'>
Instead of propagating it from the module entry point (main script).

Signed-off-by: Maxim Cournoyer &lt;maxim.cournoyer@savoirfairelinux.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of propagating it from the module entry point (main script).

Signed-off-by: Maxim Cournoyer &lt;maxim.cournoyer@savoirfairelinux.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>patman: replace deprecated SafeConfigParser with ConfigParser</title>
<updated>2023-01-06T02:21:57+00:00</updated>
<author>
<name>Maxim Cournoyer</name>
<email>maxim.cournoyer@gmail.com</email>
</author>
<published>2022-12-20T05:38:37+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8b73f9bf9e979b47aa4f7dcbd6727945a0da02f8'/>
<id>8b73f9bf9e979b47aa4f7dcbd6727945a0da02f8</id>
<content type='text'>
The SafeConfigParser class has been renamed in Python 3.2 to
ConfigParser, and the old alias has been deprecated since.

Signed-off-by: Maxim Cournoyer &lt;maxim.cournoyer@savoirfairelinux.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The SafeConfigParser class has been renamed in Python 3.2 to
ConfigParser, and the old alias has been deprecated since.

Signed-off-by: Maxim Cournoyer &lt;maxim.cournoyer@savoirfairelinux.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
