git-update: try updating cargo deps
May prevent build errors if a newer version gstreamer-rs or gst-plugins-rs depend on an updated version of a git dependency.
This commit is contained in:
parent
20fc4b92b8
commit
1e8cdbf137
19
git-update
19
git-update
@ -117,6 +117,23 @@ def update_repo(repo_name, repo_dir, revision, no_interaction, fetch_args=[], re
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
# Update gst-plugins-rs dependencies
|
||||||
|
def update_cargo(build_dir):
|
||||||
|
cargo_toml = os.path.join('subprojects', 'gst-plugins-rs', 'Cargo.toml')
|
||||||
|
if not os.path.exists(cargo_toml):
|
||||||
|
return True
|
||||||
|
|
||||||
|
cmd = ['cargo', 'update', '--manifest-path', cargo_toml]
|
||||||
|
|
||||||
|
try:
|
||||||
|
ret = subprocess.run(cmd)
|
||||||
|
except FileNotFoundError:
|
||||||
|
# silenty ignore if cargo isn't installed
|
||||||
|
return False
|
||||||
|
|
||||||
|
return ret == 0
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
parser = argparse.ArgumentParser(prog="git-update")
|
parser = argparse.ArgumentParser(prog="git-update")
|
||||||
|
|
||||||
@ -157,6 +174,8 @@ if __name__ == "__main__":
|
|||||||
if not update_subprojects(repos_commits, options.no_interaction):
|
if not update_subprojects(repos_commits, options.no_interaction):
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
|
update_cargo(options.builddir)
|
||||||
|
|
||||||
if options.builddir:
|
if options.builddir:
|
||||||
ninja = accept_command(["ninja", "ninja-build"])
|
ninja = accept_command(["ninja", "ninja-build"])
|
||||||
if not ninja:
|
if not ninja:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user