This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH BuildBot] Discard all glibc source changes from slaves

Note 1:
I'm trying to fix what's happening with our ppc64 and x86_64 slaves

Note 2:
As this is changing the source code of the build master, I can't test it


This is fixing 2 issues:
 - If glibc source code get changed in the slave, the next build will not
   run against an identical code from the master branch.
 - There is also a change that a new build gets into the master branch
   after the build master checked the source code.  In that scenario,
   the slave would build a commit ID that is not identical to the one
   specified by the build master.
 scripts/master/ | 3 +++
 scripts/slave/      | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/master/ b/scripts/master/
index bd9f924..a3b04c5 100644
--- a/scripts/master/
+++ b/scripts/master/
@@ -46,6 +46,9 @@ def getGlibcAnnotatedFactory(
     selector_script = os.path.join('..', 'glibc-buildbot',
                                    'scripts', 'slave', '')
+    # Export the commit ID to be built.
+    merged_env['REVISION'] = util.Property('revision')
     # Run annotated command.
diff --git a/scripts/slave/ b/scripts/slave/
index 3759011..e455989 100755
--- a/scripts/slave/
+++ b/scripts/slave/
@@ -40,7 +40,8 @@ end_step() {
 do_sync() {
   start_step sync
   if [ -d "${src_dir}" ]; then
-    (cd "${src_dir}" && git remote prune origin && git pull)
+    # Discard everything and get the commit specified by the build master.
+    (cd "${src_dir}" && git fetch -p origin && git reset --hard $REVISION)
     git clone git:// ${src_dir}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]