Unregistering a package
Simon Marlow
simonmar at microsoft.com
Thu Feb 10 10:14:23 EST 2005
On 09 February 2005 13:32, Peter Simons wrote:
> I have an interesting problem. There are two versions of the
> HsDNS package installed right now:
>
> $ ghc-pkg list
> | /usr/local/ghc-current/lib/ghc-6.5/package.conf:
> | rts-1.0, [...] (hsdns-2005-02-04),
> | hsdns-2005-02-08
>
> Now how can I unregister them? I have tried everything I
> could think of, but no luck:
>
> $ ghc-pkg unregister hsdns
> | ghc-pkg: package hsdns matches multiple packages:
> | hsdns-2005-02-04, hsdns-2005-02-08
>
> $ ghc-pkg unregister hsdns-2005-02-08
> | ghc-pkg: cannot parse 'hsdns-2005-02-08' as a package identifier
>
> Can someone give me a pointer how to remedy this situation?
The problem is not really that "hsdns-2005-02-08" isn't a legal package
identifier, actually it is an ambiguous package identifier. I suggest
you remove that package by hand from the package.conf file, and instead
use "hsdns-2005.02.08".
The general syntax of package ids is:
pkgid ::= pkg ('-' version)?
pkg ::= (alphanum|'-')+
version ::= (digit+) ('.' digit+)* ('-' alphanum+)*
This syntax means that package ids which have numeric component(s) at
the end and no '.' will be ambiguous.
I've added a test to ghc-pkg to prevent you from registering a package
with a problematic package id for now. Perhaps we should change the
syntax of package ids though?
Cheers,
Simon
More information about the Glasgow-haskell-users
mailing list