Have ghc-pkg use an old-style package key when it's not provided.
Have ghc-pkg use an old-style package key when it's not provided.

Summary:
When this occurs, it means that the user is using an old version of Cabal.
In that case, don't barf out: just go ahead and install it as an old-style
package key.  The user won't be able to link multiple versions together,
but that should not be a problem because their Cabal can't handle it anyway.

What happens if old-style are mixed up with new-style?  Well, currently
with Cabal, it's indistinguishable.  However, if at some later point we
add private dependencies, libraries compiled with old style linker names
are incompatible with each other.  We'll cross that road when we come
to it.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>

Test Plan: validate

Reviewers: tibbe, hvr, austin

Subscribers: simonmar, relrod, ezyang, carter

Differential Revision: https://phabricator.haskell.org/D154

wxwxwwxxx/ghc,sdiehl/ghc,nushio3/ghc,shlevy/ghc,mfine/ghc,nkaretnikov/ghc,nushio3/ghc,nushio3/ghc,da-x/ghc,nathyong/microghc-ghc,anton-dessiatov/ghc,oldmanmike/ghc,mcschroeder/ghc,urbanslug/ghc,da-x/ghc,anton-dessiatov/ghc,tjakway/ghcjvm,wxwxwwxxx/ghc,forked-upstream-packages-for-ghcjs/ghc,gridaphobe/ghc,spacekitteh/smcghc,olsner/ghc,ghc-android/ghc,mcschroeder/ghc,nkaretnikov/ghc,urbanslug/ghc,gridaphobe/ghc,shlevy/ghc,gridaphobe/ghc,nushio3/ghc,nathyong/microghc-ghc,shlevy/ghc,nushio3/ghc,shlevy/ghc,bitemyapp/ghc,gcampax/ghc,nushio3/ghc,holzensp/ghc,mettekou/ghc,mfine/ghc,ml9951/ghc,forked-upstream-packages-for-ghcjs/ghc,ml9951/ghc,gcampax/ghc,ghc-android/ghc,elieux/ghc,ezyang/ghc,mcschroeder/ghc,da-x/ghc,forked-upstream-packages-for-ghcjs/ghc,urbanslug/ghc,tjakway/ghcjvm,christiaanb/ghc,ezyang/ghc,vikraman/ghc,acowley/ghc,vTurbine/ghc,wxwxwwxxx/ghc,forked-upstream-packages-for-ghcjs/ghc,GaloisInc/halvm-ghc,nkaretnikov/ghc,green-haskell/ghc,vTurbine/ghc,forked-upstream-packages-for-ghcjs/ghc,elieux/ghc,ezyang/ghc,jstolarek/ghc,da-x/ghc,nathyong/microghc-ghc,oldmanmike/ghc,TomMD/ghc,ezyang/ghc,elieux/ghc,da-x/ghc,mfine/ghc,siddhanathan/ghc,wxwxwwxxx/ghc,fmthoma/ghc,vikraman/ghc,snoyberg/ghc,mcschroeder/ghc,AlexanderPankiv/ghc,sgillespie/ghc,spacekitteh/smcghc,wxwxwwxxx/ghc,snoyberg/ghc,green-haskell/ghc,jstolarek/ghc,olsner/ghc,spacekitteh/smcghc,christiaanb/ghc,jstolarek/ghc,TomMD/ghc,elieux/ghc,TomMD/ghc,ml9951/ghc,nkaretnikov/ghc,oldmanmike/ghc,ezyang/ghc,siddhanathan/ghc,vTurbine/ghc,acowley/ghc,vikraman/ghc,siddhanathan/ghc,acowley/ghc,siddhanathan/ghc,elieux/ghc,mettekou/ghc,mettekou/ghc,holzensp/ghc,bitemyapp/ghc,ghc-android/ghc,GaloisInc/halvm-ghc,ml9951/ghc,TomMD/ghc,siddhanathan/ghc,ghc-android/ghc,sdiehl/ghc,acowley/ghc,sdiehl/ghc,anton-dessiatov/ghc,sgillespie/ghc,vTurbine/ghc,sdiehl/ghc,sgillespie/ghc,mfine/ghc,fmthoma/ghc,holzensp/ghc,AlexanderPankiv/ghc,nathyong/microghc-ghc,oldmanmike/ghc,fmthoma/ghc,acowley/ghc,TomMD/ghc,ghc-android/ghc,AlexanderPankiv/ghc,shlevy/ghc,urbanslug/ghc,forked-upstream-packages-for-ghcjs/ghc,urbanslug/ghc,snoyberg/ghc,olsner/ghc,forked-upstream-packages-for-ghcjs/ghc,TomMD/ghc,christiaanb/ghc,nkaretnikov/ghc,jstolarek/ghc,olsner/ghc,oldmanmike/ghc,christiaanb/ghc,anton-dessiatov/ghc,vTurbine/ghc,anton-dessiatov/ghc,bitemyapp/ghc,vikraman/ghc,vTurbine/ghc,GaloisInc/halvm-ghc,christiaanb/ghc,ml9951/ghc,ml9951/ghc,sdiehl/ghc,snoyberg/ghc,siddhanathan/ghc,AlexanderPankiv/ghc,mettekou/ghc,bitemyapp/ghc,mettekou/ghc,fmthoma/ghc,acowley/ghc,fmthoma/ghc,nushio3/ghc,elieux/ghc,olsner/ghc,sgillespie/ghc,ezyang/ghc,christiaanb/ghc,shlevy/ghc,sdiehl/ghc,gcampax/ghc,nathyong/microghc-ghc,anton-dessiatov/ghc,snoyberg/ghc,mfine/ghc,green-haskell/ghc,wxwxwwxxx/ghc,ezyang/ghc,mfine/ghc,tjakway/ghcjvm,ghc-android/ghc,nkaretnikov/ghc,siddhanathan/ghc,gcampax/ghc,sgillespie/ghc,GaloisInc/halvm-ghc,fmthoma/ghc,spacekitteh/smcghc,christiaanb/ghc,snoyberg/ghc,bitemyapp/ghc,ghc-android/ghc,sgillespie/ghc,GaloisInc/halvm-ghc,GaloisInc/halvm-ghc,AlexanderPankiv/ghc,nathyong/microghc-ghc,nathyong/microghc-ghc,sgillespie/ghc,tjakway/ghcjvm,snoyberg/ghc,gridaphobe/ghc,TomMD/ghc,oldmanmike/ghc,da-x/ghc,gridaphobe/ghc,elieux/ghc,tjakway/ghcjvm,mcschroeder/ghc,urbanslug/ghc,vTurbine/ghc,olsner/ghc,urbanslug/ghc,wxwxwwxxx/ghc,mcschroeder/ghc,olsner/ghc,gcampax/ghc,sdiehl/ghc,vikraman/ghc,vikraman/ghc,ml9951/ghc,mfine/ghc,nkaretnikov/ghc,gridaphobe/ghc,mcschroeder/ghc,shlevy/ghc,fmthoma/ghc,AlexanderPankiv/ghc,AlexanderPankiv/ghc,anton-dessiatov/ghc,tjakway/ghcjvm,acowley/ghc,gcampax/ghc,holzensp/ghc,jstolarek/ghc,da-x/ghc,spacekitteh/smcghc,ml9951/ghc,holzensp/ghc,tjakway/ghcjvm,green-haskell/ghc,mettekou/ghc,gridaphobe/ghc,gcampax/ghc,oldmanmike/ghc,mettekou/ghc,GaloisInc/halvm-ghc,vikraman/ghc,green-haskell/ghc