diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-03-01 11:37:36 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-03-01 14:00:21 +0100 |
commit | 435603a1d6106b535cf143d17cb030b2d0795b54 (patch) | |
tree | 01ff81d92ae52d7d9046e286b94d91902f5236b8 /tests | |
parent | acb59d99dbb8779ecf41cdbba45d2ce8ba88f5ed (diff) | |
download | guix-435603a1d6106b535cf143d17cb030b2d0795b54.tar guix-435603a1d6106b535cf143d17cb030b2d0795b54.tar.gz |
profiles: 'manifest-add' truly deletes duplicate entries.
Fixes <https://bugs.gnu.org/30569>.
Reported by Andreas Enge <andreas@enge.fr>.
* guix/profiles.scm (manifest-add): Don't append ENTRIES as is.
Instead, cons each element of ENTRIES as we fold over it.
Remove unneeded ellispes in 'match' patterns.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/profiles.scm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/profiles.scm b/tests/profiles.scm index 469dde2652..92eb08cb9e 100644 --- a/tests/profiles.scm +++ b/tests/profiles.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014 Alex Kost <alezost@gmail.com> ;;; ;;; This file is part of GNU Guix. @@ -148,6 +148,11 @@ (_ #f)) (equal? m3 m4)))) +(test-equal "manifest-add removes duplicates" ;<https://bugs.gnu.org/30569> + (list guile-2.0.9) + (manifest-entries (manifest-add (manifest '()) + (list guile-2.0.9 guile-2.0.9)))) + (test-assert "manifest-perform-transaction" (let* ((m0 (manifest (list guile-2.0.9 guile-2.0.9:debug))) (t1 (manifest-transaction |