1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

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.
This commit is contained in:
Ludovic Courtès
2020-09-25 17:16:34 +02:00
parent ad54a73bb8
commit 8e1907a724
4 changed files with 80 additions and 5 deletions

View File

@@ -184,6 +184,21 @@ grep -E 'emacs[[:blank:]]+42\.5\.9rc7' "$tmpfile"
rm "$emacs_tarball" "$tmpfile"
rmdir "$module_dir"
# Install with package transformations.
guix install --bootstrap -p "$profile" sed --with-input=sed=guile-bootstrap
grep "sed=guile-bootstrap" "$profile/manifest"
test "$(readlink -f "$profile/bin/guile")" \
= "$(guix build guile-bootstrap)/bin/guile"
test ! -f "$profile/bin/sed"
# Make sure the package transformation is preserved.
guix package --bootstrap -p "$profile" -u
grep "sed=guile-bootstrap" "$profile/manifest"
test "$(readlink -f "$profile/bin/guile")" \
= "$(guix build guile-bootstrap)/bin/guile"
test ! -f "$profile/bin/sed"
rm "$profile" "$profile"-[0-9]-link
# Profiles with a relative file name. Make sure we don't create dangling
# symlinks--see bug report at
# <https://lists.gnu.org/archive/html/guix-devel/2018-07/msg00036.html>.