Commit Graph

8 Commits

Author SHA1 Message Date
Marius Bakke 16ef7b4938
transformations: Git tags and 'git describe' style IDs are used as version.
* guix/transformations.scm (commit->version-string): New procedure.  Use git
tags and 'git describe' style identifiers directly.
(transform-package-source-commit): Adjust accordingly.
* tests/transformations.scm
("options->transformation, with-commit, version transformation"): New test.
* doc/guix.texi (Package Transformation Options): Mention the 'git describe'
style.
2021-09-08 18:03:50 +02:00
Ludovic Courtès 373e7ac4f9
transformations: 'with-patch' works on non-origin sources.
Fixes <https://issues.guix.gnu.org/49697>.
Reported by Philippe Swartvagher <philippe.swartvagher@inria.fr>.

* guix/transformations.scm (patched-source): New procedure.
(transform-package-patches)[package-with-extra-patches]: Use it
when (package-source p) is not an origin.
* tests/transformations.scm ("options->transformation, with-commit +
with-patch"): New test.
2021-08-11 16:35:28 +02:00
Ludovic Courtès 7ccf416dd0
transformations: '--with-latest' correctly handles already-latest case.
Previously, '--with-latest' would wrongfully print:

  warning: could not determine latest upstream release of 'xyz'

when 'xyz' is already the latest version.  This fixes that.

* guix/transformations.scm (transform-package-latest): Use
'package-latest-release' instead of 'package-latest-release*'.
2021-06-08 23:28:04 +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 e38d90d497
transformations: Add '--with-patch'.
Suggested by Philippe Swartvagher <philippe.swartvagher@inria.fr>.

* guix/transformations.scm (transform-package-patches): New procedure.
(%transformations): Add it as 'with-patch'.
(%transformation-options, show-transformation-options-help/detailed):
Add '--with-patch'.
* tests/transformations.scm ("options->transformation, with-patch"): New
test.
* doc/guix.texi (Package Transformation Options): Document it.
2020-12-27 17:23:40 +01:00
Ludovic Courtès e79ecff045
transformations: Show '--help-transform' only where applicable.
Fixes <https://bugs.gnu.org/44773>.
Reported by Florian Pelz <pelzflorian@pelzflorian.de>.

This fixes a regression introduced in
6701f64f73.

* guix/transformations.scm (%transformation-options): Add
"--help-transform".
(show-transformation-options-help): Rename to...
(show-transformation-options-help/detailed): ... this.
(show-transformation-options-help): New public procedure.
* guix/scripts/build.scm (show-build-options-help): Remove
"--help-transform".
(%standard-build-options): Likewise.
(show-help): Call 'show-transformation-options-help'.
* guix/scripts/environment.scm (show-help): Likewise.
* guix/scripts/graph.scm (show-help): Likewise.
* guix/scripts/install.scm (show-help): Likewise.
* guix/scripts/pack.scm (show-help): Likewise.
* guix/scripts/package.scm (show-help): Likewise.
* guix/scripts/upgrade.scm (show-help): Likewise.
2020-11-21 12:39:14 +01:00
Ludovic Courtès 31726f32ac
transformations: Raise '&formatted-message' exceptions instead of 'leave'.
* guix/transformations.scm (evaluate-replacement-specs)
(package-git-url, evaluate-git-replacement-specs)
(transform-package-source-git-url)
(transform-package-toolchain): Use 'raise' and 'formatted-message'
instead of 'leave'.
2020-10-31 23:16:43 +01:00
Ludovic Courtès f68b3ba12d
guix build: Move transformation options to (guix transformations).
* guix/transformations.scm: New file.
* tests/scripts-build.scm: Rename to...
* tests/transformations.scm: ... this.
* Makefile.am (MODULES): Add 'guix/transformations.scm'.
(SCM_TESTS): Adjust to rename.
* guix/scripts/build.scm (numeric-extension?)
(tarball-base-name, <downloaded-file>, download-to-store*)
(compile-downloaded-file, package-with-source)
(transform-package-source, evaluate-replacement-specs)
(transform-package-inputs, transform-package-inputs/graft)
(%not-equal, package-git-url, evaluate-git-replacement-specs)
(transform-package-source-branch, transform-package-source-commit)
(transform-package-source-git-url, package-dependents/spec)
(package-toolchain-rewriting, transform-package-toolchain)
(transform-package-with-debug-info, transform-package-tests)
(%transformations, transformation-procedure, %transformation-options)
(show-transformation-options-help, options->transformation)
(package-transformations): Move to (guix transformations).
* guix/scripts/environment.scm: Adjust accordingly.
* guix/scripts/graph.scm: Likewise.
* guix/scripts/install.scm: Likewise.
* guix/scripts/pack.scm: Likewise.
* guix/scripts/package.scm: Likewise.
* guix/scripts/upgrade.scm: Likewise.
* po/guix/POTFILES.in: Add 'guix/transformations.scm'.
2020-10-31 23:16:43 +01:00