summaryrefslogtreecommitdiff
path: root/guix/scripts/system.scm
Commit message (Collapse)AuthorAge
* guix system: Mention 'herd restart' when reconfigure completes.Ludovic Courtès2020-04-03
| | | | | | | | * guix/scripts/system.scm (with-shepherd-error-handling): Use 'mbegin' instead of 'begin'. (perform-action): Print a message after 'upgrade-shepherd-services'. That message had disappeared in commit 5c8c8c455420af27189d6045b3599fe6e27ad012.
* guix system: Remove unused procedure.Ludovic Courtès2020-04-03
| | | | | | | This procedure was unused since 5c8c8c455420af27189d6045b3599fe6e27ad012. * guix/scripts/system.scm (call-with-service-upgrade-info): Remove.
* guix system: Use 'mapm/accumulate-builds'.Ludovic Courtès2020-04-02
| | | | | * guix/scripts/system.scm (perform-action): Use 'mapm/accumulate-builds' instead of 'mapm'.
* '--dry-run' no longer implies '--no-grafts'.Ludovic Courtès2020-03-29
| | | | | | | | | | * guix/scripts/archive.scm (%options): "dry-run" option no longer adds 'graft? #f to RESULT. * guix/scripts/environment.scm (%options): Likewise. * guix/scripts/pack.scm (%options): Likewise. * guix/scripts/package.scm (%options): Likewise. * guix/scripts/pull.scm (%options): Likewise. * guix/scripts/system.scm (%options): Likewise.
* guix system: Fix mistaken 'guix pull' warning upon 'reconfigure'.Ludovic Courtès2020-03-24
| | | | | | | | | | Fixes <https://bugs.gnu.org/38196>. Reported by Florian Pelz <pelzflorian@pelzflorian.de>. * guix/scripts/system.scm (maybe-suggest-running-guix-pull): Check whether 'current-profile' returns true instead of checking for the existence of ~root/.config/guix/current. That way, "sudo guix system reconfigure" no longer emits a warning in that case.
* guix system: Use 'with-build-handler'.Ludovic Courtès2020-03-22
| | | | | | | * guix/scripts/system.scm (reinstall-bootloader): Remove call to 'show-what-to-build*'. (perform-action): Call 'build-derivations' instead of 'maybe-build'. (process-action): Wrap 'run-with-store' in 'with-build-handler'.
* file-systems: Add a 'file-system-device->string' procedure.Maxim Cournoyer2020-03-02
| | | | | | | * gnu/system/file-systems.scm (file-system-device->string): New procedure. * gnu/system.scm (bootable-kernel-arguments): Use it. * gnu/system/vm.scm (operating-system-uuid): Likewise. * guix/scripts/system.scm (display-system-generation): Likewise.
* scripts: system: Do not validate network file systems.Maxim Cournoyer2020-02-18
| | | | | | | Fixes <https://bugs.gnu.org/39551>. * guix/scripts/system.scm (check-file-system-availability): Ignore file systems of the NFS type.
* guix system: Honor the build options in 'delete-generations'.Ludovic Courtès2019-12-21
| | | | | | | | | Until now, 'guix system delete-generations' would ignore OPTS; for example, it would not enable #:print-extended-build-trace? & co., leading to suboptimal output. * guix/scripts/system.scm (process-command)[with-store*]: New macro. Use it for 'delete-generations', 'switch-generation', and 'roll-back'.
* guix system: Add "describe" action.Ludovic Courtès2019-12-07
| | | | | | | * guix/scripts/system.scm (show-help): Add "describe". (process-command): Handle it. (guix-system): Likewise. * doc/guix.texi (Invoking guix system): Document it.
* guix system: "list-generations" displays provenance info.Ludovic Courtès2019-12-07
| | | | | | | | * guix/scripts/pull.scm (channel-commit-hyperlink): Export. * guix/scripts/system.scm (display-system-generation) [display-channel]: New procedure. Read the "provenance" file of GENERATION and display channel info and the configuration file name when available.
* guix system: Use 'provenance-service-type', add "--save-provenance".Ludovic Courtès2019-12-07
| | | | | | | | | * guix/scripts/system.scm (show-help, %options): Add "--save-provenance". (process-action): Define 'save-provenance?' and 'transform'; call 'transform' on the OS. * doc/guix.texi (Invoking guix system): Document it under 'reconfigure'. (Service Reference): Mention that 'provenance-service-type' is automatically added by 'reconfigure' & 'init'.
* scripts: system: Add --target option.Mathieu Othacehe2019-12-01
| | | | | | | * guix/scripts/system.scm (%options): Add target option, (%default-options): ditto, (process-action): Rename existing target variable to target-file and pass new target variable to run-with-store procedure.
* Use 'offload?' instead of 'build-hook?' internally.Ludovic Courtès2019-11-26
| | | | | | | | | | | | | | | | | | | | * guix/scripts/archive.scm (%default-options): Replace 'build-hook?' with 'offload?'. * guix/scripts/build.scm (set-build-options-from-command-line): Pass #:offload? instead of #:use-build-hook?. (%standard-build-options): Use the 'offload? key instead of 'build-hook?. (%default-options): Replace 'build-hook?' with 'offload?'. * guix/scripts/copy.scm (%default-options): Likewise. * guix/scripts/deploy.scm (%default-options): Likewise. * guix/scripts/environment.scm (%default-options): Likewise. * guix/scripts/pack.scm (%default-options): Likewise. * guix/scripts/package.scm (%default-options): Likewise. * guix/scripts/pull.scm (%default-options): Likewise. * guix/scripts/system.scm (%default-options): Likewise. * guix/scripts/time-machine.scm (%default-options): Likewise. * guix/store.scm (set-build-options): Have #:use-build-hook? default to *unspecified*. Add #:offload?. Add call to 'warn-about-deprecation' when #:use-build-hook? is specified.
* guix system: Reinstalling the bootloader preserves extra menu entries.Ludovic Courtès2019-08-30
| | | | | | | | | | | | | Fixes <https://bugs.gnu.org/36876>. Reported by Jesse Gibbons <jgibbons2357@gmail.com>. Previously 'guix system delete-generations' or 'switch-generation' would lose the extra bootloader menu entries specified in the current system's configuration. This fixes that. * guix/scripts/system.scm (reinstall-bootloader): Turn PARAMS into a single <boot-parameters>. Adjust ENTRIES to include extra menu entries specified in PARAMS.
* guix system: Reimplement 'reconfigure'.Jakob L. Kreuze2019-07-26
| | | | | | | | | | * guix/scripts/system.scm (switch-to-system) (upgrade-shepherd-services, install-bootloader): Delete variable. (local-eval): New variable. (install): Remove 'bootloader-installer' and 'bootcfg-file' parameters. (install): Add 'bootloader' parameter. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix gc: Correctly handle '--delete-generations' with no arguments.Ludovic Courtès2019-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, 'guix gc --delete-generations' would crash: the "" pattern would be passed to 'matching-generations', which would return #f instead of returning a list. Reported by Raghav Gururajan <rvgn@disroot.org> in <https://bugs.gnu.org/36466>. * guix/ui.scm (matching-generations): Raise an error when passed an invalid pattern. * guix/scripts/gc.scm (delete-old-generations): Check if PATTERN is true. (%options): Leave ARG as-is for 'delete-generations'. (guix-gc): Use 'assq' instead of 'assoc-ref' for 'delete-generations'. * guix/scripts/package.scm (delete-matching-generations): Replace (string-null? pattern) with (not pattern). Remove 'else' clause. (%options): Leave ARG as-is for 'delete-generations'. * guix/scripts/pull.scm (%options): Leave ARG as-is for 'list-generations'. (process-query): Replace (string-null? pattern) with (not pattern). * guix/scripts/system.scm (list-generations): Likewise, and remove 'else' clause. (process-command): Use #f instead of "" when no pattern is given.
* guix system: Type-check the file or expression.Ludovic Courtès2019-05-16
| | | | | | | | | Previously, users would get a wrong-type-arg exception down the road with an intimidating backtrace. * guix/scripts/system.scm (process-action)[ensure-operating-system]: New procedure. Use it.
* vm: Auto-detect if inputs should be registered.Maxim Cournoyer2019-05-13
| | | | | | | | | | | | | | | | | | | | | The default value of the argument REGISTER-CLOSURE? of the ISO9660-IMAGE, QEMU-IMAGE and SYSTEM-DOCKER-IMAGE procedures can be computed automatically, since the operating-system definition is available in its context. When the operating-system definition does not contain the GUIX-SERVICE-TYPE, do not register the closure in the database of Guix, as it takes time and doesn't serve a purpose. * gnu/system/vm.scm (has-guix-service-type): Add predicate. (iso9660-image)[register-closures?]: Use it to compute the argument's default value. (qemu-image)[register-closures?]: Likewise, and update docstring. (system-docker-image)[register-closures?]: Likewise. (system-disk-image): Do not explicit a value for the REGISTER-CLOSURES? argument of the ISO9660-IMAGE and QEMU-IMAGE procedure calls, so that its default value is used instead. * guix/scripts/system.scm (system-derivation-for-action): Do not explicit a value for the REGISTER-CLOSURES? argument of the SYSTEM-DOCKER-IMAGE procedure call, so that its default value is used instead.
* linux-container: Support container network sharing.Arun Isaac2019-05-14
| | | | | | | | | | | | | | | | | | | * gnu/system/linux-container.scm (container-essential-services): If network is to be shared with the host, remove network configuration files from etc service. (containerized-operating-system): If network is to be shared with the host, remove nscd service and map host's /var/run/nscd if it exists. (container-script): If network is to be shared with the host, do not create network namespace. * guix/scripts/system.scm (system-derivation-for-action): Add #:container-shared-network? argument. (perform-action): Add #:container-shared-network? argument. (show-help): Add "-N, --network" help information. (%options): Add network option. (process-action): Call perform-action with #container-shared-network? argument. * doc/guix.texi (Invoking guix system): Document the "-N, --network" option. Co-authored-by: Christopher Baines <mail@cbaines.net>
* guix system: Compute 'bootcfg' only for 'init' and 'reconfigure'.Ludovic Courtès2019-04-23
| | | | | | | | | | | | Previously, 'guix system vm' would start by computing the bootcfg derivation, which itself depended on an incorrect OS derivation (for the original OS instead of the one passed through 'virtualized-operating-system'.) That added overhead and would force the user's config file to define a root file system, for example, even though it makes no sense in the case of a VM. * guix/scripts/system.scm (perform-action)[bootcfg]: Limit to the 'init' and 'reconfigure' actions.
* scripts: More commands default to verbosity level 1.Ludovic Courtès2019-04-04
| | | | | | | * guix/scripts/environment.scm (%default-options): Change 'verbosity' to 1. * guix/scripts/pack.scm (%default-options): Likewise. * guix/scripts/system.scm (guix-system): Likewise, except for the 'build' command.
* guix system: Fix success report of the bootloader installation.Ludovic Courtès2019-03-17
| | | | | | | | | Fixes <https://bugs.gnu.org/34890>. Reported by Jack Hill <jackhill@jackhill.us>. Regression introduced in 21fcfe1ee969cc477dc41486ae4074e655d44274. * guix/scripts/system.scm (bootloader-installer-script): Ungexp DEVICE.
* bootloader: Use 'invoke/quiet' when running 'grub-install' and co.Ludovic Courtès2019-03-16
| | | | | | | | | | | This hides potentially confusing GRUB messages from the user, such as "Installing for i386-pc platform." * gnu/bootloader/extlinux.scm (install-extlinux): Use 'invoke/quiet' instead of 'system*' and 'error'. * gnu/bootloader/grub.scm (install-grub, install-grub-efi): Likewise. * guix/scripts/system.scm (bootloader-installer-script): Guard against 'message-condition?' and handle them properly.
* guix system: List old generations from newest to oldest.Ludovic Courtès2019-02-13
| | | | | | | | | Previously 'guix system switch-generation' or 'delete-generations' would yield a GRUB menu where entries for old generations were in the wrong order (i.e., oldest first.) * guix/scripts/system.scm (reinstall-bootloader): Reverse the list returned by 'generation-numbers'.
* guix system: Add 'delete-generations'.Ludovic Courtès2019-02-13
| | | | | | | | * guix/scripts/package.scm (delete-matching-generations): Export. * guix/scripts/system.scm (show-help): Add 'delete-generations'. (process-command): Honor it. (guix-system): Support it. * doc/guix.texi (Invoking guix system): Document it.
* Avoid name clash with 'build' from (guix store) and (guix status).Ludovic Courtès2019-02-11
| | | | | | | | | | | | | | | | Since commit 976ef2d97887d16eab8d4eb9dad811786b04d690, (guix status) exports 'build', which clashes with 'build' from (guix store). * build-aux/run-system-tests.scm: Select 'with-status-verbosity' from (guix status). * guix/scripts/archive.scm: Likewise. * guix/scripts/build.scm: Likewise. * guix/scripts/copy.scm: Likewise. * guix/scripts/environment.scm: Likewise. * guix/scripts/pack.scm: Likewise. * guix/scripts/package.scm: Likewise. * guix/scripts/pull.scm: Likewise. * guix/scripts/system.scm: Likewise.
* guix build: Re-purpose '--verbosity' and add '--debug'.Ludovic Courtès2019-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous '--verbosity' option was misleading and rarely what users were looking for. The new option provides a consistent way to choose whether or not to display the build log. * guix/scripts/build.scm (show-build-options-help): Remove "--verbosity" and add "--debug". (set-build-options-from-command-line): Use the 'debug key of OPTS for #:verbosity. (%standard-build-options): Change "verbosity" to "debug". Use 'string->number*' instead of 'string->number'. (%default-options): Change 'verbosity to 'debug and add a 'verbosity key. (show-help): Add '--verbosity'. (%options): Likewise, and change '--quiet' to set the 'verbosity key of RESULT. (guix-build): Use 'with-status-verbosity' instead of parameterizing CURRENT-BUILD-OUTPUT-PORT, honor the 'verbosity key of OPTS, and remove 'quiet?'. * guix/scripts/environment.scm (show-help, %options): Add '--verbosity'. (%default-options): Add 'debug'. (guix-environment): Honor the 'verbosity key of OPTS. * guix/scripts/pack.scm (%default-options): Add 'debug. (%options, show-help): Add '--verbosity'. (guix-pack): Honor the 'verbosity key of OPTS. * guix/scripts/package.scm (%default-options): Add 'debug. (show-help, %options): Add '--verbosity'. Mark '--verbose' as deprecated and change it to set 'verbosity. (guix-package): Honor the 'verbosity key of OPTS and remove 'verbose?'. * guix/scripts/pull.scm (%default-options): Add 'debug. (show-help, %options): Add '--verbosity'. (guix-pull): Honor the 'verbosity key of OPTS. * guix/scripts/system.scm (show-help, %options): Add '--verbosity'. (%default-options): Add 'debug. (guix-system): Honor the 'verbosity key of OPTS. * guix/scripts/archive.scm (%default-options): Add 'debug, 'print-build-trace?, 'print-extended-build-trace?, and 'multiplexed-build-output?. (show-help, %options): Add '--verbosity'. (export-from-store): Remove call to 'set-build-options-from-command-line'. (guix-archive): Wrap body in 'with-status-verbosity'. Add call to 'set-build-options-from-command-line. * doc/guix.texi (Common Build Options): Document '--verbosity' and '--debug'. (Additional Build Options): Adjust description of '--quiet'.
* status: Add 'with-status-verbosity'.Ludovic Courtès2019-01-11
| | | | | | | | | | | | | * guix/status.scm (logger-for-level, call-with-status-verbosity): New procedures. (with-status-verbosity): New macro. * guix/scripts/environment.scm (guix-environment): Use 'with-status-verbosity' instead of 'with-status-report'. * guix/scripts/pack.scm (guix-pack): Likewise. * guix/scripts/package.scm (guix-package): Likewise. * guix/scripts/pull.scm (guix-pull): Likewise. * guix/scripts/system.scm (guix-system): Likewise. * build-aux/run-system-tests.scm (run-system-tests): Likewise.
* guix system: Clarify the three strategies available.swedebugia2018-12-18
| | | | | | | | * guix/scripts/system.scm (show-help): Clarify the three choices. * doc/guix.texi (Invoking guix system): Add 3 @cindex to make on-error=strategy easier to find. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix system: Fix bootloader config file generation by 'guix system roll-back'.Ludovic Courtès2018-12-07
| | | | | | | | | | | Fixes <https://bugs.gnu.org/33623>. Reported by Diego Nicola Barbato <dnbarbato@posteo.de>. Regression introduced in commit 46c296dcc4817f15a4b4ef7e5ef622306b4db62e. * guix/scripts/system.scm (reinstall-bootloader): Add call to 'lower-object'.
* guix system: Fix 'init' again.Ludovic Courtès2018-11-21
| | | | | | | | | Fixes a regression introduced in 52ee4479ef26826a53b9929cd00ca7738be687b1, whereby 'install' would now be passed a procedure instead of a lowerable object. * guix/scripts/system.scm (perform-action): Pass BOOTLOADER-SCRIPT as the #:bootloader-installer argument of 'install'.
* guix system: Fix 'init'.Ludovic Courtès2018-11-19
| | | | | | | | Fixes a regression introduced in 52ee4479ef26826a53b9929cd00ca7738be687b1, whereby 'install' would now be passed a <computed-file> object instead of a derivation. * guix/scripts/system.scm (install): Call 'lower-object' on BOOTCFG.
* guix system: Clarify 'perform-action'.Ludovic Courtès2018-11-18
| | | | | * guix/scripts/system.scm (perform-action): Move non-monadic local variables outside the 'mlet' form.
* guix system: De-monadify bootloader installation script.Ludovic Courtès2018-11-18
| | | | | | | | | * guix/scripts/system.scm (bootloader-installer-derivation): Rename to... (bootloader-installer-script): ... this. Use 'scheme-file' instead of 'gexp->file'. (perform-action): Adjust accordingly. Move 'lower-object' call to the point where DRVS is computed.
* guix system: Simplify bootloader package handling.Ludovic Courtès2018-11-18
| | | | | | | * guix/scripts/system.scm (perform-action): Remove 'bootloader-package' variable. Pass (bootloader-package bootloader) as the 2nd argument to 'bootloader-installer-derivation'. Remove BOOTLOADER-PACKAGE from DRVS since it's redundant.
* system: De-monadify 'operating-system-bootcfg'.Ludovic Courtès2018-11-18
| | | | | | | | | * gnu/system.scm (operating-system-bootcfg): Remove 'mlet*' and 'lower-object' call. * gnu/system/vm.scm (system-disk-image) (system-qemu-image/shared-store): Adjust accordingly. * guix/scripts/system.scm (perform-action): Add 'lower-object' call for BOOTCFG.
* guix system: Invoking 'guix system init' twice keeps timestamps zeroed.Ludovic Courtès2018-11-11
| | | | | | | | | | | | | | Fixes a bug whereby running 'guix system init config.scm /mnt' twice would, on the second run, change timestamps in /mnt/gnu/store from the Epoch to now. This is because the 'register-path' call would bypass the 'reset-timestamps' phase altogether in that case, as a consequence of commit bb3b6ccb05550fbfbeb459c68819a752327d6e1e. Reported by Christopher Baines. * guix/scripts/system.scm (install): When TARGET/var/guix exists, delete it. As a side-effect, this ensures that later on, the 'register-path' call invokes 'reset-timestamps' on all the copied store items.
* scripts: Suggest running 'guix gc' when we're short on disk space.Ludovic Courtès2018-10-23
| | | | | | | * guix/scripts.scm (%disk-space-warning): New variable. (warn-about-disk-space): New procedure. * guix/scripts/package.scm (build-and-use-profile): Use it. * guix/scripts/system.scm (process-action): Likewise.
* status: Build upon multiplexed build output.Ludovic Courtès2018-10-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows for more accurate status tracking and parsing of extended build traces. * guix/status.scm (multiplexed-output-supported?): New procedure. (print-build-event): Don't print \r when PRINT-LOG? is true. Adjust 'build-log' handling for when 'multiplexed-output-supported?' returns true. (bytevector-index, split-lines): New procedures. (build-event-output-port)[%build-output-pid, %build-output] [%build-output-left]: New variables. [process-line]: Handle "@ build-output" traces. [process-build-output]: New procedure. [write!]: Add case for when %BUILD-OUTPUT-PID is true. Use 'bytevector-index' rather than 'string-index'. (compute-status): Add #:derivation-path->output-path. Use it. * tests/status.scm ("compute-status, multiplexed build output"): New test. ("build-output-port, UTF-8") ("current-build-output-port, UTF-8 + garbage"): Adjust to new 'build-log' output. * guix/scripts/build.scm (set-build-options-from-command-line): Pass #:multiplexed-build-output?. (%default-options): Add 'multiplexed-build-output?'. * guix/scripts/environment.scm (%default-options): Likewise. * guix/scripts/pack.scm (%default-options): Likewise. * guix/scripts/package.scm (%default-options): Likewise. * guix/scripts/pull.scm (%default-options): Likewise. * guix/scripts/system.scm (%default-options): Likewise.
* Add (guix status) and use it for pretty colored output.Ludovic Courtès2018-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/progress.scm (progress-reporter/trace): New procedure. (%progress-interval): New variable. (progress-reporter/file): Use it. * guix/scripts/build.scm (set-build-options-from-command-line): Pass #:print-extended-build-trace?. (%default-options): Add 'print-extended-build-trace?'. (guix-build): Parameterize CURRENT-TERMINAL-COLUMNS. Use 'build-status-updater'. * guix/scripts/environment.scm (%default-options): Add 'print-extended-build-trace?'. (guix-environment): Wrap body in 'with-status-report'. * guix/scripts/pack.scm (%default-options): Add 'print-build-trace?' and 'print-extended-build-trace?'. (guix-pack): Wrap body in 'with-status-report'. * guix/scripts/package.scm (%default-options, guix-package): Likewise. * guix/scripts/system.scm (%default-options, guix-system): Likewise. * guix/scripts/pull.scm (%default-options, guix-pull): Likewise. * guix/scripts/substitute.scm (progress-report-port): Don't call STOP when TOTAL is zero. (process-substitution): Add #:print-build-trace? and honor it. (guix-substitute)[print-build-trace?]: New variable. Pass #:print-build-trace? to 'process-substitution'. * guix/status.scm: New file. * guix/store.scm (set-build-options): Add #:print-extended-build-trace?; pass it into PAIRS. (%protocol-version): Bump. (protocol-version, nix-server-version): New procedures. (current-store-protocol-version): New variable. (with-store, build-things): Parameterize it. * guix/ui.scm (build-output-port): Remove. (colorize-string): Export. * po/guix/POTFILES.in: Add guix/status.scm. * tests/status.scm: New file. * Makefile.am (SCM_TESTS): Add it. * nix/libstore/worker-protocol.hh (PROTOCOL_VERSION): Bump to 0x162. * nix/libstore/build.cc (DerivationGoal::registerOutputs) (SubstitutionGoal::finished): Print a "@ hash-mismatch" trace before throwing.
* guix system: Load all services on reconfigure, not just stopped ones.Carlo Zancanaro2018-09-26
| | | | | | | | | | | | | | | | | This uses the 'replacement' service slot introduced in the Shepherd version 0.5.0. * gnu/services/shepherd.scm (shepherd-service-upgrade): Return a list of services that need to be restarted to complete their upgrade. * guix/scripts/system.scm (call-with-service-upgrade-info): Rename an internal variable to reflect the change to shepherd-service-upgrade. (upgrade-shepherd-services): Call 'load-services/safe' instead of 'load-services'. Print a message about services that need to be manually restarted. * gnu/services/herd.scm (load-services/safe): New procedure. * doc/guix.texi (Invoking guix system): Document the new behaviour. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* guix system: Make 'init' idempotent again.Ludovic Courtès2018-07-03
| | | | | | | | | | | | | This fixes a regression introduced in df2f6400b1fbc282ef4d6dd7124ea1c17adc23c2: since the new 'register-path' (actually 'reset-timestamps') would make files read-only, 'delete-file-recursively' would fail to delete them. Thus, re-running 'guix system init' on an already-populated store would fail with a 'delete-file' EPERM. * guix/scripts/system.scm (copy-item): Use 'lstat' instead of 'file-exists?'. Call 'make-file-writable' on each directory below DEST.
* guix system: init: Check the available space before copying.Ludovic Courtès2018-07-03
| | | | | * guix/scripts/system.scm (copy-closure): Call 'query-path-info*' on TO-COPY and REFS. Compute the total size. Call 'check-available-space'.
* guix: Fix system reconfigure.Ricardo Wurmus2018-06-21
| | | | | | This is a follow-up to 378daa8cb677121e1893f9173af1db060720d6e4. * guix/scripts/system.scm (switch-to-system): Lower the script.
* guix system: 'list-generation' correctly displays file system labels.Ludovic Courtès2018-06-20
| | | | | | * guix/scripts/system.scm (display-system-generation): Correctly display file system labels. Previously, starting from commit a5acc17a3c10a3779b5b8b1a2565ef130be77e51, it'd print #<file-system-label "foo">.
* Remove 'guix-register' and its traces.Ludovic Courtès2018-06-14
| | | | | | | | | | | | | | | | | | | * Makefile.am (SH_TESTS): Remove tests/guix-register.sh. * build-aux/pre-inst-env.in (GUIX_REGISTER): Remove. * gnu/build/install.scm (directives): Remove outdated comment. * gnu/build/vm.scm (root-partition-initializer): Update comment. * gnu/packages/package-management.scm (guix-register): Remove. * guix/config.scm.in (%sbindir, %guix-register-program): Remove. * guix/scripts/system.scm (install): Adjust docstring. * guix/self.scm (make-config.scm): Remove #:guix. Do not generate %sbindir and %guix-register-program. (specification->package): Remove "guix". * nix/guix-register/guix-register.cc: Remove. * nix/libstore/store-api.cc (decodeValidPathInfo): Remove. * nix/libstore/store-api.hh (decodeValidPathInfo): Remove declaration. * nix/local.mk (sbin_PROGRAMS, guix_register_SOURCES) (guix_register_CPPFLAGS, guix_register_LDFLAGS): Remove. * tests/guix-register.sh: Remove.
* store: Remove 'register-path'.Ludovic Courtès2018-06-14
| | | | | | | | * guix/store.scm (register-path): Remove. * guix/nar.scm: Use (guix store database). * guix/scripts/system.scm: Likewise. * tests/store-database.scm: Remove #:hide (register-path). * tests/store.scm ("register-path"): Remove.
* pull: Install the new Guix in a profile.Ludovic Courtès2018-06-09
| | | | | | | | | | | | | | | | | | * guix/scripts/pull.scm (%pull-version): New variable. (build-from-source): Pass #:pull-version to BUILD. (whole-package-for-legacy, derivation->manifest-entry): New procedure. (build-and-install): Rewrite in terms of 'build-and-use-profile'. * guix/scripts/system.scm (maybe-suggest-running-guix-pull)[latest]: Switch to "/current". * scripts/guix.in (augment-load-paths!): Remove use of ~/.config/guix/latest. * build-aux/compile-as-derivation.scm: Replace "/guix/latest/" with "/current/share/guile/site/X.Y" * guix/scripts.scm (warn-about-old-distro)[age]: Check "/current" instead of "/latest". * doc/guix.texi (Invoking guix pull): Document it. * doc/contributing.texi (Running Guix Before It Is Installed): Remove footnote about abusing ~/.config/guix/latest.
* scripts: system: Sort profile generations in reverse order.Mathieu Othacehe2018-06-01
| | | | | | * guix/scripts/system.scm (profile-boot-parameters): Reverse generation-numbers list. This allows old generations to be listed from most recent to oldest in bootloaders configuration files.