Commit Graph

55 Commits

Author SHA1 Message Date
Ricardo Wurmus 00c8a9275c
upstream: update-package-inputs: Sort extra inputs.
Ensure that extra inputs end up in the correct order.

* guix/upstream.scm (update-package-inputs)[filtered-inputs]: Sort new list of
inputs.

Change-Id: Ia5fddd8103a33c79426995057fcce61c2e9e5a72
2024-02-19 11:44:47 +01:00
Ricardo Wurmus b6441f7bd0
upstream: Compare symbols to symbols.
The UNCHANGED? comparison would always yield #FALSE, because we have been
comparing lists of strings with lists of symbols.

* guix/upstream.scm (update-package-inputs): Convert string labels to symbols
before comparison.
2023-09-13 22:17:21 +02:00
Ludovic Courtès 57ceb64e34
upstream: Honor package properties for ignored and extra inputs.
* guix/upstream.scm (update-package-inputs)[filtered-inputs]
[regular-inputs, native-inputs, propagated-inputs]: New procedures.
Use them in 'update-field' calls.
* tests/guix-refresh.sh (GUIX_TEST_UPDATER_TARGETS): Add "libreoffice"
to the dependencies of "the-test-package".  Add 'updater-ignored-inputs'
property to "the-test-package".
* doc/guix.texi (Invoking guix refresh): Document it.
2023-05-31 23:25:26 +02:00
Ludovic Courtès cd262c403f
upstream: Remove <upstream-input-change> and related code.
* guix/upstream.scm (<upstream-input-change>): Remove.
(changed-inputs): Remove.
* tests/upstream.scm (test-package, test-new-package)
("changed-inputs returns no changes")
("changed-inputs returns changes to plain input list")
("changed-inputs returns changes to all plain input lists"): Remove.
2023-05-31 23:25:25 +02:00
Ludovic Courtès ec0a2fc87b
upstream: 'update-package-source' edits input fields.
Previously, 'guix refresh r-ggplot2 -u' and similar commands would print
of list of input changes that would have to be made manually.  With this
change, 'guix refresh -u' takes care of updating input fields
automatically.

* guix/upstream.scm (update-package-inputs): New procedure.
(update-package-source): Call it when 'upstream-source-inputs' returns
true.
* guix/scripts/refresh.scm (update-package): Remove iteration over the
result of 'changed-inputs'.
* guix/import/test.scm (available-updates): Add support for input
lists.
* tests/guix-refresh.sh (GUIX_TEST_UPDATER_TARGETS): Add input list for
"the-test-package".
Make sure 'guix refresh -u' updates 'inputs' accordingly.
* doc/guix.texi (Invoking guix refresh): Mention it.
2023-05-31 23:25:25 +02:00
Ludovic Courtès 9f3ea03516
diagnostics: Factorize 'absolute-location'.
* guix/scripts/style.scm (absolute-location): Move to...
* guix/diagnostics.scm (absolute-location): ... here.
* guix/upstream.scm (update-package-source): Use it.
2023-05-31 23:25:25 +02:00
Ludovic Courtès e6223017d9
upstream: Replace 'input-changes' field by 'inputs'.
Returning the expected list of inputs rather than changes relative to
the current package definition is less ambiguous and offers more
possibilities for further processing.

* guix/upstream.scm (<upstream-source>)[input-changes]: Remove.
[inputs]: New field.
(<upstream-input>): New record type.
* guix/upstream.scm (upstream-input-type-predicate)
(input-type-filter, upstream-source-regular-inputs)
(upstream-source-native-inputs, upstream-source-propagated-inputs): New
procedures.
(changed-inputs): Expect an <upstream-source> as its second argument.
Adjust accordingly.
* guix/import/pypi.scm (distribution-sha256): New procedure.
(maybe-inputs): Expect a list of <upstream-input>.
(compute-inputs): Rewrite to return a list of <upstream-input>.
(pypi-package-inputs, pypi-package->upstream-source): New procedures.
(make-pypi-sexp): Use it.
* guix/import/stackage.scm (latest-lts-release): Define 'cabal'.
Replace 'input-changes' field by 'inputs'.
* guix/scripts/refresh.scm (update-package): Use 'changed-inputs'
instead of 'upstream-source-input-changes'.
* tests/cran.scm ("description->package"): Adjust order of inputs.
* tests/pypi.scm (default-sha256, default-sha256/base32): New variables.
(foo-json): Add 'digests' entry.
("pypi->guix-package, no wheel"): Check HASH against DEFAULT-SHA256/BASE32.
("pypi->guix-package, wheels"): Likewise.
("pypi->guix-package, no usable requirement file."): Likewise.
("pypi->guix-package, package name contains \"-\" followed by digits"):
Likewise.
("package-latest-release"): New test.
* tests/upstream.scm (test-package-sexp): Remove.
("changed-inputs returns no changes"): Rewrite to use <upstream-source>.
(test-new-package-sexp): Remove.
("changed-inputs returns changes to plain input list"): Rewrite.
("changed-inputs returns changes to all plain input lists"): Likewise.
("changed-inputs returns changes to labelled input list")
("changed-inputs returns changes to all labelled input lists"): Remove.
* guix/import/cran.scm (maybe-inputs): Expect PACKAGE-INPUTS to be a
list of <upstream-input>.
(source-dir->dependencies): Return a list of <upstream-input>.
(vignette-builders): Likewise.
(uri-helper, cran-package-source-url)
(cran-package-propagated-inputs, cran-package-inputs): New procedures.
(description->package): Use them instead of local definitions.
(latest-cran-release): Replace 'input-changes' field by 'inputs'.
(latest-bioconductor-release): Likewise.
(format-inputs): Remove.
* guix/import/hackage.scm (cabal-package-inputs): New procedure.
(hackage-module->sexp): Use it.
[maybe-inputs]: Expect a list of <upstream-input>.
2023-05-31 23:25:24 +02:00
Ludovic Courtès cd08d64b3a
refresh: Honor '--key-server'.
Previously, the '--key-server' option would be ignored in an invocation
like:

  ./pre-inst-env guix refresh python-scipy=1.8.1 -t pypi -u \
     --key-server=pgp.mit.edu

* guix/upstream.scm (download-tarball): Add #:key-server parameter and
pass it to 'gnupg-verify*'.
(package-update/url-fetch, package-update/git-fetch)
(package-update): Likewise.
* guix/scripts/refresh.scm (update-package): Add #:key-server and pass
it down to 'package-update'.
(guix-refresh): Pass #:key-server to 'update-package'.
2023-05-18 19:20:58 +02:00
Ludovic Courtès ae587c2ef0
guix: Strip #:use-module lists.
This was obtained by setting up this environment:

  guix shell -D guix --with-input=guile@3.0.9=guile-next \
    --with-commit=guile-next=e2ed33ef0445c867fe56c247054aa67e834861f2
    -- make -j5

then adding 'unused-module' to (@@ (guix build compiler) %warnings),
building, and checking all the "unused module" warnings and removing
those that were definitely unused.
2023-03-13 15:08:33 +01:00
Ludovic Courtès a330bfdf5b
upstream: Allow downgrades.
Previously, 'guix refresh -u guile=3.0.0' would do nothing.  With this
change, it actually downgrades 'guile'.

This is a followup to 8aeccc6240.

* guix/upstream.scm (package-update): Ignore 'version>?' check
when #:version is passed.  Warn about downgrades.
2023-01-03 12:25:48 +01:00
Hartmut Goebel f7eaed6858
upstream: Allow updating to a specific version.
* guix/upstream.scm(package-latest-release): Add keyword-argument 'version'
  and pass it on to the updater's 'import' function.
  (package-update): add keyword-argument 'version' and pass it on to
  package-latest-release.  Differentiate the error message issued when
  no package was found, depending on whether version was given or not.
2022-12-26 17:38:07 +01:00
Hartmut Goebel a274a6a1ac
upstream-updater: Rename record field.
The next commits will make the functions, which are currently importing the
latest version of a package, change into importing the latest or a given
version of the package (for those updaters supporting specifying a version).
Thus the name ‘latest‘ is no longer appropriate.

* guix/upstream.scm (upstream-updater) Rename field [latest] to
  [import]. (lookup-updater, package-latest-release) Adjust fieldname
  accordingly.
* guix/gnu-maintenance.scm (%gnu-updater, %gnu-ftp-updater,
  %savannah-updater, %sourceforge-updater, %xorg-updater,
  %kernel.org-updater, %generic-html-updater),
  guix/import/cpan.scm (%cpan-updater),
  guix/import/cran.scm (%cran-updater, %bioconductor-updater),
  guix/import/crate.scm (%crate-updater),
  guix/import/egg.scm (%egg-updater),
  guix/import/elpa.scm (%elpa-updater),
  guix/import/gem.scm (%gem-updater),
  guix/import/git.scm (%generic-git-updater),
  guix/import/github.scm (%github-updater),
  guix/import/gnome.scm (%gnome-updater),
  guix/import/hackage.scm (%hackage-updater),
  guix/import/hexpm.scm (%hexpm-updater),
  guix/import/kde.scm (%kde-updater),
  guix/import/launchpad.scm (%launchpad-updater),
  guix/import/minetest.scm (%minetest-updater),
  guix/import/opam.scm (%opam-updater),
  guix/import/pypi.scm (%pypi-updater),
  guix/import/stackage.scm (%stackage-updater),
  tests/import-github.scm (found-sexp)
  tests/transformations.scm ("options->transformation, with-latest"):
  Adjust fieldname accordingly.
2022-12-26 17:15:06 +01:00
Ludovic Courtès 692d987d0f
upstream: Factorize 'package-archive-type'.
* guix/upstream.scm (package-archive-type): New procedure.
(package-update/url-fetch): Use it.
2022-11-11 23:17:42 +01:00
Ludovic Courtès e87c6fb95a
upstream: Sort '%updaters' alphabetically.
Previously the output of 'guix refresh --list-updaters' would be
non-deterministic, and likewise the order in which updaters are tried
would be non-deterministic.

Reported by zimoun <zimon.toutoune@gmail.com>.

* guix/upstream.scm (%updaters): Add call to 'sort'.
2022-07-19 18:54:41 +02:00
Ludovic Courtès b512dadfd6
upstream: 'guix refresh -u' no longer stops when upstream info is lacking.
Fixes <https://issues.guix.gnu.org/56338>.

Starting from 53b9c27aa5, 'guix refresh -u'
would stop upon the first failure to determine upstream releases.  This
fixes that.

* guix/upstream.scm (package-update): Warn rather than update.
2022-07-01 23:29:15 +02:00
Ludovic Courtès 53b9c27aa5
upstream: 'package-update' reports "unknown upstream releases" errors.
Fixes <https://issues.guix.gnu.org/55987>.
Reported by John Kehayias <john.kehayias@protonmail.com>.

* guix/upstream.scm (package-update): Instead of calling
'package-latest-release*', call 'package-latest-release' and distinguish
between "up-to-date" and "unknown upstream releases".  Raise an error in
the latter case.
2022-06-15 23:49:24 +02:00
Hartmut Goebel 0d9f1f15cb
import: Add hex.pm importer.
hex.pm is a package repository for Erlang and Elixir.

* guix/scripts/import.scm (importers): Add "hexpm".
* guix/scripts/import/hexpm.scm, guix/import/hexpm.scm,
  guix/hexpm-download.scm: New files.
* guix/import/utils.scm (source-spec->object): Add "hexpm-fetch" to list of
  fetch methods.
* guix/upstream.scm (package-update/hexpm-fetch): New function.
  (%method-updates) Add it.
* Makefile.am: Add them.
2022-06-15 10:18:34 +02:00
Sarah Morgensen 9f526f5dad
upstream: Support updating and fetching 'git-fetch' origins.
Updaters need to be modified to return 'git-reference' objects.
This patch modifies the 'generic-git' and 'minetest' updater,
but others might need to be modified as well.

* guix/git.scm (git-reference->git-checkout): New procedure.
* guix/upstream.scm (package-update/git-fetch): New procedure.
  (<upstream-source>)[urls]: Document it can be a 'git-reference'.
  (%method-updates): Add 'git-fetch' mapping.
  (update-package-source): Support 'git-reference' sources.
  (upstream-source-compiler/url-fetch): Split off from ...
  (upstream-source-compiler): ... this, and call ...
  (upstream-source-compiler/git-fetch): ... this new procedure if the URL
  field contains a 'git-reference'.
* guix/import/git.scm
  (latest-git-tag-version): Always return two values and document that the tag
  is returned as well.
  (latest-git-release)[urls]: Use the 'git-reference' instead of the
  repository URL.
* guix/import/minetest.scm (latest-minetest-release)[urls]: Don't wrap the
  'git-reference' in a list.
* tests/minetest.scm (upstream-source->sexp): Adjust to new convention.

Co-authored-by: Maxime Devos <maximedevos@telenet.be>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-01-06 16:27:30 +01:00
Ricardo Wurmus e86afe58ff
guix/upstream: Let changed-inputs support the new input lists.
* guix/upstream.scm (changed-inputs): Add match clauses for new-style input
lists.
2022-01-05 21:17:58 +01:00
Tobias Geerinckx-Rice a1679b74c9
Revert the #51061 patch series for now.
This reverts commits f63c79bf76
..f86f7e24b39928247729020df0134e2e1c4cde62 for more chillax reviewing.

See <https://issues.guix.gnu.org/51061#32>.
2021-10-08 23:31:34 +02:00
Hartmut Goebel d780d0a2bb
import: Add hex.pm importer.
hex.pm is a package repository for Erlang and Elixir.

* guix/scripts/import.scm (importers): Add "hexpm".
* guix/scripts/import/hexpm.scm, guix/import/hexpm.scm,
  guix/hexpm-download.scm: New files.
* guix/import/utils.scm (source-spec->object): Add "hexpm-fetch" to list of
  fetch methods.
* guix/upstream.scm (package-update/hexpm-fetch): New function.
  (%method-updates) Add it.
* Makefile.am: Add them.
2021-10-07 22:35:28 +02:00
Ludovic Courtès 35ca3cfbcf
upstream: 'package-latest-release' tries all the matching updaters.
* guix/upstream.scm (package-latest-release): Try UPDATERS until one of
them returns an upstream source.  This is useful for packages with
several matching updaters, such a zlib ('sourceforge' and
'generic-html').
2021-04-06 23:59:46 +02:00
Ludovic Courtès 9ab817b2a4
transformations: Add '--with-latest'.
* guix/upstream.scm (upstream-source-compiler): New procedure.
(%updaters): Set! it.
* guix/transformations.scm (transform-package-latest): New procedure.
(%transformations): Add 'with-latest'.
(%transformation-options, show-transformation-options-help/detailed):
Add '--with-latest'.
* tests/transformations.scm ("options->transformation, with-latest"):
New test.
* doc/guix.texi (Package Transformation Options): Document it.
2021-01-19 17:45:39 +01:00
Ludovic Courtès 069bb95ab2
upstream: Make the 'updaters' parameter optional.
* guix/upstream.scm (lookup-updater, package-latest-release)
(package-latest-release*, package-update): Make 'updaters' an optional
parameter.
* guix/lint.scm (check-for-updates): Remove second argument to
'package-latest-release*'.
2021-01-07 12:08:41 +01:00
Danny Milosavljevic bc76f8b1f9
upstream: Handle the case where the file name has no extension.
Fixes <https://bugs.gnu.org/42504>.
Reported by Alexandru-Sergiu Marton <brown121407@posteo.ro>.

* guix/upstream.scm (package-update/url-fetch): Handle the case where the
file name has no extension.
2020-07-27 13:35:49 +02:00
Ludovic Courtès d51bfe242f
Use 'formatted-message' instead of '&message' where appropriate.
* gnu.scm (%try-use-modules): Use 'formatted-message' instead of
'&message'.
* gnu/machine/digital-ocean.scm (maybe-raise-unsupported-configuration-error):
Likewise.
* gnu/machine/ssh.scm (machine-check-file-system-availability): Likewise.
(machine-check-building-for-appropriate-system): Likewise.
(deploy-managed-host): Likewise.
(maybe-raise-unsupported-configuration-error): Likewise.
* gnu/packages.scm (search-patch): Likewise.
* gnu/services.scm (%service-with-default-value): Likewise.
(files->etc-directory): Likewise.
(fold-services): Likewise.
* gnu/system.scm (locale-name->definition*): Likewise.
* gnu/system/mapped-devices.scm (check-device-initrd-modules): Likewise.
(check-luks-device): Likewise.
* guix/channels.scm (latest-channel-instance): Likewise.
* guix/cve.scm (json->cve-items): Likewise.
* guix/git-authenticate.scm (commit-signing-key): Likewise.
(commit-authorized-keys): Likewise.
(authenticate-commit): Likewise.
(verify-introductory-commit): Likewise.
* guix/remote.scm (remote-pipe-for-gexp): Likewise.
* guix/scripts/graph.scm (assert-package): Likewise.
* guix/scripts/offload.scm (private-key-from-file*): Likewise.
* guix/ssh.scm (authenticate-server*): Likewise.
(open-ssh-session): Likewise.
(remote-inferior): Likewise.
* guix/ui.scm (matching-generations): Likewise.
* guix/upstream.scm (package-update): Likewise.
* tests/channels.scm ("latest-channel-instances, missing introduction for 'guix'"):
Catch 'formatted-message?'.
("authenticate-channel, wrong first commit signer"): Likewise.
* tests/lint.scm ("patches: not found"): Adjust message string.
* tests/packages.scm ("patch not found yields a run-time error"): Catch
'formatted-message?'.
* guix/lint.scm (check-patch-file-names): Handle 'formatted-message?'.
(check-derivation): Ditto.
2020-07-25 19:11:37 +02:00
Ludovic Courtès fa3d9c4db4
upstream: 'download-tarball' gracefully handles missing signatures.
This avoids a backtrace with "guix refresh -u rdiff-backup", which has
".asc" signatures instead of ".sig".

* guix/upstream.scm (download-tarball): Gracefully handle the case where
SIG is false.
* guix/gnu-maintenance.scm (latest-savannah-release): Add comment about
'file->signature'.
2020-07-21 17:50:44 +02:00
Ludovic Courtès 1c26219f94
upstream: Use 'warning' instead of 'format'.
* guix/upstream.scm (update-package-source): Use 'warning' instead of 'format'.
2020-07-20 23:25:10 +02:00
Ludovic Courtès 00290e7365
upstream: Define 'url-predicate' and use it.
* guix/upstream.scm (url-predicate): New procedure.
(url-prefix-predicate): Define in terms of 'url-predicate'.
* guix/import/cpan.scm (cpan-package?): Use 'url-predicate'.
* guix/import/cran.scm (cran-package?)
(bioconductor-package?)
(bioconductor-data-package?)
(bioconductor-experiment-package?): Likewise.
* guix/import/crate.scm (crate-package?): Likewise.
* guix/import/elpa.scm (package-from-gnu.org?): Likewise.
* guix/import/hackage.scm (hackage-package?): Likewise.
* guix/import/pypi.scm (pypi-package?): Likewise.
* guix/import/gem.scm (gem-package?): Use 'url-prefix-predicate'.
2020-07-03 23:53:31 +02:00
Ludovic Courtès c7d2dd6900
upstream: Use 'origin-hash'.
* guix/upstream.scm (update-package-source): Use 'origin-hash' instead
of 'origin-sha256'.
2020-05-22 01:30:10 +02:00
Ludovic Courtès f94f9d67e6
gnupg: 'gnupg-verify*' returns a status symbol.
This allows callers to distinguish between signature verification
failure and missing key.

* guix/gnupg.scm (gnupg-receive-keys): Return true on success.
(gnupg-verify*): Check return value of 'gnupg-receive-keys'.  Return two
values, the first one being a symbol.
* guix/upstream.scm (download-tarball): Get the two return values of
'gnupg-verify*', and match on the first one.
* gnu/packages/bash.scm (download-patches): Check the first return value
of 'gnupg-verify*'.
2019-12-20 22:06:05 +01:00
Ludovic Courtès 7c101c4c17
refresh: Distinguish between "no updater" and "failing updater".
Previously, something like "guix refresh texmacs" would report "no
updater".  Now, it reports that the 'gnu-ftp' updater failed to list
releases.

* guix/upstream.scm (lookup-updater): Use 'find' instead of 'any' to
return the <upstream-updater>.
(package-latest-release): Adjust accordingly.
* guix/scripts/refresh.scm (check-for-package-update): When
'package-latest-release' returns #f, distinguish between "no updater"
and "failing updater".
2019-09-10 00:34:40 +02:00
Ludovic Courtès 0ea009db9d
upstream: Gracefully handle archive type changes.
Previously, if the currently used archive type (e.g., "bz2") was
unavailable for the new version, 'guix refresh -u' would crash instead
of updating to the archive with the new type.

* guix/upstream.scm (package-update/url-fetch): When URL is #f, pick the
first of URLS; likewise for SIGNATURE-URL.
2019-08-17 23:18:11 +02:00
Ludovic Courtès 42314ffa07
refresh: Update the source code URL.
Reported by Tobias Geerinckx-Rice <me@tobias.gr>
in <https://bugs.gnu.org/35010>.

* guix/upstream.scm (update-package-source): Take 'source' instead of
'version' as the second argument.
[update-expression]: Change to take 'replacements', a list of
replacement pairs.
Compute OLD-URL and NEW-URL and replace the dirname of the OLD-URL with
that of NEW-URL.
* guix/scripts/refresh.scm (update-package): Adjust call to
'update-package-source' accordingly.
2019-03-27 14:59:42 +01:00
Ludovic Courtès 1ee3d2dcb8
upstream: 'package-update' returns the <upstream-source> object.
Fixes a regression introduced in
abd4d6b33d, where CHANGES would no longer
be a thunk.

Reported by Ricardo Wurmus.

* guix/upstream.scm (package-update/url-fetch): Return SOURCE as the
third value instead of CHANGES.
* guix/scripts/refresh.scm (update-package): Adjust accordingly.
2019-03-27 14:59:41 +01:00
Ludovic Courtès 0bd1498fc4
upstream: Correctly report failure to update Git checkouts.
Fixes <https://bugs.gnu.org/34778>.
Reported by Gábor Boskovits <boskovits@gmail.com>.

* guix/upstream.scm (package-update/url-fetch): New procedure, with code
formerly in 'package-update'.
(%method-updates): New variable.
(package-update): Check the method to download PACKAGE's source, and
look up a corresponding update method in %METHOD-UPDATES, and raise an
error if none was found.
2019-03-08 23:21:59 +01:00
Ricardo Wurmus 7e634c2f53
refresh: Suggest input changes when updating.
* guix/upstream.scm (<upstream-source>)[input-changes]: New field.
(<upstream-input-change>): New record.
(upstream-input-change?, upstream-input-change-name,
upstream-input-change-type, upstream-input-change-action, changed-inputs): New
procedures.
(package-update): Pass along input changes.
* guix/script/refresh.scm (update-package): Process input changes.
2019-01-12 23:35:11 +01:00
Ludovic Courtès 3c0128b035
discovery: Remove dependency on (guix ui).
This reduces the closure of (guix discovery) from 28 to 8 modules.

* guix/discovery.scm (scheme-files): Use 'format' instead of 'warning'.
(scheme-modules): Add #:warn parameter.  Use it instead of
'warn-about-load-error'.
(fold-modules): Add #:warn and pass it to 'scheme-modules'.
(all-modules): Likewise.
* gnu/bootloader.scm (bootloader-modules): Pass #:warn to 'all-modules'.
* gnu/packages.scm (fold-packages): Likewise.
* gnu/services.scm (all-service-modules): Likewise.
* guix/upstream.scm (importer-modules): Likewise.
2018-04-08 17:48:33 +02:00
Ludovic Courtès 618f0582b4
upstream: Reject bogus archive type guesses.
This would crash 'guix refresh -u' with source URLs ending in
"…/v1.2.3".

* guix/upstream.scm (package-update): Be stricter when determining
ARCHIVE-TYPE.
2017-12-19 18:16:47 +01:00
Efraim Flashner adf0c531a8
guix: lint: Add checker for new upstream versions.
* guix/scripts/lint.scm (check-for-updates): New procedure.
(%checkers): Add it.
* guix/scripts/refresh.scm (importer-modules, %updaters): Move
from here ...
* guix/upstream.scm: ... to here.
2017-10-09 14:05:17 +03:00
Ludovic Courtès 97abc90733
upstream: Add 'url-prefix-predicate'.
* guix/gnu-maintenance.scm (url-prefix-predicate): Move to...
* guix/upstream.scm (url-prefix-predicate): ... here.
2017-09-26 00:35:06 +02:00
Ludovic Courtès 69daee23af
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance.  See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.

* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'.  Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 16:16:17 +02:00
Ludovic Courtès 3b2dc9edcd
upstream: Avoid '_' as a pattern variable in 'match'.
* guix/upstream.scm (lookup-updater): Don't use '_' as a pattern
variable.
2017-03-14 11:19:21 +01:00
David Craven 6976c68158
upstream: Determine archive type correctly.
* guix/upstream.scm (package-update): Take the basename of the uri
  before trying to determine the extension.
2016-12-15 05:57:03 +01:00
Ludovic Courtès af72a21a69
upstream: Use first url when it lacks an extension.
* guix/upstream.scm (package-update): Use a url from the list when it
  lacks an extension.
2016-12-14 14:20:50 +01:00
Ludovic Courtès 8d5d06282e
upstream: Properly verify signatures of uncompressed tarballs.
* guix/upstream.scm (uncompressed-tarball): New procedure.
(download-tarball): Use it when the basename of SIGNATURE-URL doesn't
contain the basename of URL.
2016-11-30 17:35:21 +01:00
Ludovic Courtès e9c72306fd
refresh: Warn about packages that lack an updater.
* guix/upstream.scm (package-update-path): Rename to...
(package-latest-release): ... this.  Remove 'version>?' check.
(package-latest-release*): New procedure.
(package-update): Use it.
* guix/scripts/refresh.scm (lookup-updater): Rename to...
(lookup-updater-by-name): ... this.
(warn-no-updater): New procedure.
(update-package): Add #:warn? parameter and honor it.
(check-for-package-update): New procedure.
(guix-refresh)[warn?]: New variable.
Replace inline code when UPDATE? is false with a call to
'check-for-package-update'.
Pass WARN? to 'check-for-package-update' and 'update-package'.
* doc/guix.texi (Invoking guix refresh): Document it.  Fix a couple of
typos.
2016-11-29 16:12:31 +01:00
Ludovic Courtès 149590380a
import: Gracefully report import failures.
Previously, something like 'guix import gnu which' would spit out a
backtrace if, say, the 'which' tarball could not be authenticated.

* guix/upstream.scm (download-tarball): Mention failure modes in
docstring.
* guix/import/gnu.scm (gnu-package->sexp): Return #f when
'download-tarball' returns #f.
* guix/scripts/import.scm (guix-import): Call 'leave' when IMPORTER does
not return a (package ...) sexp.
2016-05-17 14:02:48 +02:00
Ludovic Courtès 7d27a0259b upstream: Pass a package object to updaters.
* guix/upstream.scm (package-update-path): Pass PACKAGE to
'latest-release'.
* guix/gnu-maintenance.scm (latest-release*)
(latest-gnome-release, latest-xorg-release): Adjust accordingly.
* guix/import/cran.scm (latest-cran-release):
(latest-bioconductor-release): Likewise.
* guix/import/elpa.scm (latest-release): Likewise.
* guix/import/gem.scm (latest-release): Likewise.
* guix/import/github.scm (latest-release): Likewise.
* guix/import/hackage.scm (latest-release): Likewise.
* guix/import/pypi.scm (latest-release): Likewise.
2016-04-15 00:32:18 +02:00
宋文武 2b8e9d9ed4 gnu-maintenance: update-package-source: Only update the desired package.
Fixes <http://bugs.gnu.org/22693>.
Suggested by Andy Wingo.

* guix/upstream.scm (update-package-source): Rewrite in terms of 'edit-expression'.
2016-04-13 09:17:01 +08:00