guix-commits
[Top][All Lists]
Advanced

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

03/06: build: install: Ignore chown exceptions.


From: guix-commits
Subject: 03/06: build: install: Ignore chown exceptions.
Date: Wed, 29 Apr 2020 04:40:06 -0400 (EDT)

mothacehe pushed a commit to branch wip-disk-image
in repository guix.

commit d8adac45fcf4247cfc834d4fb45a6891f5fa6925
Author: Mathieu Othacehe <address@hidden>
AuthorDate: Tue Apr 28 14:16:33 2020 +0200

    build: install: Ignore chown exceptions.
    
    Changing ownership may require root permissions. As image can now be 
generated
    without root permissions (no VM involved), ignore those exceptions.
    
    * gnu/build/install.scm (evaluate-populate-directive): Ignore chown
    exceptions.
---
 gnu/build/install.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnu/build/install.scm b/gnu/build/install.scm
index c0d4d44..0b0d01c 100644
--- a/gnu/build/install.scm
+++ b/gnu/build/install.scm
@@ -63,7 +63,9 @@ directory TARGET."
           (('directory name uid gid)
            (let ((dir (string-append target name)))
              (mkdir-p dir)
-             (chown dir uid gid)))
+             ;; This will fail if this is not run from a VM, ignore those
+             ;; errors.
+             (false-if-exception (chown dir uid gid))))
           (('directory name uid gid mode)
            (loop `(directory ,name ,uid ,gid))
            (chmod (string-append target name) mode))



reply via email to

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