All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] utils/getdeveloperlib.py: reduce Cc: list based on package infras
@ 2021-02-10  8:01 Thomas Petazzoni
  2021-02-10 21:11 ` Yann E. MORIN
  2021-02-11 20:56 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2021-02-10  8:01 UTC (permalink / raw)
  To: buildroot

When a developer has package/pkg-<infra>.mk assigned to him/her in the
DEVELOPERS file, this has 3 implications:

 (1) Patches adding new packages using this infrastructure are Cc'ed
     to this developer. This is done by the analyze_patch() function,
     which matches the regexp r"^\+\$\(eval
     \$\((host-)?([^-]*)-package\)\)$" in the patch, i.e where an
     added line contains a reference to the infra maintained by the
     developer.

 (2) Patches touching the package/pkg-<infra>.mk file itself are Cc'ed
     to this developer.

 (3) Any patch touching a package using this infra are also Cc'ed to
     this developer.

Point (3) causes a significant amount of patches to be sent to
developers who have package/pkg-generic.mk and
package/pkg-autotools.mk assigned to them in the DEVELOPERS
file. Basically, all patches touching generic or autotools packages
get CC'ed to such developers, which causes a massive amount of patches
to be received.

So this patch adjusts the getdeveloperlib.py to drop point (3), but
preserves point (1) and (2). Indeed, it makes sense to be Cc'ed on new
package additions (to make a review that they use the package
infrastructure correctly), and it makes sense to be Cc'ed on patches
that touch the infrastructure code itself.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 utils/getdeveloperlib.py | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/utils/getdeveloperlib.py b/utils/getdeveloperlib.py
index d7a90457ed..b205817033 100644
--- a/utils/getdeveloperlib.py
+++ b/utils/getdeveloperlib.py
@@ -56,17 +56,6 @@ def fname_get_package_infra(fname):
     return None
 
 
-def get_infras(files):
-    """Search in the list of files for .mk files, and collect the package
-    infrastructures used by those .mk files."""
-    infras = set()
-    for fname in files:
-        infra = fname_get_package_infra(fname)
-        if infra:
-            infras.add(infra)
-    return infras
-
-
 def analyze_patches(patches):
     """Parse a list of patches and returns the list of files modified,
     added or removed by the patches, as well as the list of package
@@ -77,7 +66,6 @@ def analyze_patches(patches):
         (files, infras) = analyze_patch(patch)
         allfiles = allfiles | files
         allinfras = allinfras | infras
-    allinfras = allinfras | get_infras(allfiles)
     return (allfiles, allinfras)
 
 
-- 
2.29.2

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

* [Buildroot] [PATCH] utils/getdeveloperlib.py: reduce Cc: list based on package infras
  2021-02-10  8:01 [Buildroot] [PATCH] utils/getdeveloperlib.py: reduce Cc: list based on package infras Thomas Petazzoni
@ 2021-02-10 21:11 ` Yann E. MORIN
  2021-02-11 20:56 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2021-02-10 21:11 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2021-02-10 09:01 +0100, Thomas Petazzoni spake thusly:
> When a developer has package/pkg-<infra>.mk assigned to him/her in the
> DEVELOPERS file, this has 3 implications:
> 
>  (1) Patches adding new packages using this infrastructure are Cc'ed
>      to this developer. This is done by the analyze_patch() function,
>      which matches the regexp r"^\+\$\(eval
>      \$\((host-)?([^-]*)-package\)\)$" in the patch, i.e where an
>      added line contains a reference to the infra maintained by the
>      developer.
> 
>  (2) Patches touching the package/pkg-<infra>.mk file itself are Cc'ed
>      to this developer.
> 
>  (3) Any patch touching a package using this infra are also Cc'ed to
>      this developer.
> 
> Point (3) causes a significant amount of patches to be sent to
> developers who have package/pkg-generic.mk and
> package/pkg-autotools.mk assigned to them in the DEVELOPERS
> file. Basically, all patches touching generic or autotools packages
> get CC'ed to such developers, which causes a massive amount of patches
> to be received.
> 
> So this patch adjusts the getdeveloperlib.py to drop point (3), but
> preserves point (1) and (2). Indeed, it makes sense to be Cc'ed on new
> package additions (to make a review that they use the package
> infrastructure correctly), and it makes sense to be Cc'ed on patches
> that touch the infrastructure code itself.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

I considered that to be an actual fix, so I applied to master. Thanks.

Regards,
Yann E. MORIN.

> ---
>  utils/getdeveloperlib.py | 12 ------------
>  1 file changed, 12 deletions(-)
> 
> diff --git a/utils/getdeveloperlib.py b/utils/getdeveloperlib.py
> index d7a90457ed..b205817033 100644
> --- a/utils/getdeveloperlib.py
> +++ b/utils/getdeveloperlib.py
> @@ -56,17 +56,6 @@ def fname_get_package_infra(fname):
>      return None
>  
>  
> -def get_infras(files):
> -    """Search in the list of files for .mk files, and collect the package
> -    infrastructures used by those .mk files."""
> -    infras = set()
> -    for fname in files:
> -        infra = fname_get_package_infra(fname)
> -        if infra:
> -            infras.add(infra)
> -    return infras
> -
> -
>  def analyze_patches(patches):
>      """Parse a list of patches and returns the list of files modified,
>      added or removed by the patches, as well as the list of package
> @@ -77,7 +66,6 @@ def analyze_patches(patches):
>          (files, infras) = analyze_patch(patch)
>          allfiles = allfiles | files
>          allinfras = allinfras | infras
> -    allinfras = allinfras | get_infras(allfiles)
>      return (allfiles, allinfras)
>  
>  
> -- 
> 2.29.2
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH] utils/getdeveloperlib.py: reduce Cc: list based on package infras
  2021-02-10  8:01 [Buildroot] [PATCH] utils/getdeveloperlib.py: reduce Cc: list based on package infras Thomas Petazzoni
  2021-02-10 21:11 ` Yann E. MORIN
@ 2021-02-11 20:56 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2021-02-11 20:56 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:

 > When a developer has package/pkg-<infra>.mk assigned to him/her in the
 > DEVELOPERS file, this has 3 implications:

 >  (1) Patches adding new packages using this infrastructure are Cc'ed
 >      to this developer. This is done by the analyze_patch() function,
 >      which matches the regexp r"^\+\$\(eval
 >      \$\((host-)?([^-]*)-package\)\)$" in the patch, i.e where an
 >      added line contains a reference to the infra maintained by the
 >      developer.

 >  (2) Patches touching the package/pkg-<infra>.mk file itself are Cc'ed
 >      to this developer.

 >  (3) Any patch touching a package using this infra are also Cc'ed to
 >      this developer.

 > Point (3) causes a significant amount of patches to be sent to
 > developers who have package/pkg-generic.mk and
 > package/pkg-autotools.mk assigned to them in the DEVELOPERS
 > file. Basically, all patches touching generic or autotools packages
 > get CC'ed to such developers, which causes a massive amount of patches
 > to be received.

 > So this patch adjusts the getdeveloperlib.py to drop point (3), but
 > preserves point (1) and (2). Indeed, it makes sense to be Cc'ed on new
 > package additions (to make a review that they use the package
 > infrastructure correctly), and it makes sense to be Cc'ed on patches
 > that touch the infrastructure code itself.

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Committed to 2020.02.x and 2020.11.x, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2021-02-11 20:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-10  8:01 [Buildroot] [PATCH] utils/getdeveloperlib.py: reduce Cc: list based on package infras Thomas Petazzoni
2021-02-10 21:11 ` Yann E. MORIN
2021-02-11 20:56 ` Peter Korsgaard

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.