diff options
Diffstat (limited to 'guix/scripts')
-rw-r--r-- | guix/scripts/environment.scm | 10 | ||||
-rw-r--r-- | guix/scripts/pack.scm | 8 | ||||
-rw-r--r-- | guix/scripts/size.scm | 14 | ||||
-rw-r--r-- | guix/scripts/system.scm | 3 |
4 files changed, 22 insertions, 13 deletions
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index c27edc7982..99c351ae43 100644 --- a/guix/scripts/environment.scm +++ b/guix/scripts/environment.scm @@ -192,7 +192,7 @@ COMMAND or an interactive shell in that environment.\n")) (print-extended-build-trace? . #t) (multiplexed-build-output? . #t) (debug . 0) - (verbosity . 2))) + (verbosity . 1))) (define (tag-package-arg opts arg) "Return a two-element list with the form (TAG ARG) that tags ARG with either @@ -459,17 +459,19 @@ will be used for the passwd entry. LINK-PROFILE? creates a symbolic link from (return (let* ((cwd (getcwd)) (home (getenv "HOME")) + (uid (if user 1000 (getuid))) + (gid (if user 1000 (getgid))) (passwd (let ((pwd (getpwuid (getuid)))) (password-entry (name (or user (passwd:name pwd))) (real-name (if user "" (passwd:gecos pwd))) - (uid 0) (gid 0) (shell bash) + (uid uid) (gid gid) (shell bash) (directory (if user (string-append "/home/" user) (passwd:dir pwd)))))) - (groups (list (group-entry (name "users") (gid 0)) + (groups (list (group-entry (name "users") (gid gid)) (group-entry (gid 65534) ;the overflow GID (name "overflow")))) (home-dir (password-entry-directory passwd)) @@ -541,6 +543,8 @@ will be used for the passwd entry. LINK-PROFILE? creates a symbolic link from ;; A container's environment is already purified, so no need to ;; request it be purified again. (launch-environment command profile manifest #:pure? #f))) + #:guest-uid uid + #:guest-gid gid #:namespaces (if network? (delq 'net %namespaces) ; share host network %namespaces))))))) diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index e5502ef9ca..b1d1e87c57 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -126,13 +126,9 @@ dependencies are registered." (define build (with-extensions gcrypt-sqlite3&co - ;; XXX: Adding (gnu build install) just to work around - ;; <https://bugs.gnu.org/15602>: that way, (guix build store-copy) is - ;; copied last and the 'store-info-XXX' macros are correctly expanded. (with-imported-modules (source-module-closure '((guix build store-copy) - (guix store database) - (gnu build install))) + (guix store database))) #~(begin (use-modules (guix store database) (guix build store-copy) @@ -633,7 +629,7 @@ please email '~a'~%") (print-extended-build-trace? . #t) (multiplexed-build-output? . #t) (debug . 0) - (verbosity . 2) + (verbosity . 1) (symlinks . ()) (compressor . ,(first %compressors)))) diff --git a/guix/scripts/size.scm b/guix/scripts/size.scm index 25218a2945..f549ce05b8 100644 --- a/guix/scripts/size.scm +++ b/guix/scripts/size.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -34,6 +34,7 @@ #:use-module (srfi srfi-37) #:use-module (ice-9 match) #:use-module (ice-9 format) + #:use-module (ice-9 vlist) #:export (profile? profile-file profile-self-size @@ -142,11 +143,20 @@ profile of ITEMS and their requisites." (lambda (size) (return (cons item size))))) refs))) + (define size-table + (fold (lambda (pair result) + (match pair + ((item . size) + (vhash-cons item size result)))) + vlist-null sizes)) + (define (dependency-size item) (mlet %store-monad ((deps (requisites* (list item)))) (foldm %store-monad (lambda (item total) - (return (+ (assoc-ref sizes item) total))) + (return (+ (match (vhash-assoc item size-table) + ((_ . size) size)) + total))) 0 (delete-duplicates (cons item deps))))) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 97508f4bd6..78aa6cf644 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -1299,8 +1299,7 @@ argument list and OPTS is the option alist." (command (assoc-ref opts 'action))) (parameterize ((%graft? (assoc-ref opts 'graft?))) (with-status-verbosity (or (assoc-ref opts 'verbosity) - (if (memq command '(init reconfigure)) - 1 2)) + (if (eq? command 'build) 2 1)) (process-command command args opts)))))) ;;; Local Variables: |