summaryrefslogtreecommitdiff
path: root/scripts/versions.awk
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2016-11-24 22:25:58 +0000
committerJoseph Myers <joseph@codesourcery.com>2016-11-24 22:25:58 +0000
commit02c78f02a941461efa566fed8a0209592b0943fc (patch)
tree424eda074045526f18cc7d7658d08ab3412ea06f /scripts/versions.awk
parentc579f48edba88380635ab98cb612030e3ed8691e (diff)
downloadglibc-02c78f02a941461efa566fed8a0209592b0943fc.tar.gz
Make build-many-glibcs.py track component versions requested and used.
This patch makes build-many-glibcs.py record the component versions checked out, and whether those versions were explicitly requested or defaults, in a file versions.json in the source directory. The preferred version of a component is the first of: one explicitly specified on the command line; one explicitly specified on the command line in a previous run of build-many-glibcs.py; a default version for that component. Thus, once you've run build-many-glibcs.py checkout once with the updated script (making sure to specify the right versions of any components previously checked out with a non-default version), in future you can just run it without version specifiers and it will know when a default-version component has changed its default version and so should be checked out again. Because you might have local changes and not want a default-version component checkout replaced, you need to pass the --replace-sources option to allow the script to delete and replace a component source directory automatically; otherwise, it will give an error if a version has changed. The script does not try to change branches of git or SVN checkouts without checking out from scratch; if the version number requested has changed and --replace-sources is used, the relevant source directory will be removed completely and a new one checked out from scratch. Apart from allowing automatic updates of components with default versions, this also facilitates bots reporting on the versions used in a given build. versions.json contains not just information on the version number and whether that was requested explicitly, but also git or SVN revision information intended to be used in email reports from bots. * scripts/build-many-glibcs.py: Import json module. (Context.__init__): Take replace_sources argument. Load versions.json. (Context.load_versions_json): New function. (Context.store_json): Likewise. (Context.store_versions_json): Likewise. (Context.set_component_version): Likewise. (Context.checkout): Update versions.json. Check for and handle changes of version. Prefer previously explicitly specified version to default version. (Context.checkout_vcs): Return a revision identifier. (Context.git_checkout): Likewise. (Context.gcc_checkout): Likewise. (get_parser): Add --replace-sources option. (main): Pass replace_sources argument to Context call.
Diffstat (limited to 'scripts/versions.awk')
0 files changed, 0 insertions, 0 deletions