diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2019-02-06 13:03:26 +0100 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2019-02-06 13:03:26 +0100 |
commit | ba88eea2b3a8a33ecd7fc0ec64e3917c6c2fe21d (patch) | |
tree | 75c68e44d3d76440f416552711b1a47ec83e411e /tests/guix-package-net.sh | |
parent | f380f9d55e6757c242acf6c71c4a3ccfcdb066b2 (diff) | |
parent | 4aeb7f34c948f32363f2ae29c6942c6328df758c (diff) | |
download | guix-ba88eea2b3a8a33ecd7fc0ec64e3917c6c2fe21d.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'tests/guix-package-net.sh')
-rw-r--r-- | tests/guix-package-net.sh | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/tests/guix-package-net.sh b/tests/guix-package-net.sh index 927c856b23..82c346dd4c 100644 --- a/tests/guix-package-net.sh +++ b/tests/guix-package-net.sh @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2012, 2013, 2014, 2015, 2017 Ludovic Courtès <ludo@gnu.org> +# Copyright © 2012, 2013, 2014, 2015, 2017, 2019 Ludovic Courtès <ludo@gnu.org> # Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> # # This file is part of GNU Guix. @@ -167,6 +167,37 @@ then false; fi guix package -p "$profile" -p "$profile_alt" --search-paths \ | grep "LIBRARY_PATH.*$profile/lib.$profile_alt/lib" +# Simulate an upgrade and make sure the package order is preserved. +module_dir="t-guix-package-net-$$" +trap 'rm -rf "$module_dir"' EXIT + +mkdir "$module_dir" +cat > "$module_dir/new.scm" <<EOF +(define-module (new) + #:use-module (guix) + #:use-module (gnu packages bootstrap)) + +(define-public new-guile + (package (inherit %bootstrap-guile) + (version (string-append "42." (getenv "V_MINOR"))))) +(define-public new-gcc + (package (inherit %bootstrap-gcc) + (version (string-append "77." (getenv "V_MINOR"))))) +EOF + +guix package --bootstrap -p "$profile" -i gcc-bootstrap +installed="`guix package -p "$profile" -I | cut -f1`" + +for i in 1 2 +do + V_MINOR="$i" + export V_MINOR + + guix package -p "$profile" --bootstrap -L "$module_dir" -u . + post_upgrade="`guix package -p "$profile" -I | cut -f1`" + test "$post_upgrade" = "$installed" +done + # # Try with the default profile. # |