diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2020-09-25 17:16:34 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2020-10-02 23:28:09 +0200 |
| commit | 8e1907a72430aa989125b053573ef0897c480697 (patch) | |
| tree | 99e70ccfd1af5205bc731930733299852cae9658 /tests/guix-package.sh | |
| parent | ad54a73bb820a685f242976a86be63931789fa97 (diff) | |
guix package: Re-apply package transformation when upgrading.
* guix/scripts/package.scm (transaction-upgrade-entry)[upgrade]: Add
'transform' parameter. Pass PKG through it. Use
'manifest-entry-with-transformations'.
Call 'options->transformation' to get the transformation procedure.
* tests/guix-package.sh: Add 'guix package -u' test.
* tests/packages.scm ("transaction-upgrade-entry, transformation options preserved"):
New test.
* doc/guix.texi (Invoking guix package): Mention that transformations
are preserved across upgrades.
(Package Transformation Options): Likewise.
Diffstat (limited to 'tests/guix-package.sh')
| -rw-r--r-- | tests/guix-package.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/guix-package.sh b/tests/guix-package.sh index a43496699b7..3e5fa71d201 100644 --- a/tests/guix-package.sh +++ b/tests/guix-package.sh | |||
| @@ -184,6 +184,21 @@ grep -E 'emacs[[:blank:]]+42\.5\.9rc7' "$tmpfile" | |||
| 184 | rm "$emacs_tarball" "$tmpfile" | 184 | rm "$emacs_tarball" "$tmpfile" |
| 185 | rmdir "$module_dir" | 185 | rmdir "$module_dir" |
| 186 | 186 | ||
| 187 | # Install with package transformations. | ||
| 188 | guix install --bootstrap -p "$profile" sed --with-input=sed=guile-bootstrap | ||
| 189 | grep "sed=guile-bootstrap" "$profile/manifest" | ||
| 190 | test "$(readlink -f "$profile/bin/guile")" \ | ||
| 191 | = "$(guix build guile-bootstrap)/bin/guile" | ||
| 192 | test ! -f "$profile/bin/sed" | ||
| 193 | |||
| 194 | # Make sure the package transformation is preserved. | ||
| 195 | guix package --bootstrap -p "$profile" -u | ||
| 196 | grep "sed=guile-bootstrap" "$profile/manifest" | ||
| 197 | test "$(readlink -f "$profile/bin/guile")" \ | ||
| 198 | = "$(guix build guile-bootstrap)/bin/guile" | ||
| 199 | test ! -f "$profile/bin/sed" | ||
| 200 | rm "$profile" "$profile"-[0-9]-link | ||
| 201 | |||
| 187 | # Profiles with a relative file name. Make sure we don't create dangling | 202 | # Profiles with a relative file name. Make sure we don't create dangling |
| 188 | # symlinks--see bug report at | 203 | # symlinks--see bug report at |
| 189 | # <https://lists.gnu.org/archive/html/guix-devel/2018-07/msg00036.html>. | 204 | # <https://lists.gnu.org/archive/html/guix-devel/2018-07/msg00036.html>. |
