openbsd-ports/lang/ghc/patches/patch-utils_ghc-pkg_Main_hs
kili 7c0fe71272 Stop ghc-pkg unregister <pkgname> -v0 --force issuing warnings that
this would break other packages.

Please note that those warnings are only disabled if both
-v0 *and* --force are given.

'no objections' dcoppa@
2012-11-05 20:20:07 +00:00

18 lines
895 B
Plaintext

$OpenBSD: patch-utils_ghc-pkg_Main_hs,v 1.1 2012/11/05 20:20:07 kili Exp $
Horrible hack to get rid of the annoying warnings when running
pkg_add -u. This means that you do NOT get any such warning when
running ghc-pkg unregister ... -v0 --force.
--- utils/ghc-pkg/Main.hs.orig Wed Jun 6 19:10:25 2012
+++ utils/ghc-pkg/Main.hs Sun Nov 4 20:45:43 2012
@@ -915,7 +915,7 @@ modifyPackage fn pkgid verbosity my_flags force = do
new_broken = map sourcePackageId (brokenPackages (allPackagesInStack new_stack))
newly_broken = filter (`notElem` map sourcePackageId old_broken) new_broken
--
- when (not (null newly_broken)) $
+ when (not (null newly_broken || (force == ForceAll && verbosity <= Silent))) $
dieOrForceAll force ("unregistering " ++ display pkgid ++
" would break the following packages: "
++ unwords (map display newly_broken))