libguestfs: Make sure timestamps aren't changed on the builder templates.
[goaljobs-goals.git] / libguestfs_upstream.ml
index a3d558f..215772c 100644 (file)
@@ -90,6 +90,9 @@ and website_built version =
     chmod +x localconfigure
     echo %s > localenv
 
+    # Copy in the builder/website templates.
+    cp -a $HOME/d/libguestfs/builder/website/*.xz builder/website/
+
     ./localconfigure
     make
     make website
@@ -129,8 +132,9 @@ and tarball_created version =
   let filename = sprintf "%s/tarballs/%s" buildtmp version.tarball in
   target (file_exists filename);
 
+  require (repo_up_to_date version.branch);
+
   let repodir = sprintf "%s/repos/%s-%s" buildtmp package version.branch in
-  require (directory_exists repodir);
 
   sh "
     cp -a %s libguestfs
@@ -163,8 +167,9 @@ and commit_tested branch commit =
   target (memory_exists key);
   onrun (fun () -> memory_set key "1");
 
+  require (repo_up_to_date branch);
+
   let repodir = sprintf "%s/repos/%s-%s" buildtmp package branch in
-  require (directory_exists repodir);
 
   sh "
     cp -a %s libguestfs
@@ -183,11 +188,14 @@ and commit_tested branch commit =
     (quote (libguestfs_localconfigure `Git))
     (quote libguestfs_localenv)
 
+and repo_up_to_date branch =
+  git_force branch
+
 let () =
   (* Add a periodic job to check for new git commits and test them. *)
   every libguestfs_query_mins minutes ~name:"new libguestfs commit" (
     fun () ->
-      git_force "master";
+      require (repo_up_to_date "master");
       let commit = git_latest_commit "master" in
       require (commit_tested "master" commit);
   );
@@ -195,7 +203,7 @@ let () =
   (* Periodic job to build new tarballs. *)
   every libguestfs_query_mins minutes ~name:"new libguestfs version" (
     fun () ->
-      git_force "master";
+      require (repo_up_to_date "master");
       let version = git_latest_version "master" in
       require (website_updated version)
   )