
Is there a way to tell cabal to refuse to upgrade a package? I'd like to pin my `bytestring` to the version that shipped with my GHC. I just had a weird experience. When I try to `cabal install iconv` (with my settings) it tried to downgrade my `bytestring`, when I download and do the configure+build by hand, it works, but when I try to install the local version it again begins to try to downgrade my bytestring. If I just `register --inplace` it works fine. Wut? -- Stephen Paul Weber, @singpolyma See http://singpolyma.net for how I prefer to be contacted edition right joseph

On Sat, Jan 12, 2013 at 11:25 AM, Stephen Paul Weber
Is there a way to tell cabal to refuse to upgrade a package? I'd like to pin my `bytestring` to the version that shipped with my GHC.
I just had a weird experience. When I try to `cabal install iconv` (with my settings) it tried to downgrade my `bytestring`, when I download and do the configure+build by hand, it works, but when I try to install the local version it again begins to try to downgrade my bytestring. If I just `register --inplace` it works fine. Wut?
You can put "constraint: bytestring == version" in ~/.cabal/config. Alternatively you can run one `cabal install --constraint "bytestring == version"` command. Shachaf

Quoting Shachaf Ben-Kiki
You can put "constraint: bytestring == version" in ~/.cabal/config. Alternatively you can run one `cabal install --constraint "bytestring == version"` command.
Keep in mind the following subtle difference between this constraint and the "installed" constraint: this fixes a version, but doesn't fix a set of flags or dependencies' versions. So cabal may still rebuild bytestring if it discovers that changing either of these will make an otherwise failing constraint set succeed, whereas the "installed" constraint will force the package not to be rebuilt. On the other hand, if there are many versions of bytestring installed, the "installed" constraint does not fix any one of them as the exact version. It can make sense to use both "== version" constraints and "installed" constraints at once. ~d
participants (3)
-
Shachaf Ben-Kiki
-
Stephen Paul Weber
-
wagnerdm@seas.upenn.edu