src/Pure/Admin/build_history.scala
changeset 77132 53ce5a39c987
parent 77131 c8d34e74a12b
child 77207 d98a99e4eea9
equal deleted inserted replaced
77131:c8d34e74a12b 77132:53ce5a39c987
   528   def remote_build(
   528   def remote_build(
   529     ssh: SSH.Session,
   529     ssh: SSH.Session,
   530     isabelle_self: Path,
   530     isabelle_self: Path,
   531     isabelle_other: Path,
   531     isabelle_other: Path,
   532     isabelle_identifier: String = "remote_build_history",
   532     isabelle_identifier: String = "remote_build_history",
       
   533     component_repository: String = Components.static_component_repository,
       
   534     components_base: String = Components.dynamic_components_base,
   533     clean_platform: Boolean = false,
   535     clean_platform: Boolean = false,
   534     clean_archives: Boolean = false,
   536     clean_archives: Boolean = false,
   535     progress: Progress = new Progress,
   537     progress: Progress = new Progress,
   536     protect_args: Boolean = false,
   538     protect_args: Boolean = false,
   537     rev: String = "",
   539     rev: String = "",
   558 
   560 
   559     val self_isabelle =
   561     val self_isabelle =
   560       Other_Isabelle(isabelle_self, isabelle_identifier = isabelle_identifier,
   562       Other_Isabelle(isabelle_self, isabelle_identifier = isabelle_identifier,
   561         ssh = ssh, progress = progress)
   563         ssh = ssh, progress = progress)
   562 
   564 
   563     self_isabelle.init(fresh = true, echo = true)
   565     val clean_platforms = if (clean_platform) Some(List(ssh.isabelle_platform_family)) else None
       
   566 
       
   567     self_isabelle.init(fresh = true, echo = true,
       
   568       component_repository = component_repository,
       
   569       other_settings = self_isabelle.init_components(components_base = components_base),
       
   570       clean_platforms = clean_platforms,
       
   571       clean_archives = clean_archives)
   564 
   572 
   565     sync(isabelle_other, accurate = true,
   573     sync(isabelle_other, accurate = true,
   566       rev = proper_string(rev) getOrElse "tip",
   574       rev = proper_string(rev) getOrElse "tip",
   567       afp_rev = proper_string(afp_rev) getOrElse "tip",
   575       afp_rev = proper_string(afp_rev) getOrElse "tip",
   568       afp = true)
   576       afp = true)
   576         val output_file = tmp_dir + Path.explode("output")
   584         val output_file = tmp_dir + Path.explode("output")
   577         val build_options = (if (afp_repos.isEmpty) "" else " -A") + " " + options
   585         val build_options = (if (afp_repos.isEmpty) "" else " -A") + " " + options
   578         try {
   586         try {
   579           val script =
   587           val script =
   580             ssh.bash_path(Path.explode("Admin/build_other")) +
   588             ssh.bash_path(Path.explode("Admin/build_other")) +
   581               (if (clean_platform)
   589               " -R " + Bash.string(component_repository) +
   582                 " -O " + Bash.string(ssh.isabelle_platform.ISABELLE_PLATFORM_FAMILY)
   590               " -C " + Bash.string(components_base) +
   583                else "") +
   591               (clean_platforms match {
       
   592                 case Some(ps) => " -O " + Bash.string(ps.mkString(","))
       
   593                 case None => ""
       
   594               }) +
   584               (if (clean_archives) " -Q" else "") +
   595               (if (clean_archives) " -Q" else "") +
   585               " -o " + ssh.bash_path(output_file) + build_options + " " +
   596               " -o " + ssh.bash_path(output_file) + build_options + " " +
   586               ssh.bash_path(isabelle_other) + " " + args
   597               ssh.bash_path(isabelle_other) + " " + args
   587           self_isabelle.bash(script, echo = true, strict = false).check
   598           self_isabelle.bash(script, echo = true, strict = false).check
   588         }
   599         }