diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-05-27 15:17:42 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-05-27 22:05:34 +0200 |
commit | 494dc2fc628b754a9cc86a54c90202b13e0b68c6 (patch) | |
tree | 525fe8c860009a45ee3597727094ea3d4cd424f2 /guix | |
parent | b5d08d7c2834610b5243db1795bd4b0724c8ff2a (diff) |
guix package: Inherit the transformed version number.
Previously, 'guix package -i emacs --with-source=./emacs-42.tar.gz'
would fail to use "42" as the version number in the manifest entry.
Reported by piyo on #guix.
* guix/scripts/package.scm (process-actions)[transform-entry]: Inherit
the version number from the result of TRANSFORM when it's a package.
* tests/guix-package.sh: Test it.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/scripts/package.scm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 697afc17c3..e2e37098fc 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -794,9 +794,13 @@ processed, #f otherwise." (define transform (options->transformation opts)) (define (transform-entry entry) - (manifest-entry - (inherit entry) - (item (transform store (manifest-entry-item entry))))) + (let ((item (transform store (manifest-entry-item entry)))) + (manifest-entry + (inherit entry) + (item item) + (version (if (package? item) + (package-version item) + (manifest-entry-version entry)))))) ;; First, process roll-backs, generation removals, etc. (for-each (match-lambda |