All of lore.kernel.org
 help / color / mirror / Atom feed
* [cip-dev] [cip-kernel-sec 1/2] remotes: refer to configuration files
@ 2019-06-17  2:20 Daniel Sangorrin
  2019-06-17  2:20 ` [cip-dev] [cip-kernel-sec 2/2] remotes: call _get_configured_remotes Daniel Sangorrin
  2019-06-17 20:15 ` [cip-dev] [cip-kernel-sec 1/2] remotes: refer to configuration files Ben Hutchings
  0 siblings, 2 replies; 6+ messages in thread
From: Daniel Sangorrin @ 2019-06-17  2:20 UTC (permalink / raw)
  To: cip-dev

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

Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
---
 README.md | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index a4f3d45..4c5808f 100644
--- a/README.md
+++ b/README.md
@@ -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
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [cip-dev] [cip-kernel-sec 2/2] remotes: call _get_configured_remotes
  2019-06-17  2:20 [cip-dev] [cip-kernel-sec 1/2] remotes: refer to configuration files Daniel Sangorrin
@ 2019-06-17  2:20 ` Daniel Sangorrin
  2019-06-17 20:16   ` Ben Hutchings
  2019-06-17 20:15 ` [cip-dev] [cip-kernel-sec 1/2] remotes: refer to configuration files Ben Hutchings
  1 sibling, 1 reply; 6+ messages in thread
From: Daniel Sangorrin @ 2019-06-17  2:20 UTC (permalink / raw)
  To: cip-dev

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.

Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
---
 scripts/kernel_sec/branch.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/kernel_sec/branch.py b/scripts/kernel_sec/branch.py
index ae1ca2c..3ede64a 100644
--- a/scripts/kernel_sec/branch.py
+++ b/scripts/kernel_sec/branch.py
@@ -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)
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [cip-dev] [cip-kernel-sec 1/2] remotes: refer to configuration files
  2019-06-17  2:20 [cip-dev] [cip-kernel-sec 1/2] remotes: refer to configuration files Daniel Sangorrin
  2019-06-17  2:20 ` [cip-dev] [cip-kernel-sec 2/2] remotes: call _get_configured_remotes Daniel Sangorrin
@ 2019-06-17 20:15 ` Ben Hutchings
  1 sibling, 0 replies; 6+ messages in thread
From: Ben Hutchings @ 2019-06-17 20:15 UTC (permalink / raw)
  To: cip-dev

On Mon, 2019-06-17 at 11:20 +0900, Daniel Sangorrin wrote:
> 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')
> 
> Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
[...]

Applied, thanks.

Ben.

-- 
Ben Hutchings, Software Developer                ?        Codethink Ltd
https://www.codethink.co.uk/                 Dale House, 35 Dale Street
                                     Manchester, M1 2HF, United Kingdom

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [cip-dev] [cip-kernel-sec 2/2] remotes: call _get_configured_remotes
  2019-06-17  2:20 ` [cip-dev] [cip-kernel-sec 2/2] remotes: call _get_configured_remotes Daniel Sangorrin
@ 2019-06-17 20:16   ` Ben Hutchings
  2019-06-17 23:48     ` daniel.sangorrin at toshiba.co.jp
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Hutchings @ 2019-06-17 20:16 UTC (permalink / raw)
  To: cip-dev

On Mon, 2019-06-17 at 11:20 +0900, Daniel Sangorrin wrote:
> 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.
> 
> Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>

Maybe it would make more sense to merge the two functions instead?

Ben.

> ---
> ?scripts/kernel_sec/branch.py | 2 +-
> ?1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/kernel_sec/branch.py
> b/scripts/kernel_sec/branch.py
> index ae1ca2c..3ede64a 100644
> --- a/scripts/kernel_sec/branch.py
> +++ b/scripts/kernel_sec/branch.py
> @@ -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)
-- 
Ben Hutchings, Software Developer                ?        Codethink Ltd
https://www.codethink.co.uk/                 Dale House, 35 Dale Street
                                     Manchester, M1 2HF, United Kingdom

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [cip-dev] [cip-kernel-sec 2/2] remotes: call _get_configured_remotes
  2019-06-17 20:16   ` Ben Hutchings
@ 2019-06-17 23:48     ` daniel.sangorrin at toshiba.co.jp
  2019-06-18 14:42       ` Ben Hutchings
  0 siblings, 1 reply; 6+ messages in thread
From: daniel.sangorrin at toshiba.co.jp @ 2019-06-17 23:48 UTC (permalink / raw)
  To: cip-dev

> From: Ben Hutchings <ben.hutchings@codethink.co.uk>
> 
> On Mon, 2019-06-17 at 11:20 +0900, Daniel Sangorrin wrote:
> > 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.
> >
> > Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
> 
> 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

> 
> Ben.
> 
> > ---
> > ?scripts/kernel_sec/branch.py | 2 +-
> > ?1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/scripts/kernel_sec/branch.py
> > b/scripts/kernel_sec/branch.py
> > index ae1ca2c..3ede64a 100644
> > --- a/scripts/kernel_sec/branch.py
> > +++ b/scripts/kernel_sec/branch.py
> > @@ -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)
> --
> Ben Hutchings, Software Developer                ?        Codethink Ltd
> https://www.codethink.co.uk/                 Dale House, 35 Dale Street
>                                      Manchester, M1 2HF, United Kingdom

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [cip-dev] [cip-kernel-sec 2/2] remotes: call _get_configured_remotes
  2019-06-17 23:48     ` daniel.sangorrin at toshiba.co.jp
@ 2019-06-18 14:42       ` Ben Hutchings
  0 siblings, 0 replies; 6+ messages in thread
From: Ben Hutchings @ 2019-06-18 14:42 UTC (permalink / raw)
  To: cip-dev

On Mon, 2019-06-17 at 23:48 +0000, daniel.sangorrin at toshiba.co.jp
wrote:
> > From: Ben Hutchings <ben.hutchings@codethink.co.uk>
> > 
> > On Mon, 2019-06-17 at 11:20 +0900, Daniel Sangorrin wrote:
> > > 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.
> > > 
> > > Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
> > 
> > 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.

-- 
Ben Hutchings, Software Developer                ?        Codethink Ltd
https://www.codethink.co.uk/                 Dale House, 35 Dale Street
                                     Manchester, M1 2HF, United Kingdom

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-06-18 14:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-17  2:20 [cip-dev] [cip-kernel-sec 1/2] remotes: refer to configuration files Daniel Sangorrin
2019-06-17  2:20 ` [cip-dev] [cip-kernel-sec 2/2] remotes: call _get_configured_remotes Daniel Sangorrin
2019-06-17 20:16   ` Ben Hutchings
2019-06-17 23:48     ` daniel.sangorrin at toshiba.co.jp
2019-06-18 14:42       ` Ben Hutchings
2019-06-17 20:15 ` [cip-dev] [cip-kernel-sec 1/2] remotes: refer to configuration files Ben Hutchings

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.