X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=fedora.ml;h=79a96780fd75fae0df19cbe79e87c3c28e9160d1;hb=0af7eb8508526f0a6a7a0a80164b9c5380b2783e;hp=7d1d70bfdf3297135467a84809a6e3c520944805;hpb=0d2e46d0e9958d635550bbe3df0a985f129914c0;p=goaljobs-goals.git diff --git a/fedora.ml b/fedora.ml index 7d1d70b..79a9678 100644 --- a/fedora.ml +++ b/fedora.ml @@ -5,11 +5,7 @@ open Printf open Goaljobs -(* Repo dir, etc. *) -let fedora_dir = Sys.getenv "HOME" // "d/fedora" -let fedora_repo pkg branch = fedora_dir // pkg // branch -let fedora_specfile pkg branch = - sprintf "%s/%s.spec" (fedora_repo pkg branch) pkg +open Config (* Get the current version of a package. *) let fedora_verrel pkg branch = @@ -139,18 +135,19 @@ let koji_build = contains_substring "Name or service not known" in let completed_successfully = contains_substring "completed successfully" in let failed = contains_substring "FAILED" in - fun ?(wait = true) pkg branch -> + fun ?(wait = true) ?side_tag pkg branch -> let repodir = fedora_repo pkg branch in let out = shout " cd %s - fedpkg build%s 2>&1 - " repodir (if not wait then " --nowait" else "") + fedpkg build%s%s 2>&1 + " repodir + (if not wait then " --nowait" else "") + (match side_tag with None -> "" | Some t -> " --target " ^ t) in if not wait then ( (* Just check the task was created. *) if not (Pcre.pmatch ~rex:created_task out) then ( - eprintf "%s\n%!" out; failwith "fedpkg build: build failed to start" ) ) else ( @@ -169,7 +166,6 @@ let koji_build = else if completed_successfully out then () else if failed out then ( - eprintf "%s\n%!" out; failwith "koji build failed" ) else