GNU bug report logs - #40955
[PATCH 0/5] Add new image API.

Previous Next

Package: guix-patches;

Reported by: Mathieu Othacehe <m.othacehe <at> gmail.com>

Date: Wed, 29 Apr 2020 08:42:01 UTC

Severity: normal

Tags: patch

Done: Mathieu Othacehe <m.othacehe <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mathieu Othacehe <m.othacehe <at> gmail.com>
To: 40955 <at> debbugs.gnu.org
Cc: Mathieu Othacehe <m.othacehe <at> gmail.com>
Subject: [bug#40955] [PATCH 2/5] build: install: Ignore chown exceptions.
Date: Wed, 29 Apr 2020 10:47:53 +0200
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 c0d4d44091..0b0d01cf86 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))
-- 
2.26.0





This bug report was last modified 5 years and 13 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.