bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#36443: Canonicalized build directory name in container leads to conf


From: Mark H Weaver
Subject: bug#36443: Canonicalized build directory name in container leads to confusion (was guix build mixes build dirs?)
Date: Sun, 30 Jun 2019 13:59:30 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hi Robert,

Robert Vollmert <address@hidden> writes:
> How about dropping the “-0” suffix inside the container? The major part
> of my confusion was that the directory “-0” actually existed in /tmp
> from a previous failed build; this change might avoid that.

Sounds good to me.  I think that would clearly be an improvement.
See below for an (untested but trivial) patch to make this change.

Ludovic, what do you think?  See <https://bugs.gnu.org/36443> for
context.

     Thanks,
       Mark

--8<---------------cut here---------------start------------->8---
diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
index fe7bf79069..a73f79eed5 100644
--- a/nix/libstore/build.cc
+++ b/nix/libstore/build.cc
@@ -1726,7 +1726,7 @@ void DerivationGoal::startBuilder()
 
     /* In a sandbox, for determinism, always use the same temporary
        directory. */
-    tmpDirInSandbox = useChroot ? canonPath("/tmp", true) + "/guix-build-" + 
drvName + "-0" : tmpDir;
+    tmpDirInSandbox = useChroot ? canonPath("/tmp", true) + "/guix-build-" + 
drvName : tmpDir;
 
     /* For convenience, set an environment pointing to the top build
        directory. */
--8<---------------cut here---------------end--------------->8---





reply via email to

[Prev in Thread] Current Thread [Next in Thread]