From cba363bea8b93d367d0e64e94a8b31ef91707329 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org>
Date: Fri, 24 May 2013 23:14:19 +0200
Subject: [PATCH] package: Fix default profile ownership check when it's just
 been created.

* guix/scripts/package.scm (guix-package)[ensure-default-profile]: Check
  whether S is true before checking its owner.  Fixes the case where we
  built %PROFILE-DIRECTORY just above.
---
 guix/scripts/package.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index e68d0dd9028..cd93cc37582 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -644,7 +644,7 @@ (define (rtfm)
             (rtfm))))
 
       ;; Bail out if it's not owned by the user.
-      (unless (= (stat:uid s) (getuid))
+      (unless (or (not s) (= (stat:uid s) (getuid)))
         (format (current-error-port)
                 (_ "error: directory `~a' is not owned by you~%")
                 %profile-directory)
-- 
GitLab