Commit Graph

1526 Commits

Author SHA1 Message Date
Marius Bakke bd21acf6c3
Merge branch 'master' into core-updates 2020-04-15 19:26:55 +02:00
Ludovic Courtès 1ae7a9251b
weather: Delete duplicate entries coming from '--manifest'.
* guix/scripts/weather.scm (load-manifest): Call 'delete-duplicates'.
2020-04-14 16:01:05 +02:00
Marius Bakke 2778302399
Merge branch 'master' into core-updates
Conflicts:
	etc/news.scm
	gnu/local.mk
	gnu/packages/check.scm
	gnu/packages/cross-base.scm
	gnu/packages/gimp.scm
	gnu/packages/java.scm
	gnu/packages/mail.scm
	gnu/packages/sdl.scm
	gnu/packages/texinfo.scm
	gnu/packages/tls.scm
	gnu/packages/version-control.scm
2020-04-08 13:00:50 +02:00
Ludovic Courtès 93add9bf7d
reconfigure: Correctly re-throw SRFI-34 exceptions on Guile 3.
Previously, we'd just print an ugly backtrace when running on Guile 3
because the '%exception throw would not be caught anywhere.

Reported by Arne Babenhauserheide <arne_bab@web.de>
in <https://bugs.gnu.org/40496>.

* guix/scripts/system/reconfigure.scm (install-bootloader-program): In
'catch' handler, match '%exception and use 'raise-exception' instead of
'throw' to rethrow in that case.
2020-04-08 00:05:45 +02:00
Ludovic Courtès f7b5b8cd45
pack: Pass the cross-compilation target to 'run-with-store'.
This ensures '%current-target-system' is correctly bound upfront, which
some packages rely on.

* guix/scripts/pack.scm (guix-pack): Pass #:target to 'run-with-store'.
2020-04-03 23:06:43 +02:00
Ludovic Courtès 73bfb14f8f
guix system: Mention 'herd restart' when reconfigure completes.
* 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
5c8c8c4554.
2020-04-03 12:58:14 +02:00
Ludovic Courtès 4efbb079b5
guix system: Remove unused procedure.
This procedure was unused since
5c8c8c4554.

* guix/scripts/system.scm (call-with-service-upgrade-info): Remove.
2020-04-03 12:58:14 +02:00
Ludovic Courtès 9fb3ff31c1
reconfigure: Silence Guile warnings.
Fixes <https://bugs.gnu.org/39301>.
Reported by strypsteen@posteo.net.

* guix/scripts/system/reconfigure.scm (switch-to-system)
(upgrade-shepherd-services, install-bootloader): Wrap 'primitive-load'
call in 'parameterize'.
2020-04-03 12:58:14 +02:00
Ludovic Courtès 00a1ebb84a
Revert "reconfigure: Run the effect scripts as separate processes."
This reverts commit 5517750344.
That commit would remove all sorts of error checking when running those
programs.
2020-04-03 12:58:14 +02:00
Ludovic Courtès 5517750344
reconfigure: Run the effect scripts as separate processes.
Fixes <https://bugs.gnu.org/39301>.
Reported by strypsteen@posteo.net.

* guix/scripts/system/reconfigure.scm (switch-to-system)
(upgrade-shepherd-services, install-bootloader): Use 'system*' instead
of 'primitive-load'.
2020-04-02 23:15:12 +02:00
Ludovic Courtès a6850f6827
guix system: Do not import the user's (guix config).
Previously, 'switch-to-system.drv' and 'install-bootloader.drv' would
depend on the user's (guix config) module.  This is no longer the case.

* guix/scripts/system/reconfigure.scm (not-config?): New procedure.
(switch-system-program): Do not import the user's (guix config).  Use
'make-config.scm' instead.
(install-bootloader-program): Likewise.
2020-04-02 23:15:11 +02:00
Ludovic Courtès 2ad6eb0568
guix system: Use 'mapm/accumulate-builds'.
* guix/scripts/system.scm (perform-action): Use 'mapm/accumulate-builds'
instead of 'mapm'.
2020-04-02 11:48:24 +02:00
Ludovic Courtès a357849f5b
guix package: Do not misdiagnose upgrades when there are propagated inputs.
Fixes <https://bugs.gnu.org/35872>.
Reported by Andy Tai <atai@atai.org>.

* guix/profiles.scm (list=?, manifest-entry=?): New procedures.
* guix/scripts/package.scm (transaction-upgrade-entry): In the '=' case,
use 'manifest-entry=?' to determine whether it's an upgrade.
* tests/packages.scm ("transaction-upgrade-entry, zero upgrades,
propagated inputs"): New test.
2020-03-31 00:06:36 +02:00
Ludovic Courtès a187cc5628
guix package: 'transaction-upgrade-entry' swallows build requests.
Fixes a regression introduced in
131f50cdc9 whereby the install/upgrade
message would not be displayed:

  $ guix upgrade -n
  2.1 MB would be downloaded:
     /gnu/store/…-something-1.2
     /gnu/store/…-its-dependency-2.3

This is because we'd directly abort from 'transaction-upgrade-entry' to
the build handler of 'build-notifier'.

* guix/scripts/package.scm (transaction-upgrade-entry): Call 'string=?'
expression in 'with-build-handler'.
* tests/packages.scm ("transaction-upgrade-entry, grafts"): New test.
2020-03-31 00:06:36 +02:00
Ludovic Courtès 190ddfe21e
guix package: 'transaction-upgrade-entry' uses 'lower-manifest-entry'.
* guix/profiles.scm (lower-manifest-entry): Export.
* guix/scripts/package.scm (transaction-upgrade-entry)[lower-manifest-entry*]
[upgrade]: New procedures.
Use 'lower-manifest-entry*' instead of 'package-derivation' to compute
the output file name of PKG.
2020-03-31 00:06:36 +02:00
Marius Bakke ae0badf5bb
Merge branch 'master' into core-updates
Conflicts:
	gnu/packages/admin.scm
	gnu/packages/commencement.scm
	gnu/packages/guile.scm
	gnu/packages/linux.scm
	gnu/packages/package-management.scm
	gnu/packages/pulseaudio.scm
	gnu/packages/web.scm
2020-03-30 12:17:33 +02:00
Ludovic Courtès 18c8a4396b
deploy: Use 'map/accumulate-builds'.
* guix/scripts/deploy.scm (guix-deploy): Use 'map/accumulate-builds'
instead of 'for-each'.
2020-03-29 23:14:27 +02:00
Ludovic Courtès d089b23335
deploy: Factorize machine deployment.
* guix/scripts/deploy.scm (deploy-machine*): New procedure.
(guix-deploy): Call it in 'for-each'.
2020-03-29 23:14:27 +02:00
Ludovic Courtès 131f50cdc9
'--dry-run' no longer implies '--no-grafts'.
* 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.
2020-03-29 15:32:18 +02:00
Ludovic Courtès 1213ea9bd9
guix build: Use 'map/accumulate-builds'.
* guix/scripts/build.scm (options->derivations): Use
'map/accumulate-builds' instead of 'append-map'.
2020-03-29 15:32:17 +02:00
Marius Bakke 388b432cea
deploy: Remove use of '~*' in format string.
...since 'msgfmt' fails to interpret it.  Reported by Vagrant Cascadian
in <https://lists.gnu.org/archive/html/guix-devel/2020-03/msg00340.html>.
See also <https://bugs.gnu.org/37505>.

* guix/scripts/deploy.scm (show-what-to-deploy): Use ~d instead of ~* when
displaying machines that will be deployed.
2020-03-28 15:55:13 +01:00
Marius Bakke 18af687037
Merge branch 'master' into core-updates
Conflicts:
	gnu/packages/icu4c.scm
	gnu/packages/man.scm
	gnu/packages/python-xyz.scm
	guix/scripts/environment.scm
	guix/scripts/pack.scm
	guix/scripts/package.scm
	guix/scripts/pull.scm
	guix/store.scm
2020-03-27 00:12:15 +01:00
Ludovic Courtès 260eae7893
status: Display synthetic information about profiles being built.
* guix/status.scm (print-build-event): Add 'profile case.
* guix/scripts/package.scm (build-and-use-profile): Remove now redundant
message.
2020-03-26 13:07:19 +01:00
Ludovic Courtès c74f19d758
environment: Use 'with-build-handler'.
* guix/scripts/environment.scm (build-environment): Remove.
(guix-environment): Wrap 'with-status-verbosity' in
'with-build-handler'.  Remove 'dry-run?' conditional.  Use
'built-derivations' instead of 'build-environment'.
2020-03-25 16:02:53 +01:00
Ludovic Courtès 2d5ee2c6e8
archive: Use 'with-build-handler'.
* guix/scripts/archive.scm (export-from-store): Remove call to
'show-what-to-build' and dry-run? condition.
(guix-archive): Wrap 'cond' in 'with-build-handler'.
2020-03-25 16:02:53 +01:00
Christopher Baines 57e12aad6d
scripts: lint: Handle store connections for lint checkers.
Rather than individual checkers opening up a connection to the store for each
package to check, if any checker requires a store connection, open a
connection and pass it to all checkers that would use it. This makes running
the derivation checker much faster for multiple packages.

* guix/scripts/lint.scm (run-checkers): Add a #:store argument, and pass the
store to checkers if they require a store connection.
(guix-lint): Establish a store connection if any checker requires one, and
pass it through to run-checkers.
2020-03-24 19:47:46 +00:00
Ludovic Courtès 637db76d7a
guix system: Fix mistaken 'guix pull' warning upon 'reconfigure'.
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.
2020-03-24 18:54:41 +01:00
Ludovic Courtès 53c594cb3f
pack: Do not store extended attributes in squashfs images.
* guix/scripts/pack.scm (squashfs-image)[build](mksquashfs): Pass "-no-xattrs".
2020-03-24 16:56:19 +01:00
Ludovic Courtès 1292372725
deploy: Write a message upon successful deployment.
* guix/scripts/deploy.scm (guix-deploy): Write message upon successful
deployment.
2020-03-23 10:48:17 +01:00
Ludovic Courtès 1bb248d0b1
deploy: Show what machines will be deployed.
* guix/scripts/deploy.scm (show-what-to-deploy): New procedure.
(guix-deploy): Call it.
2020-03-23 10:48:17 +01:00
Ludovic Courtès 7b322d3c4c
ui: Add 'indented-string'.
* guix/scripts/pull.scm (display-news-entry): Remove extra space in
format string for 'indented-string'.
(indented-string): Remove.
(display-new/upgraded-packages)[pretty]: Pass #:initial-indent? to
'indented-string'.
* guix/ui.scm (indented-string): New procedure.
2020-03-23 10:48:17 +01:00
Ludovic Courtès 9acacb71c9
Remove workaround for 'time-monotonic' in Guile 2.2.2.
This is a followup to e688c2df39.

* build-aux/hydra/evaluate.scm <top level>: Remove 'time-monotonic'
definition.
* guix/cache.scm: Likewise.
* guix/progress.scm: Likewise.
* guix/scripts/substitute.scm: Likewise.
* guix/scripts/weather.scm: Likewise.
* tests/cache.scm: Likewise.
2020-03-22 16:49:47 +01:00
Ludovic Courtès 3e6f65be7a
copy: Use 'with-build-handler'.
* guix/scripts/copy.scm (send-to-remote-host): Remove explicit
'show-what-to-build' call.  Call 'build-derivations' unconditionally.
(guix-copy): Wrap 'with-status-verbosity' in 'with-build-handler'.
2020-03-22 12:42:52 +01:00
Ludovic Courtès 81c0b52bd6
copy: Actually implement '--dry-run'.
* guix/scripts/copy.scm (%options): Add '--dry-run'.
2020-03-22 12:42:52 +01:00
Ludovic Courtès 7473238f7d
copy: Factorize 'with-store' & co.
* guix/scripts/copy.scm (send-to-remote-host): Remove 'with-store' and
'set-build-options-from-command-line' call.  Add 'local' parameter.
(retrieve-from-remote-host): Likewise.
(guix-copy): Wrap 'with-status-verbosity' in 'with-store' and add call
to 'set-build-options-from-command-line'.
2020-03-22 12:42:52 +01:00
Ludovic Courtès a0f480d623
guix system: Use 'with-build-handler'.
* 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'.
2020-03-22 12:42:51 +01:00
Ludovic Courtès 65ffb9388c
guix package, pull: Use 'with-build-handler'.
* guix/scripts/package.scm (build-and-use-profile): Remove #:dry-run?
and #:use-substitutes?.  Remove call to 'show-what-to-build' and
'dry-run?' special case.
(process-actions): Adjust accordingly.
(guix-package*): Wrap 'parameterize' in 'with-build-handler'.
* guix/scripts/pull.scm (build-and-install): Remove #:use-substitutes?
and #:dry-run? and adjust 'update-profile' call accordingly.  Remove
'dry-run?' conditional.
(guix-pull): Wrap body in 'with-build-handler'.
2020-03-22 12:42:51 +01:00
Ludovic Courtès 5f5e9a5cd6
pack: Use 'with-build-handler'.
* guix/scripts/pack.scm (guix-pack): Wrap 'parameterize' in
'with-build-handler'.  Remove explicit call to 'show-what-to-build'.
Call 'build-derivations' regardless of whether OPTS contains 'dry-run?'.
2020-03-22 12:42:51 +01:00
Ludovic Courtès bdda46a67d
deploy: Use 'with-build-handler'.
Until now, 'guix deploy' would never display what is going to be built.

* guix/scripts/deploy.scm (guix-deploy): Wrap 'for-each' in
'with-build-handler'.
2020-03-22 12:42:51 +01:00
Ludovic Courtès 62195b9a8f
guix build: Use 'with-build-handler'.
Fixes <https://bugs.gnu.org/28310>.
Reported by Andreas Enge <andreas@enge.fr>.

* guix/scripts/build.scm (guix-build): Wrap 'parameterize' in
'with-build-handler'.  Remove explicit call to 'show-what-to-build'.
Call 'build-derivations' regardless of whether OPTS contains 'dry-run?'.
2020-03-22 12:42:51 +01:00
Marius Bakke d19b14c834
Merge branch 'master' into core-updates 2020-03-21 22:16:02 +01:00
Ludovic Courtès 892ca1d92f
guix package: Remove unneeded import.
This is a followup to 55e1dfa4dd.

* guix/scripts/package.scm: Remove unneeded #:use-module.
2020-03-19 15:14:08 +01:00
Ludovic Courtès d8e98e853c
scripts: Refer to (default-guile) instead of 'guile-2.2'.
This is a followup to b6bee63bed.

* guix/scripts/environment.scm (guix-environment): Use (default-guile)
instead of (canonical-package guile-2.2) when parameterizing
'%guile-for-build'.
* guix/scripts/pack.scm (guix-pack): Likewise.
* guix/scripts/package.scm (guix-package*): Likewise.
* guix/scripts/pull.scm (guix-pull): Likewise.
2020-03-17 15:36:58 +01:00
Ludovic Courtès 24fb0dc0ab
pack: Do not create a squashfs "recovery file".
Reported by Josh Marshall <Josh.Marshall@jax.org>.

* guix/scripts/pack.scm (squashfs-image)[build](mksquashfs): Always pass
"-no-recovery".
2020-03-13 17:33:38 +01:00
Ludovic Courtès b829864d74
pack: Make bit-reproducible squashfs images.
Reported by Josh Marshall <Josh.Marshall@jax.org>.

* guix/scripts/pack.scm (squashfs-image)[build](mksquashfs): Always pass
"-all-time", "-mkfs-time", "-force-uid", and "-force-gid" to 'mksquashfs'.
2020-03-13 17:33:37 +01:00
Ludovic Courtès b24ec85451
pack: Factorize 'mksquashfs' invocations.
* guix/scripts/pack.scm (squashfs-image)[build](mksquashfs): New
procedure.
Replace instances of (invoke "mksquashfs" ...) with (mksquashfs ...).
2020-03-13 17:33:37 +01:00
Ludovic Courtès a0feabdfdb
weather: '--coverage' filters out non-package objects.
This is a followup to d37b5a1b58.

* guix/scripts/weather.scm (guix-weather): Filter PACKAGES passed to
'report-package-coverage'.
2020-03-13 17:33:37 +01:00
Ludovic Courtès be764b47ad
weather: Exit with non-zero when coverage is below 100%.
* guix/scripts/weather.scm (report-server-coverage): Return the coverage ratio.
(guix-weather): Exit if and only if each server's coverage is 1.
2020-03-13 17:33:37 +01:00
Ludovic Courtès 2843fed0e9
weather: Allow for multiple '--manifest' options.
* guix/scripts/weather.scm (guix-weather)[package-list]: Account for all
the 'manifest entries in OPTS.
* doc/guix.texi (Invoking guix weather): Document it.
2020-03-12 18:32:16 +01:00
Ludovic Courtès 71bb485541
weather: Add '--display-missing'.
* guix/scripts/weather.scm (report-server-coverage): Add
 #:display-missing? and honor it.
(show-help, %options): Add "--display-missing".
(guix-weather): Pass #:display-missing? to 'report-server-coverage'.
* doc/guix.texi (Invoking guix weather): Document it.
2020-03-12 18:32:16 +01:00