profiles: Raise an error for unmatched patterns.
authorLudovic Courtès <ludovic.courtes@inria.fr>
Thu, 7 Feb 2019 13:54:43 +0000 (14:54 +0100)
committerLudovic Courtès <ludo@gnu.org>
Thu, 7 Feb 2019 14:46:45 +0000 (15:46 +0100)
commit487cbb0164c715e722b622fa800fa0b217fa132c
treea5ac1d86abb0cb575496bb2293c5e325d7d13b2f
parent89ea6252b6849131ba35d141006e1bbf3a49594f
profiles: Raise an error for unmatched patterns.

Previously, "guix package -r something-not-installed" would silently
complete.  Now an error is raised.

* guix/profiles.scm (&unmatched-pattern-error): New condition type.
(manifest-matching-entries): Rewrite to raise an error when one of
PATTERNS is not matched.
* guix/ui.scm (call-with-error-handling): Handle 'unmatched-pattern-error?'.
* tests/guix-package.sh: Add test.
* tests/profiles.scm ("manifest-matching-entries"): Don't try to remove
unmatched pattern.
("manifest-matching-entries, no match"): New test.
("manifest-transaction-effects"): Remove 'remove' field.
guix/profiles.scm
guix/ui.scm
tests/guix-package.sh
tests/profiles.scm