- target (file_contains_string specfile rebuild_name &&
- koji_build_state (fedora_verrel pkg branch) == `Complete);
-
- (* Start the rebuild. *)
- require (rebuild_started pkg);
-
- (* Wait for the build state to reach a conclusion. *)
- let rec loop () =
- match koji_build_state (fedora_verrel pkg branch) with
- | `No_such_build ->
- failwith (sprintf "rebuild of package %s: no build found" pkg)
- | `Building ->
- sleep 60;
- loop ()
- | `Complete ->
- ()
- | `Deleted ->
- failwith (sprintf "rebuild of package %s: deleted" pkg)
- | `Failed ->
- failwith (sprintf "rebuild of package %s: failed" pkg)
- | `Canceled ->
- failwith (sprintf "rebuild of package %s: canceled" pkg)
- in
- loop ();
-
- (* Wait for the build to appear in Koji repo. *)
- koji_wait_repo koji_target (fedora_verrel pkg branch)
+ target (ignored pkg ||
+ (file_contains_string specfile rebuild_name &&
+ koji_build_state (fedora_verrel pkg branch) == `Complete));
+
+ (* Ignored packages are treated as if they have been rebuilt. *)
+ if not (ignored pkg) then (
+
+ (* Start the rebuild. *)
+ require (rebuild_started pkg);
+
+ (* Wait for the build state to reach a conclusion. *)
+ let rec loop () =
+ match koji_build_state (fedora_verrel pkg branch) with
+ | `No_such_build ->
+ failwith (sprintf "rebuild of package %s: no build found" pkg)
+ | `Building ->
+ sleep 60;
+ loop ()
+ | `Complete ->
+ ()
+ | `Deleted ->
+ failwith (sprintf "rebuild of package %s: deleted" pkg)
+ | `Failed ->
+ failwith (sprintf "rebuild of package %s: failed" pkg)
+ | `Canceled ->
+ failwith (sprintf "rebuild of package %s: canceled" pkg)
+ in
+ loop ();
+
+ (* Wait for the build to appear in Koji repo. *)
+ koji_wait_repo koji_target (fedora_verrel pkg branch)
+ )