aboutsummaryrefslogtreecommitdiff
path: root/utils/get-developers
Commit message (Collapse)AuthorAgeFilesLines
* utils/get-developers: make it callable from elsewhere than the toplevel ↵Gravatar Peter Korsgaard2018-10-201-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | directory get-developers tries to open DEVELOPERS in the current directory, so it breaks when calling it from elsewhere than the toplevel Buildroot directory. Traceback (most recent call last): File "../utils/get-developers", line 107, in <module> __main__() File "../utils/get-developers", line 26, in __main__ devs = getdeveloperlib.parse_developers(os.path.dirname() File "/home/peko/source/buildroot/utils/getdeveloperlib.py", line 161, in parse_developers with open(os.path.join(basepath, "DEVELOPERS"), "r") as f: IOError: [Errno 2] No such file or directory: '/home/peko/source/buildroot/output-foo/DEVELOPERS' Fix it by instead figuring out where the DEVELOPERS file is relative to the location of get-developers (E.G. one level up). Signed-off-by: Peter Korsgaard <peter@korsgaard.com> [Arnout: - add realpath to support a symlinked get-developers script; - pass devs_dir argument to check_developers() to support -c in subdir; - convert basepath to absolute path to support -f option. ] Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
* utils/get-developers: fix python 3.x compatibilityGravatar Grégoire Delattre2018-10-121-1/+1
| | | | | | | | | | | | | | | | | | | This fixes a syntax error introduced in bcf2ed5cc3. Output before the patch: $ ./utils/get-developers outgoing/* File "./utils/get-developers", line 97 print dev ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(dev)? Output after the patch: $ ./utils/get-developers outgoing/* git send-email --to buildroot@buildroot.org Signed-off-by: Grégoire Delattre <gregoire.delattre@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* utils/get-developers: add -e flag to only list email addresses for git ↵Gravatar Peter Korsgaard2018-10-081-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | send-email When called with a list of patches, get-developers prints the entire git send-email invocation line: ./utils/get-developers 0001-git-security-bump-to-version-2.16.5.patch git send-email --to buildroot@buildroot.org --cc "Matt Weber <matthew.weber@rockwellcollins.com>" This may be handy when creating an entire patch series and editing a cover letter, but it does mean that this has to be explicitly executed and get-developers cannot be used directly by the --cc-cmd option of git send-email to automatically CC affected developers. So add an -e flag to only let get-developers print the email addresses of the affected developers in the one-email-per-line format expected by git send-email, similar to how get_maintainer.pl works in the Linux kernel. With this and a suitable git configuration: git config sendemail.to buildroot@buildroot.org git config sendemail.ccCmd "$(pwd)/utils/get-developers -e" You can simply do: git send-email master To automatically mail the buildroot list and CC affected developers on patches. Signed-off-by: Peter Korsgaard <peter@korsgaard.com> Acked-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* get-developers: fix code styleGravatar Ricardo Martincoski2018-01-291-1/+3
| | | | | | | | | | | | | | | | Fix these warnings: E202 whitespace before ']' E203 whitespace before ':' E302 expected 2 blank lines, found 1 E305 expected 2 blank lines after class or function definition, found 1 E711 comparison to None should be 'if cond is None:' E741 ambiguous variable name 'l' F401 'sys' imported but unused W391 blank line at end of file Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* get-developers: add option to get developers for filesGravatar Arnout Vandecappelle2017-08-141-0/+15
| | | | | | | | | | | | | | | | | | | | The DEVELOPERS file lists file patterns, but the get-developers script only supports getting packages and CPU architectures. Some files are neither of those, e.g. defconfigs, support files, package infras, ... Add a '-f' option that allows to give a list of files for which to get the developer(s). Note that the DEVELOPERS file contains directories as well as files, and the directories are not expanded into individual files. Therefore, we have to use f.startswith(devfile) to match a directory. This assumes that the directory name ends with /, otherwise 'package/python' would also match 'package/python-foo'. Since we make sure that directories do end with / in the DEVELOPERS file, and since false positives are not much of an issue in this case, this isn't a problem. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* get-developers: fix handling of syntax errorGravatar Arnout Vandecappelle2017-07-011-0/+1
| | | | | | | | When getdeveloperlib.parse_developers doesn't find anything, the script tries sys.exit(1) but sys is not imported. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* tools: rename to 'utils'Gravatar Thomas Petazzoni2017-07-011-0/+83
After some discussion, we found out that "tools" has the four first letters identical to the "toolchain" subfolder, which makes it a bit unpractical with tab-completion. So, this commit renames "tools" to "utils", which is more tab-completion-friendly. This has been discussed with Arnout and Yann. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>