aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/msubprojects.py
AgeCommit message (Collapse)AuthorFilesLines
2020-03-03Cherry-picking - (rm python2 % add python3 .format) (#6725)Michael Brockus1-5/+5
2020-02-20msubprojects: We return a string from git() nowNirbheek Chauhan1-4/+4
Fixes https://github.com/mesonbuild/meson/issues/6651
2020-01-22Move git helper out into mesonlib for reuseNirbheek Chauhan1-7/+3
Reuse the git helper for `meson wrap` and `meson subprojects` so we don't need to maintain the same git-colors-on-windows workarounds in multiple places.
2020-01-22msubprojects: Rename 'git' to 'git_output'Nirbheek Chauhan1-10/+10
No functional changes. Split out from the next commit for ease of reading.
2019-12-05Fix 'meson subprojects foreach' when command returns non-zero exit codeAntonio Ospite1-4/+10
The 'output' field of the subprocess.CalledProcessError exception is valid only when subprocess.check_output() is called, trying to access it after calling subprocess.check_call() results in an unwanted exception when commands return non-zero exit code, e.g.: ----------------------------------------------------------------------- $ meson subprojects foreach false Executing command in ./subprojects/sqlite-amalgamation-3250100 -> Not downloaded yet Executing command in ./subprojects/gstreamer Traceback (most recent call last): File "/home/ao2/meson/meson/mesonbuild/msubprojects.py", line 177, in foreach subprocess.check_call([options.command] + options.args, cwd=repo_dir) File "/usr/lib/python3.7/subprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['false']' returned non-zero exit status 1. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/ao2/meson/meson/mesonbuild/mesonmain.py", line 129, in run return options.run_func(options) File "/home/ao2/meson/meson/mesonbuild/msubprojects.py", line 248, in run options.subprojects_func(wrap, repo_dir, options) File "/home/ao2/meson/meson/mesonbuild/msubprojects.py", line 180, in foreach out = e.output.decode().strip() AttributeError: 'NoneType' object has no attribute 'decode' ----------------------------------------------------------------------- Use subprocess.check_output() instead and behave more like git commands in handling stderr. This makes it possible to actually run commands on all subprojects allowing them to fail on some subprojects and succeed on others. Also catch the case of missing commands and print an error message in this case as well.
2019-11-28wrap: Redirect stdin to DEVNULL (again)Nirbheek Chauhan1-0/+4
Same fix as e7b25018c4715e538234d4ba51e32194b4757388, was accidentally missed when this code was rewritten.
2019-06-06cmake: moved subprojects into the CMake moduleDaniel Mensinger1-1/+1
2019-06-03subproject: fix update_svnMarkus Theil1-1/+1
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
2019-04-01Add 'meson subprojects foreach' commandAntonio Ospite1-7/+30
Sometimes it is convenient to run an arbitrary command (e.g. 'git diff') on all subprojects. Add a 'meson subprojects foreach' command to take care of that. For this command the common argument 'subprojects' does not make sense, so only add '--sourcedir' and cover the case of a missing options.subprojects in run().
2019-03-11Fix git wraps with submodulesAndrei Alexeyev1-1/+1
* If clone-recursive is specified, populate submodules only after the specified revision/branch has been checked out. Fixes #4996 * Update submodules recursively on `meson subprojects update`
2018-12-02Add 'meson subprojects download' commandXavier Claessens1-1/+19
2018-12-02Add 'meson subprojects checkout' commandXavier Claessens1-32/+61
2018-12-02Add 'meson subprojects update' commandXavier Claessens1-0/+179
This is inspired by gst-build's git-update script.