remotes: refer to configuration files
PATCH 1/2 remotes: refer to configuration files
The Readme indicated some remote names (torvalds, stable) but not all of them. Ask the user to check conf/remotes.yml instead. I also added information on how to override or extend the configuration file (through '~/.config/kernel-sec/remotes.yml')
--- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
README.md +4 -3
@@ -18,9 +18,10 @@ beneath that. They require PyYAML and html5lib (packaged in Debian as python3-yaml and python3-html5lib). Many scripts require access to a kernel git repository. By default -this is assumed to be in `../kernel`, with remotes named `torvalds` -and `stable` for the mainline and stable repositories. These can -be overridden by command-line options or by configuration. +this is assumed to be in `../kernel`, with remotes configured in +`conf/remotes.yml`, e.g. `torvalds`, `stable` and `cip` for the mainline, +stable and cip repositories. These can be overridden by command-line options +or configuration (`~/.config/kernel-sec/remotes.yml`). * `scripts/import_debian.py` - import information from Debian's `kernel_sec` project. It includes all issues that Debian considers
Signature · 1 line
2.17.1
PATCH 2/2 remotes: call _get_configured_remotes
This is probably a copy&paste mistake that had no effect because the contents of _get_configured_remotes and _get_configured_branches is the same.
--- scripts/kernel_sec/branch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/kernel_sec/branch.py +1 -1
@@ -209,7 +209,7 @@ def get_remotes(mappings, mainline=None, stable=None): remotes = RemoteMap() remotes.update(_get_configured_remotes('conf/remotes.yml')) remotes.update( - _get_configured_branches( + _get_configured_remotes( os.path.expanduser('~/.config/kernel-sec/remotes.yml'))) for mapping in mappings: left, right = arg.split(':', 1)
Signature · 1 line
2.17.1
PATCH 2/2 remotes: call _get_configured_remotes
Quoted 5 lines · Daniel Sangorrin
This is probably a copy&paste mistake that had no effect because the contents of
_get_configured_remotesand_get_configured_branchesis the same.Signed-off-by Daniel Sangorrin <[email protected]>
Maybe it would make more sense to merge the two functions instead?
Ben.
Quoted 19 lines
---
?scripts/kernel_sec/branch.py | 2 +-
?1 file changed, 1 insertion(+), 1 deletion(-)scripts/kernel_sec/branch.py +0
-0@@ -209,7 +209,7 @@ def get_remotes(mappings, mainline=None,stable=None):
?????remotes =RemoteMap()?????remotes.update(_get_configured_remotes('conf/remotes.yml')) ?????remotes.update(
-????????_get_configured_branches( +????????_get_configured_remotes( ?????????????os.path.expanduser('~/.config/kernel-sec/remotes.yml'))) ?????for mapping in mappings:
?????????left, right =arg.split(':', 1)
Signature · 3 lines
Ben Hutchings, Software Developer ? Codethink Ltd
https://www.codethink.co.uk/ Dale House, 35 Dale Street
Manchester, M1 2HF, United KingdomPATCH 2/2 remotes: call _get_configured_remotes
Quoted 10 lines
From: Ben Hutchings <[email protected]>
Quoted 5 lines · Daniel Sangorrin
This is probably a copy&paste mistake that had no effect because the contents of
_get_configured_remotesand_get_configured_branchesis the same.Signed-off-by Daniel Sangorrin <[email protected]>Maybe it would make more sense to merge the two functions instead?
I thought about that but in the future you may want to add some code that is specific to one of them. If you want me to consolidate them, what name would you use?
Thanks,
Daniel
Quoted 26 lines
Ben.
Quoted 11 lines
---
?scripts/kernel_sec/branch.py | 2 +-
?1 file changed, 1 insertion(+), 1 deletion(-)scripts/kernel_sec/branch.py +0
-0@@ -209,7 +209,7 @@ def get_remotes(mappings, mainline=None,stable=None):
Quoted 8 lines
?????remotes =
RemoteMap()?????remotes.update(_get_configured_remotes('conf/remotes.yml')) ?????remotes.update(
-????????_get_configured_branches( +????????_get_configured_remotes( ?????????????os.path.expanduser('~/.config/kernel-sec/remotes.yml'))) ?????for mapping in mappings:
?????????left, right =arg.split(':', 1)--
Ben Hutchings, Software Developer ? Codethink Ltd
https://www.codethink.co.uk/ Dale House, 35 Dale Street
Manchester, M1 2HF, United Kingdom
PATCH 2/2 remotes: call _get_configured_remotes
Quoted 7 lines · daniel.sangorrin at toshiba.co.jp
Quoted 7 lines
From: Ben Hutchings <[email protected]>
Quoted 4 lines · Daniel Sangorrin
This is probably a copy&paste mistake that had no effect because the contents of
_get_configured_remotesand_get_configured_branchesis the same.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Daniel Sangorrin <[email protected]>Maybe it would make more sense to merge the two functions instead?
I thought about that but in the future you may want to add some code that is specific to one of them. If you want me to consolidate them, what name would you use?
Actually these two functions aren't exactly the same, since the default return value differs. In practice that doesn't make a difference at the moment, but logically it would be wrong to return one or the other.
So I'll apply your original patch.
Ben.
Signature · 3 lines
Ben Hutchings, Software Developer ? Codethink Ltd
https://www.codethink.co.uk/ Dale House, 35 Dale Street
Manchester, M1 2HF, United KingdomBen Hutchings
AppliedPATCH 1/2 remotes: refer to configuration files
In reply to Daniel SangorrinQuoted 6 lines · Daniel Sangorrin
The Readme indicated some remote names (torvalds, stable) but not all of them. Ask the user to check
conf/remotes.ymlinstead. I also added information on how to override or extend the configuration file (through '~/.config/kernel-sec/remotes.yml')Signed-off-by Daniel Sangorrin <[email protected]>
[...]
Applied, thanks.
Ben.
Signature · 3 lines
Ben Hutchings, Software Developer ? Codethink Ltd
https://www.codethink.co.uk/ Dale House, 35 Dale Street
Manchester, M1 2HF, United Kingdom