diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-01-05 10:40:55 -0500 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-01-10 11:37:29 -0500 |
commit | c42ae60a84f0e7c30126f726a0057781b81f5074 (patch) | |
tree | a439ec8a3114d86aff07e687e88bd11e2adbcf87 /gnu/packages/patches/u-boot-patman-get-maintainer.patch | |
parent | 65d24b9a24dd7ca195b7138ded63764a812e90e9 (diff) |
gnu: patman: Fix incomplete get-maintainer patch.
The full set of patches already merged into the U-Boot is included for
simplicity and avoiding mistakes like the previous one, where a conflicting
hunk got dropped, causing the following error when running patman:
WARNING: Unknown setting get_maintainer_script
* gnu/packages/bootloaders.scm (u-boot) [source]: Replace the
u-boot-patman-fix-help.patch, u-boot-patman-local-conf.patch and
u-boot-patman-get-maintainer.patch with u-boot-patman-guix-integration.patch.
* gnu/local.mk (dist_patch_DATA): Update patch registrations.
* gnu/packages/patches/u-boot-patman-fix-help.patch: Delete file.
* gnu/packages/patches/u-boot-patman-get-maintainer.patch: Likewise.
* gnu/packages/patches/u-boot-patman-local-conf.patch: Likewise.
* gnu/packages/patches/u-boot-patman-guix-integration.patch: New file.
Reported-by: Jelle Licht <jlicht@fsfe.org>
Diffstat (limited to 'gnu/packages/patches/u-boot-patman-get-maintainer.patch')
-rw-r--r-- | gnu/packages/patches/u-boot-patman-get-maintainer.patch | 104 |
1 files changed, 0 insertions, 104 deletions
diff --git a/gnu/packages/patches/u-boot-patman-get-maintainer.patch b/gnu/packages/patches/u-boot-patman-get-maintainer.patch deleted file mode 100644 index 4377f8394e..0000000000 --- a/gnu/packages/patches/u-boot-patman-get-maintainer.patch +++ /dev/null @@ -1,104 +0,0 @@ -Upstream status: https://patchwork.ozlabs.org/project/uboot/list/?series=333427 - -diff --git a/tools/patman/patman.rst b/tools/patman/patman.rst -index 7828899879..95b6c9c3f0 100644 ---- a/tools/patman/patman.rst -+++ b/tools/patman/patman.rst -@@ -88,7 +88,7 @@ To add your own, create a file `~/.patman` like this:: - Patman will also look for a `.patman` configuration file at the root - of the current project git repository, which makes it possible to - override the `project` settings variable or anything else in a --project-specific way. The values of this "local" configuration file -+project-specific way. The values of this "local" configuration file - take precedence over those of the "global" one. - - Aliases are recursive. -diff --git a/tools/patman/test_settings.py b/tools/patman/test_settings.py -index 9c14b4aaa3..c768a2fc64 100644 ---- a/tools/patman/test_settings.py -+++ b/tools/patman/test_settings.py -@@ -6,38 +6,62 @@ - import argparse - import contextlib - import os --import subprocess -+import sys - import tempfile - - from patman import settings -+from patman import tools - - - @contextlib.contextmanager - def empty_git_repository(): - with tempfile.TemporaryDirectory() as tmpdir: - os.chdir(tmpdir) -- subprocess.check_call(['git', 'init']) -+ tools.run('git', 'init', raise_on_error=True) - yield tmpdir - - -+@contextlib.contextmanager -+def cleared_command_line_args(): -+ old_value = sys.argv[:] -+ sys.argv = [sys.argv[0]] -+ try: -+ yield -+ finally: -+ sys.argv = old_value -+ -+ - def test_git_local_config(): -- with empty_git_repository(): -- with tempfile.NamedTemporaryFile() as global_config: -- global_config.write(b'[settings]\n' -- b'project=u-boot\n') -- global_config.flush() -- parser = argparse.ArgumentParser() -- parser.add_argument('-p', '--project', default='unknown') -- -- # Test "global" config is used. -- settings.Setup(parser, 'unknown', global_config.name) -- args, _ = parser.parse_known_args() -- assert args.project == 'u-boot' -- -- # Test local config can shadow it. -- with open('.patman', 'w', buffering=1) as f: -- f.write('[settings]\n' -- 'project=guix-patches\n') -- settings.Setup(parser, 'unknown', global_config.name) -- args, _ = parser.parse_known_args([]) -- assert args.project == 'guix-patches' -+ # Clearing the command line arguments is required, otherwise -+ # arguments passed to the test running such as in 'pytest -k -+ # filter' would be processed by _UpdateDefaults and fail. -+ with cleared_command_line_args(): -+ with empty_git_repository(): -+ with tempfile.NamedTemporaryFile() as global_config: -+ global_config.write(b'[settings]\n' -+ b'project=u-boot\n') -+ global_config.flush() -+ parser = argparse.ArgumentParser() -+ parser.add_argument('-p', '--project', default='unknown') -+ subparsers = parser.add_subparsers(dest='cmd') -+ send = subparsers.add_parser('send') -+ send.add_argument('--no-check', action='store_false', -+ dest='check_patch', default=True) -+ -+ # Test "global" config is used. -+ settings.Setup(parser, 'unknown', global_config.name) -+ args, _ = parser.parse_known_args([]) -+ assert args.project == 'u-boot' -+ send_args, _ = send.parse_known_args([]) -+ assert send_args.check_patch -+ -+ # Test local config can shadow it. -+ with open('.patman', 'w', buffering=1) as f: -+ f.write('[settings]\n' -+ 'project: guix-patches\n' -+ 'check_patch: False\n') -+ settings.Setup(parser, 'unknown', global_config.name) -+ args, _ = parser.parse_known_args([]) -+ assert args.project == 'guix-patches' -+ send_args, _ = send.parse_known_args([]) -+ assert not send_args.check_patch |