summaryrefslogtreecommitdiffstats
path: root/support/scripts/getdeveloperlib.py
diff options
context:
space:
mode:
authorRahul Bedarkar <rahul.bedarkar@imgtec.com>2016-09-22 00:29:14 +0530
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-10-25 12:43:27 +0200
commit1b0df8f23c690d9464d82f4d3e57fe2a334b5d98 (patch)
tree16329f7549de4c949abdb7d9055a80c0794d4f0d /support/scripts/getdeveloperlib.py
parent8513ffee43f473e8134fa48755837722926123b0 (diff)
downloadbuildroot-1b0df8f23c690d9464d82f4d3e57fe2a334b5d98.tar.gz
buildroot-1b0df8f23c690d9464d82f4d3e57fe2a334b5d98.zip
scripts/get-developers: correct type of patches argument
Current type for 'patches' argument is str. It supposed to only contain names of files. If we specify FileType as type, then we don't need to open file ourself and it allows script to read patch from standard input as well. e.g. $ git show -1 | ./support/scripts/get-developers - Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'support/scripts/getdeveloperlib.py')
-rw-r--r--support/scripts/getdeveloperlib.py25
1 files changed, 12 insertions, 13 deletions
diff --git a/support/scripts/getdeveloperlib.py b/support/scripts/getdeveloperlib.py
index 7b390417fc..65191073a3 100644
--- a/support/scripts/getdeveloperlib.py
+++ b/support/scripts/getdeveloperlib.py
@@ -16,19 +16,18 @@ def analyze_patch(patch):
removed by the patch."""
files = set()
infras = set()
- with open(patch, "r") as f:
- for line in f:
- # If the patch is adding a package, find which infra it is
- m = FIND_INFRA_IN_PATCH.match(line)
- if m:
- infras.add(m.group(2))
- if not line.startswith("+++ "):
- continue
- line.strip()
- fname = line[line.find("/") + 1 : ].strip()
- if fname == "dev/null":
- continue
- files.add(fname)
+ for line in patch:
+ # If the patch is adding a package, find which infra it is
+ m = FIND_INFRA_IN_PATCH.match(line)
+ if m:
+ infras.add(m.group(2))
+ if not line.startswith("+++ "):
+ continue
+ line.strip()
+ fname = line[line.find("/") + 1 : ].strip()
+ if fname == "dev/null":
+ continue
+ files.add(fname)
return (files, infras)
FIND_INFRA_IN_MK = re.compile("^\$\(eval \$\((host-)?([^-]*)-package\)\)$")
OpenPOWER on IntegriCloud