[commit: ghc] master: [ghc-pkg] Fix #5442 by using the flag db stack to modify packages. (d7c807f)
git at git.haskell.org
git at git.haskell.org
Mon Jul 21 13:57:10 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/d7c807f7975c13444e1ce79e4c36dd802321cf40/ghc
>---------------------------------------------------------------
commit d7c807f7975c13444e1ce79e4c36dd802321cf40
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date: Mon Jul 21 05:50:19 2014 -0700
[ghc-pkg] Fix #5442 by using the flag db stack to modify packages.
Summary:
Previously, the full database stack was used for ghc-pkg to
modify packages, which meant that commands like
'ghc-pkg unregister --user' worked the same as 'ghc-pkg unregister'.
Since package modification is a "read and write" operation, we
should use the flag db stack (which is currently used for reads)
to determine which database to update.
There is also a new flag --user-package-db, which lets you explicitly
set the user database (as seen by --user). This was mostly added
to aid in testing, but could be useful for end users as well.
Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>
Test Plan: validate
Reviewers: simonmar, hvr, austin
Subscribers: simonmar, relrod, carter
Differential Revision: https://phabricator.haskell.org/D84
>---------------------------------------------------------------
d7c807f7975c13444e1ce79e4c36dd802321cf40
docs/users_guide/7.10.1-notes.xml | 16 ++++++++++-
testsuite/.gitignore | 2 +-
testsuite/tests/cabal/Makefile | 54 +++++++++++++++++++++++++++++++++++++
testsuite/tests/cabal/T5442a.stdout | 5 ++++
testsuite/tests/cabal/T5442b.stderr | 1 +
testsuite/tests/cabal/T5442b.stdout | 3 +++
testsuite/tests/cabal/T5442c.stderr | 1 +
testsuite/tests/cabal/T5442c.stdout | 6 +++++
testsuite/tests/cabal/T5442d.stderr | 1 +
testsuite/tests/cabal/T5442d.stdout | 8 ++++++
testsuite/tests/cabal/all.T | 22 +++++++++++++++
utils/ghc-pkg/Main.hs | 36 ++++++++++++++++---------
12 files changed, 141 insertions(+), 14 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc d7c807f7975c13444e1ce79e4c36dd802321cf40
More information about the ghc-commits
mailing list