aboutsummaryrefslogtreecommitdiff
path: root/tests/guix-package.sh
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-05-27 15:17:42 +0200
committerLudovic Courtès <ludo@gnu.org>2016-05-27 22:05:34 +0200
commit494dc2fc628b754a9cc86a54c90202b13e0b68c6 (patch)
tree525fe8c860009a45ee3597727094ea3d4cd424f2 /tests/guix-package.sh
parentb5d08d7c2834610b5243db1795bd4b0724c8ff2a (diff)
downloadpatches-494dc2fc628b754a9cc86a54c90202b13e0b68c6.tar
patches-494dc2fc628b754a9cc86a54c90202b13e0b68c6.tar.gz
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 'tests/guix-package.sh')
-rw-r--r--tests/guix-package.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/guix-package.sh b/tests/guix-package.sh
index 28c34dbc6a..68a1946aa0 100644
--- a/tests/guix-package.sh
+++ b/tests/guix-package.sh
@@ -140,6 +140,20 @@ rm "$profile" "$profile"-[0-9]-link
guix gc -d "$real_profile"
[ ! -d "$real_profile" ]
+# Package transformations.
+
+# Make sure we get the right version number when using '--with-source'.
+mkdir "$module_dir"
+emacs_tarball="$module_dir/emacs-42.5.9rc7.tar.gz"
+touch "$emacs_tarball"
+guix package -p "$profile" -i emacs --with-source="$emacs_tarball" -n \
+ 2> "$tmpfile"
+grep -E 'emacs[[:blank:]]+42\.5\.9rc7[[:blank:]]+.*-emacs-42.5.9rc7' \
+ "$tmpfile"
+rm "$emacs_tarball" "$tmpfile"
+rmdir "$module_dir"
+
+
#
# Try with the default profile.
#