summary refs log tree commit diff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-10-09 16:12:15 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-10-09 16:55:22 -0400
commit0fa0e8df60b0b005a8d9499562464c5a66218a5b (patch)
tree8795c4834f05142421a0ad6630014f354923c057
parent7ee4d47d1ad0463f3d0e05505ad49f091101383e (diff)
downloadguix-0fa0e8df60b0b005a8d9499562464c5a66218a5b.tar.gz
nix: Honor '--rounds' when also using '--check'.
Fixes <https://issues.guix.gnu.org/40144>.

Until now, the '--rounds' option, when also using '--check', was ignored.
This change makes it possible to use both, so that an item that has already
been built once can be rebuilt as many times as desired.

* nix/libstore/build.cc: Remove the conditionals causing the daemon to
complete a build task early when 'buildMode' is equal to 'nix::bmCheck'.

Reported-by: Brice Waegeneire <brice@waegenei.re>
-rw-r--r--nix/libstore/build.cc7
1 files changed, 0 insertions, 7 deletions
diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
index ccec513d8d..c894d72bda 100644
--- a/nix/libstore/build.cc
+++ b/nix/libstore/build.cc
@@ -1386,11 +1386,6 @@ void DerivationGoal::buildDone()
            being valid. */
         registerOutputs();
 
-        if (buildMode == bmCheck) {
-            done(BuildResult::Built);
-            return;
-        }
-
         /* Delete unused redirected outputs (when doing hash rewriting). */
         foreach (RedirectedOutputs::iterator, i, redirectedOutputs)
             if (pathExists(i->second)) deletePath(i->second);
@@ -2485,8 +2480,6 @@ void DerivationGoal::registerOutputs()
         infos.push_back(info);
     }
 
-    if (buildMode == bmCheck) return;
-
     /* Compare the result with the previous round, and report which
        path is different, if any.*/
     if (curRound > 1 && prevInfos != infos) {