From 91cc37a1e3e0554ee95ceff96250fb65c63ea3bd Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Sat, 6 Sep 2014 18:00:45 +0400 Subject: emacs: Improve key bindings for marking the packages. Use "U" to upgrade the current package, "^" to upgrade all. * emacs/guix-list.el: (guix-list-unmark): With prefix, mark all. (guix-package-list-mark-outputs): New procedure. (guix-package-list-mark-install, guix-package-list-mark-delete) (guix-package-list-mark-upgrade): Use it. (guix-package-list-mark-upgrades): New command. * doc/emacs.texi (emacs List buffer): Update the manual accordingly. --- doc/emacs.texi | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/emacs.texi b/doc/emacs.texi index 55feb1bf9f..7616c8f92d 100644 --- a/doc/emacs.texi +++ b/doc/emacs.texi @@ -163,11 +163,9 @@ Mark the current entry. @item M Mark all entries. @item u -Unmark the current entry. +Unmark the current entry (with prefix, unmark all entries). @item @key{DEL} Unmark backward. -@item U -Unmark all entries. @item S Sort entries by a specified column. @end table @@ -179,12 +177,16 @@ A ``package-list'' buffer additionally provides the following bindings: Describe marked packages (display available information in a ``package-info'' buffer). @item i -Mark a package for installation (with prefix, prompt for output(s) to -install). +Mark "out" of the current package for installation (with prefix, prompt +for output(s) to install). @item d -Mark a package for deletion. +Mark all installed outputs of the current package for deletion (with +prefix, prompt for output(s) to delete). +@item U +Mark all installed outputs of the current package for upgrading (with +prefix, prompt for output(s) to upgrade). @item ^ -Mark a package for upgrading. +Mark all obsolete packages for upgrading. @item x Execute actions on marked packages. @end table -- cgit 1.4.1 From df650fa84e15bfd65245adcd454c0433ad8c6121 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 8 Sep 2014 23:27:40 +0200 Subject: linux-initrd: Remove #:to-copy argument of 'expression->initrd'. * gnu/system/linux-initrd.scm (expression->initrd): Remove #:to-copy parameter. Remove 'graph-files', and adjust #:references-graphs arguments to just list INIT. (base-initrd): Remove #:to-copy argument. * doc/guix.texi (Initial RAM Disk): Adjust accordingly. --- doc/guix.texi | 10 +++++----- gnu/system/linux-initrd.scm | 19 +++++-------------- 2 files changed, 10 insertions(+), 19 deletions(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index e0251f5ffd..1e8a55e9a5 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -3616,16 +3616,16 @@ program to run in that initrd. @deffn {Monadic Procedure} expression->initrd @var{exp} @ [#:guile %guile-static-stripped] [#:name "guile-initrd"] @ - [#:modules '()] [#:to-copy '()] [#:linux #f] @ + [#:modules '()] [#:linux #f] @ [#:linux-modules '()] Return a derivation that builds a Linux initrd (a gzipped cpio archive) containing @var{guile} and that evaluates @var{exp}, a G-expression, -upon booting. +upon booting. All the derivations referenced by @var{exp} are +automatically copied to the initrd. @var{linux-modules} is a list of @file{.ko} file names to be copied from -@var{linux} into the initrd. @var{to-copy} is a list of additional -derivations or packages to copy to the initrd. @var{modules} is a list -of Guile module names to be embedded in the initrd. +@var{linux} into the initrd. @var{modules} is a list of Guile module +names to be embedded in the initrd. @end deffn @node Invoking guix system diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm index c2c8722ebb..03ac24d450 100644 --- a/gnu/system/linux-initrd.scm +++ b/gnu/system/linux-initrd.scm @@ -54,15 +54,14 @@ (name "guile-initrd") (system (%current-system)) (modules '()) - (to-copy '()) (linux #f) (linux-modules '())) "Return a derivation that builds a Linux initrd (a gzipped cpio archive) -containing GUILE and that evaluates EXP, a G-expression, upon booting. +containing GUILE and that evaluates EXP, a G-expression, upon booting. All +the derivations referenced by EXP are automatically copied to the initrd. LINUX-MODULES is a list of '.ko' file names to be copied from LINUX into the -initrd. TO-COPY is a list of additional derivations or packages to copy to -the initrd. MODULES is a list of Guile module names to be embedded in the +initrd. MODULES is a list of Guile module names to be embedded in the initrd." ;; General Linux overview in `Documentation/early-userspace/README' and @@ -71,15 +70,8 @@ initrd." (mlet* %store-monad ((init (gexp->script "init" exp #:modules modules #:guile guile)) - (to-copy -> (cons init to-copy)) (module-dir (flat-linux-module-directory linux linux-modules))) - (define graph-files - (unfold-right zero? - number->string - 1- - (length to-copy))) - (define builder #~(begin (use-modules (gnu build linux-initrd)) @@ -88,7 +80,7 @@ initrd." (build-initrd (string-append #$output "/initrd") #:guile #$guile #:init #$init - #:references-graphs '#$graph-files + #:references-graphs '("closure") #:linux-module-directory #$module-dir #:cpio (string-append #$cpio "/bin/cpio") #:gzip (string-append #$gzip "/bin/gzip")))) @@ -97,7 +89,7 @@ initrd." #:modules '((guix build utils) (guix build store-copy) (gnu build linux-initrd)) - #:references-graphs (zip graph-files to-copy)))) + #:references-graphs `(("closure" ,init))))) (define (flat-linux-module-directory linux modules) "Return a flat directory containing the Linux kernel modules listed in @@ -229,7 +221,6 @@ exception and backtrace!)." #:modules '((guix build utils) (gnu build linux-boot) (gnu build file-systems)) - #:to-copy helper-packages #:linux linux-libre #:linux-modules linux-modules)) -- cgit 1.4.1 From 42d10464bedb43a9211d8bc187e668fe33272368 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 8 Sep 2014 23:46:48 +0200 Subject: linux-initrd: Store Linux modules in a normal store directory. * gnu/system/linux-initrd.scm (expression->initrd): Remove #:linux and #:linux-modules parameters. Remove call to 'float-linux-module-directory'. (base-initrd): Add call to 'float-linux-module-directory'. Use it in #:linux-modules argument in the gexp. Remove #:linux and #:linux-modules arguments to 'expression->initrd'. * gnu/build/linux-initrd.scm (build-initrd): Remove #:linux-module-directory parameter. Don't create 'modules' sub-directory. * gnu/build/linux-boot.scm (boot-system): Mentin that LINUX-MODULES is a list of absolute file names. Don't prepend "/modules/" to LINUX-MODULES. * doc/guix.texi (Initial RAM Disk): Adjust accordingly. --- doc/guix.texi | 8 +++--- gnu/build/linux-boot.scm | 13 +++++---- gnu/build/linux-initrd.scm | 7 +---- gnu/system/linux-initrd.scm | 65 +++++++++++++++++++++------------------------ 4 files changed, 41 insertions(+), 52 deletions(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 1e8a55e9a5..e3b0cf61f0 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -3616,16 +3616,14 @@ program to run in that initrd. @deffn {Monadic Procedure} expression->initrd @var{exp} @ [#:guile %guile-static-stripped] [#:name "guile-initrd"] @ - [#:modules '()] [#:linux #f] @ - [#:linux-modules '()] + [#:modules '()] Return a derivation that builds a Linux initrd (a gzipped cpio archive) containing @var{guile} and that evaluates @var{exp}, a G-expression, upon booting. All the derivations referenced by @var{exp} are automatically copied to the initrd. -@var{linux-modules} is a list of @file{.ko} file names to be copied from -@var{linux} into the initrd. @var{modules} is a list of Guile module -names to be embedded in the initrd. +@var{modules} is a list of Guile module names to be embedded in the +initrd. @end deffn @node Invoking guix system diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm index 1312da6bbd..fbc683c798 100644 --- a/gnu/build/linux-boot.scm +++ b/gnu/build/linux-boot.scm @@ -343,10 +343,11 @@ bailing out.~%root contents: ~s~%" (scandir "/")) volatile-root? (mounts '())) "This procedure is meant to be called from an initrd. Boot a system by -first loading LINUX-MODULES, then setting up QEMU guest networking if -QEMU-GUEST-NETWORKING? is true, mounting the file systems specified in MOUNTS, -and finally booting into the new root if any. The initrd supports kernel -command-line options '--load', '--root', and '--repl'. +first loading LINUX-MODULES (a list of absolute file names of '.ko' files), +then setting up QEMU guest networking if QEMU-GUEST-NETWORKING? is true, +mounting the file systems specified in MOUNTS, and finally booting into the +new root if any. The initrd supports kernel command-line options '--load', +'--root', and '--repl'. Mount the root file system, specified by the '--root' command-line argument, if any. @@ -384,9 +385,7 @@ to it are lost." (start-repl)) (display "loading kernel modules...\n") - (for-each (compose load-linux-module* - (cut string-append "/modules/" <>)) - linux-modules) + (for-each load-linux-module* linux-modules) (when qemu-guest-networking? (unless (configure-qemu-networking) diff --git a/gnu/build/linux-initrd.scm b/gnu/build/linux-initrd.scm index 2c0acb200e..54639bd319 100644 --- a/gnu/build/linux-initrd.scm +++ b/gnu/build/linux-initrd.scm @@ -104,23 +104,18 @@ This is similar to what 'compiled-file-name' in (system base compile) does." (define* (build-initrd output #:key guile init - linux-module-directory (references-graphs '()) (cpio "cpio") (gzip "gzip")) "Write an initial RAM disk (initrd) to OUTPUT. The initrd starts the script at INIT, running GUILE. It contains all the items referred to by -REFERENCES-GRAPHS, plus the Linux modules from LINUX-MODULE-DIRECTORY." +REFERENCES-GRAPHS." (mkdir "contents") ;; Copy the closures of all the items referenced in REFERENCES-GRAPHS. (populate-store references-graphs "contents") (with-directory-excursion "contents" - ;; Copy Linux modules. - (mkdir "modules") - (copy-recursively linux-module-directory "modules") - ;; Make '/init'. (symlink init "init") diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm index 03ac24d450..e83a9a5b23 100644 --- a/gnu/system/linux-initrd.scm +++ b/gnu/system/linux-initrd.scm @@ -34,6 +34,7 @@ #:use-module (ice-9 match) #:use-module (ice-9 regex) #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) #:export (expression->initrd base-initrd)) @@ -53,25 +54,19 @@ (gzip gzip) (name "guile-initrd") (system (%current-system)) - (modules '()) - (linux #f) - (linux-modules '())) + (modules '())) "Return a derivation that builds a Linux initrd (a gzipped cpio archive) containing GUILE and that evaluates EXP, a G-expression, upon booting. All the derivations referenced by EXP are automatically copied to the initrd. -LINUX-MODULES is a list of '.ko' file names to be copied from LINUX into the -initrd. MODULES is a list of Guile module names to be embedded in the -initrd." +MODULES is a list of Guile module names to be embedded in the initrd." ;; General Linux overview in `Documentation/early-userspace/README' and ;; `Documentation/filesystems/ramfs-rootfs-initramfs.txt'. - (mlet* %store-monad ((init (gexp->script "init" exp - #:modules modules - #:guile guile)) - (module-dir (flat-linux-module-directory linux - linux-modules))) + (mlet %store-monad ((init (gexp->script "init" exp + #:modules modules + #:guile guile))) (define builder #~(begin (use-modules (gnu build linux-initrd)) @@ -80,8 +75,8 @@ initrd." (build-initrd (string-append #$output "/initrd") #:guile #$guile #:init #$init + ;; Copy everything INIT refers to into the initrd. #:references-graphs '("closure") - #:linux-module-directory #$module-dir #:cpio (string-append #$cpio "/bin/cpio") #:gzip (string-append #$gzip "/bin/gzip")))) @@ -201,27 +196,29 @@ exception and backtrace!)." (list unionfs-fuse/static) '()))) - (expression->initrd - #~(begin - (use-modules (gnu build linux-boot) - (guix build utils) - (srfi srfi-26)) - - (with-output-to-port (%make-void-port "w") - (lambda () - (set-path-environment-variable "PATH" '("bin" "sbin") - '#$helper-packages))) - - (boot-system #:mounts '#$(map file-system->spec file-systems) - #:linux-modules '#$linux-modules - #:qemu-guest-networking? #$qemu-networking? - #:guile-modules-in-chroot? '#$guile-modules-in-chroot? - #:volatile-root? '#$volatile-root?)) - #:name "base-initrd" - #:modules '((guix build utils) - (gnu build linux-boot) - (gnu build file-systems)) - #:linux linux-libre - #:linux-modules linux-modules)) + (mlet %store-monad ((kodir (flat-linux-module-directory linux-libre + linux-modules))) + (expression->initrd + #~(begin + (use-modules (gnu build linux-boot) + (guix build utils) + (srfi srfi-26)) + + (with-output-to-port (%make-void-port "w") + (lambda () + (set-path-environment-variable "PATH" '("bin" "sbin") + '#$helper-packages))) + + (boot-system #:mounts '#$(map file-system->spec file-systems) + #:linux-modules (map (lambda (file) + (string-append #$kodir "/" file)) + '#$linux-modules) + #:qemu-guest-networking? #$qemu-networking? + #:guile-modules-in-chroot? '#$guile-modules-in-chroot? + #:volatile-root? '#$volatile-root?)) + #:name "base-initrd" + #:modules '((guix build utils) + (gnu build linux-boot) + (gnu build file-systems))))) ;;; linux-initrd.scm ends here -- cgit 1.4.1