summaryrefslogtreecommitdiff
path: root/guix/scripts/pull.scm
Commit message (Collapse)AuthorAge
* '--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.
* ui: Add 'indented-string'.Ludovic Courtès2020-03-23
| | | | | | | | | * 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.
* guix package, pull: Use 'with-build-handler'.Ludovic Courtès2020-03-22
| | | | | | | | | | | | * 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'.
* describe: Remove dependency on (guix scripts pull).Ludovic Courtès2020-02-11
| | | | | | | | | | | Until now, 'guix describe' would perform ~3K stat calls and ~1K openat calls because it was pulling (guix scripts pull), which in turn pulls in many (gnu packages …) modules. * guix/scripts/pull.scm (display-profile-content, %vcs-web-views) (channel-commit-hyperlink): Move to... * guix/scripts/describe.scm: ... here. Remove import of (guix scripts pull).
* Adjust module autoloads.Ludovic Courtès2020-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Guile < 2.9.7, autoloading a module would give you access to all its bindings. In future versions, autoloading a module gives access only to the listed bindings, as per #:select (see <https://bugs.gnu.org/38895>). This commit adjusts autoloads to the new semantics, allowing Guix to be built with Guile 2.9.7/2.9.8. * guix/build/download.scm <top level>: Remove call to 'module-autoload!'. (load-gnutls): New procedure. (tls-wrap): Call it. * guix/git.scm <top level>: Remove call to 'module-autoload!'. (load-git-submodules): New procedure. (update-submodules): Call it instead of 'resolve-interface'. * gnu/bootloader/grub.scm: Replace #:autoload with #:use-module. * gnu/packages.scm: Likewise. * gnu/packages/ssh.scm: Likewise. * gnu/packages/tex.scm: Likewise. * gnu/services/cuirass.scm: Likewise. * gnu/services/mcron.scm: Likewise. * guix/lint.scm: Augment list of bindings in #:autoload. * guix/scripts/build.scm: Likewise. * guix/scripts/gc.scm: Likewise. * guix/scripts/pack.scm: Likewise. * guix/scripts/publish.scm: Likewise. * guix/scripts/pull.scm: Likewise. * guix/utils.scm: Remove unnecessary #:autoload clauses; replace one of them with #:use-module.
* 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.
* ui: Factorize 'with-profile-lock'.Ludovic Courtès2019-11-29
| | | | | | | | | * guix/ui.scm (profile-lock-handler, profile-lock-file): New procedures. (with-profile-lock): New macro. * guix/scripts/package.scm (process-actions): Use 'with-profile-lock' instead of 'with-file-lock/no-wait'. * guix/scripts/pull.scm (guix-pull): Likewise.
* pull, describe: Emit hyperlinks for commit identifiers.Ludovic Courtès2019-11-28
| | | | | | | | | | * guix/scripts/pull.scm (%vcs-web-views): New variable. (channel-commit-hyperlink): New procedure. (display-news-entry): Add 'channel' parameter. When 'supports-hyperlinks?' returns true, call 'channel-commit-hyperlink'. (display-profile-content): Likewise, and define CHANNEL. (display-channel-specific-news): Pass CHANNEL to 'display-news-entry'. * guix/ui.scm (hyperlink): Make public.
* 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.
* pull: Acquire a lock for the target profile.Ludovic Courtès2019-11-19
| | | | | | | This is a followup to b1fb663404894268b5ee92c040f12c52c0bee425. * guix/scripts/pull.scm (guix-pull): Wrap 'run-with-store' call in 'with-file-lock/no-wait'.
* time-machine: Handle 'git-error' exceptions.Ludovic Courtès2019-11-15
| | | | | | * guix/scripts/pull.scm (with-git-error-handling): Export. * guix/scripts/time-machine.scm (guix-time-machine): Wrap body in 'with-git-error-handling'.
* Add 'guix time-machine'.Konrad Hinsen2019-11-15
| | | | | | | | | | | | * guix/scripts/time-machine.scm: New file. * Makefile.am: (MODULES): Add it. * guix/scripts/pull.scm (channel-list): Export. * guix/inferior.scm (cached-channel-instance): New procedure. (inferior-for-channels): Use it. * doc/guix.texi (Invoking guix time-machine): New section. (Channels): Cross-reference it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* pull: Remove unused '--verbose' option.Ludovic Courtès2019-11-15
| | | | | | | | | This option had been ignored since commit 0d39a3b98948314e135566b9315717695a9035ea (August 2018). * guix/scripts/pull.scm (show-help, %options): Remove "--verbose". (build-and-install): Remove #:verbose?, which was unused. (guix-pull): Adjust accordingly.
* pull: Gracefully handle invalid Texinfo markup in news.Ludovic Courtès2019-11-01
| | | | | | | | | Reported by Oleg Pykhalov <go.wigust@gmail.com>. * guix/scripts/pull.scm (display-news-entry-title) (display-news-entry): Catch 'parser-error' around call to 'texi->plain-text', and return Texinfo as-is when an exception is caught.
* pull: Honor '/etc/guix/channels.scm'.Ludovic Courtès2019-10-27
| | | | | | * guix/scripts/pull.scm (channel-list)[global-file]: New variable. [channels]: Honor it. * doc/guix.texi (Invoking guix pull): Document it.
* pull: Call 'ensure-default-profile' after 'set-build-options'.Ludovic Courtès2019-10-18
| | | | | | | | | | This is a followup to 81c580c8664bfeeb767e2c47ea343004e88223c7. * guix/scripts/pull.scm (guix-pull): Move 'ensure-default-profile' call after 'set-build-options-from-command-line' call. This ensures that the 'profiles/per-user/$USER' directory is created before 'ensure-default-profile' is called when 'GUIX_DAEMON_SOCKET' points to a remote TCP daemon.
* pull: Do not use '~*', which 'msgfmt' fails to interpret.Konrad Hinsen2019-10-01
| | | | | | | | | | Really fixes <https://bugs.gnu.org/37505>. This is a followup to f751b4646d3989d76dad9e33e39f9724c7c50be6. * guix/scripts/pull.scm (display-channel-news): Remove second occurrence of '~*' in a format string. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* pull: Do not use '~*', which 'msgfmt' fails to interpret.Ludovic Courtès2019-10-01
| | | | | | | | Fixes <https://bugs.gnu.org/37505>. Reported by Konrad Hinsen <konrad.hinsen@fastmail.net>. * guix/scripts/pull.scm (display-channel-news): Use ~a instead of ~* when reporting new channels.
* pull: Dim the commit ID when displaying news.Ludovic Courtès2019-09-25
| | | | * guix/scripts/pull.scm (display-news-entry): Dim the commit line.
* pull: Use ~/.cache/guix/checkouts instead of ~/.cache/guix/pull.Ludovic Courtès2019-09-23
| | | | | | | | | Previously 'channel-news-for-commit' would use the former while 'guix pull' would use the latter. Consequently, the first 'guix pull -N' would clone the repository anew. * guix/scripts/pull.scm (guix-pull): Remove 'cache', and leave %REPOSITORY-CACHE-DIRECTORY to its default value.
* pull: Display news titles directly upon 'pull'.Ludovic Courtès2019-09-23
| | | | | | | | | | | | | * guix/scripts/pull.scm (display-profile-news): Return true when there's more to display. (display-news-entry-title): New procedure. (display-news-entry): Use it. (display-channel-specific-news): Return true when there's more to display. (display-channel-news-headlines): New procedure. (build-and-install): Call it. When 'display-channel-news-headlines' or 'display-profile-news' returns #t, print a hint to run "pull --news". (display-new/upgraded-packages): Return true when there's more to display.
* pull: '-l' displays channel news.Ludovic Courtès2019-09-23
| | | | | | * guix/scripts/pull.scm (display-channel-news): Make 'previous' a parameter. (process-query)[list-generations]: Call 'display-channel-news'.
* pull: Display channel news.Ludovic Courtès2019-09-23
| | | | | | | | * guix/scripts/pull.scm (display-news-entry) (display-channel-specific-news): New procedures. (display-channel-news): Call it. (display-new/upgraded-packages): Adjust hint message. * doc/guix.texi (Invoking guix pull): Mention it.
* pull: '--news' shows the list of channels added or removed.Ludovic Courtès2019-09-23
| | | | | | * guix/scripts/pull.scm (display-channel, channel=?) (display-channel-news, display-news): New procedures. (process-query): Call 'display-news' instead of 'display-profile-news'.
* scripts: pull: Add options for generation managementKonrad Hinsen2019-09-18
| | | | | | | | | | | * guix/scripts/pull.scm (%options) Add --roll-back, --switch-generation, --delete-generations (process-generation-change): New function (guix-pull): Execute generation management operations * doc/guix.texi: Document the generation management operations Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* pull: Work around Ubuntu's 'sudo'.Ludovic Courtès2019-09-18
| | | | | | | | Partly fixes <https://bugs.gnu.org/36785>. Reported by Julien Lepiller <julien@lepiller.eu>. * guix/scripts/pull.scm (ensure-default-profile): Do not call 'migrate-generations' when "SUDO_USER" is set.
* pull: Pass #:use-substitutes? to 'show-what-to-build'.Ludovic Courtès2019-07-18
| | | | | | | | | Fixes <https://bugs.gnu.org/36509>. Reported by Robert Vollmert <rob@vllmrt.net>. * guix/scripts/pull.scm (build-and-install): Add #:use-substitutes? parameter and pass it to UPDATE-PROFILE. (guix-pull): Pass #:use-substitutes? to 'build-and-install'.
* pull: Use (ice-9 format).Ludovic Courtès2019-07-18
| | | | | * guix/scripts/pull.scm (guix): Use (ice-9 format), as reported by '-Wformat'.
* pull: Remove unused procedures.Ludovic Courtès2019-07-18
| | | | * guix/scripts/pull.scm (what-to-build, indirect-root-added): Remove.
* 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.
* pull: Display 'hash guix' hint when the new and old 'guix' are different.Ludovic Courtès2019-05-09
| | | | | | | | | | | | Fixes <https://bugs.gnu.org/35601>. Reported by Diego Nicola Barbato <dnbarbato@posteo.de>. Previously we were calling (which "guix") after the new profile had been built and symlinked, so in most cases the hint would not be triggered, even though it should have been triggered. * guix/scripts/pull.scm (build-and-install)[guix-command]: New variable. Compare PROFILE/bin/guix against GUIX-COMMAND.
* pull: Create profile after the store connection has been opened.Ludovic Courtès2019-04-22
| | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/35341>. Reported by Florian Pelz <pelzflorian@pelzflorian.de>. Previously, we'd call 'ensure-default-profile' before the connection to the daemon has been opened. On the first connection, the daemon ensures that /var/guix/profiles/per-user is world-writable. Since we were calling 'ensure-default-profile' before that, /var/guix/profiles/per-user was typically non-writable (555 and root-owned), and thus 'guix pull' would error out. * guix/scripts/pull.scm (guix-pull): Call 'ensure-default-profile' within 'with-store'.
* pull: Add '--news'.Ludovic Courtès2019-04-22
| | | | | | | | | | | | | Suggested by Tobias Geerinckx-Rice <me@tobias.gr>. * guix/scripts/pull.scm (%options, show-help): Add '--news'. (display-profile-news): Add #:current-is-newer? and #:concise?. Honor them. (build-and-install): Pass #:concise? #t. (display-new/upgraded-packages)[concise/max-item-count]: New variable. Add call to 'display-hint'. (process-query): Add clause for 'display-news'. * doc/guix.texi (Invoking guix pull): Add '--news'.
* pull: '--url', '--commit', and '--branch' apply to the 'guix' channel.Ludovic Courtès2019-04-17
| | | | | | | | Suggested by pkill9 <pkill9@runbox.com>. * guix/scripts/pull.scm (channel-list): Apply REF and URL to the 'guix' channel. * doc/guix.texi (Invoking guix pull): Adjust accordingly.
* pull: Remove duplicate '--dry-run' description.Ludovic Courtès2019-04-10
| | | | | | | Reported by pkill9. * guix/scripts/pull.scm (show-help): Remove duplicate '--dry-run' description.
* pull: Truncate the list of packages displayed on completion.Ludovic Courtès2019-03-28
| | | | | | | | | | | Previously, if you'd run 'guix pull' after a couple of weeks, it would fill your screen with package names, which is unhelpful. * guix/scripts/pull.scm (ellipsis): New procedure. (display-new/upgraded-packages): Add #:concise?. [list->enumeration]: New procedure. Use it instead of 'string-join'. (display-profile-news): Pass #:concise? #t.
* pull: Factorize pretty-printing for new/upgraded package lists.Ludovic Courtès2019-03-28
| | | | | | * guix/scripts/pull.scm (display-new/upgraded-packages)[pretty]: New procedure. Use it.
* pull: Speed up the new/upgraded package computation.Ludovic Courtès2019-02-12
| | | | | | * guix/scripts/pull.scm (new/upgraded-packages): OLD no longer stores all the versions of each package. Remove 'vhash-fold*' call and reduce the number of 'version>?' calls when computing UPGRADED.
* pull: Move profile comparison to 'new/upgraded-packages'.Ludovic Courtès2019-02-12
| | | | | | * guix/scripts/pull.scm (new/upgraded-packages): New procedure, with code formerly in 'display-new/upgraded-packages'. (display-new/upgraded-packages): Use it.
* pull: Use 'fold-available-packages' for the current package list.Ludovic Courtès2019-02-12
| | | | | | * guix/scripts/pull.scm (display-profile-news): Use 'fold-available-packages' instead of 'fold-packages' to compute OLD. (profile-package-alist): Use 'inferior-available-packages'.
* 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.
* git: Always use the system certificates by default.Ludovic Courtès2019-02-08
| | | | | | | | | | | | 'guix pull' was always doing it, and now '--with-branch' & co. will do it as well. * guix/git.scm (honor-system-x509-certificates!): New procedure. (%certificates-initialized?): New variable. (with-libgit2): Add call to 'honor-system-x509-certificates!'. * guix/scripts/pull.scm (honor-x509-certificates): Call 'honor-system-x509-certificates!' and fall back to 'honor-lets-encrypt-certificates!'.
* pull: Default to verbosity level 1.Ludovic Courtès2019-01-29
| | | | * guix/scripts/pull.scm (%default-options): Change 'verbosity to 1.
* pull: Don't trigger 'hash guix' hint needlessly.Ludovic Courtès2019-01-28
| | | | | | | | | Previously if ~/.config/guix/current/bin was in $PATH, we'd still suggest to run 'hash guix' because we'd compare (which "guix") against /var/guix/profiles/per-user/…. * guix/scripts/pull.scm (build-and-install): Check whether (which "guix") matches PROFILE or its user-friendly variant.
* pull: Add missing import.Ludovic Courtès2019-01-20
| | | | | | | | | Fixes <https://bugs.gnu.org/34136>. Reported by Pierre Neidhardt <mail@ambrevar.xyz>. Fixes wrong-type-arg crash of "guix pull -p /does-not-exist -l". * guix/scripts/pull.scm: Use (srfi srfi-34).
* pull: Suggest running 'hash guix' if needed.Ludovic Courtès2019-01-18
| | | | | | | | Fixes <https://bugs.gnu.org/33647>. Suggested by Diego Nicola Barbato <dnbarbato@posteo.de>. * guix/scripts/pull.scm (build-and-install): Before returning, display a hint if (which "guix") is not in PROFILE.
* channels: Compute a package cache and use it.Ludovic Courtès2019-01-15
| | | | | | | | | | | | | | | | | | | * gnu/packages.scm (cache-is-authoritative?, load-package-cache) (cache-lookup, generate-package-cache): New procedures. (%package-cache-file): New variable. (find-packages-by-name): Rename to... (find-packages-by-name/direct): ... this. (find-packages-by-name): Rewrite to use the package cache when 'cache-is-authoritative?' returns true. * tests/packages.scm ("find-packages-by-name + version, with cache") ("find-packages-by-name with cache"): New tests. * guix/channels.scm (package-cache-file): New procedure. (%channel-profile-hooks): New variable. (channel-instances->derivation): Use it in #:hooks. * guix/scripts/package.scm (build-and-use-profile): Add #:hooks and honor it. * guix/scripts/pull.scm (build-and-install): Pass #:hooks to UPDATE-PROFILE.
* pull: Don't prepend "origin/" to branch names.Ludovic Courtès2019-01-14
| | | | | | | This is a followup to 37a6cdbf1b3503d3e60840a176318284b1f7ca25. * guix/scripts/pull.scm (%options): Don't prepend "origin/" to branch names.
* 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.