GHC 5.00.2 RPM apparently circular dependency demands

Manuel M. T. Chakravarty
Wed, 27 Jun 2001 00:22:07 +1000

Jon Fairbairn <> wrote,

> > Here is the data I have recorded. Perhaps different installation parameters 
> > are required?
> I don't have the rpms to hand to check the dependencies, but
> what you say doesn't on its own point to a problem with the
> rpm.
> > Redhat Linux 6.2, I686 SMP
> > Glasgow Haskell Compilation System, version 5.00.1
> > rpm --version
> > RPM version 4.0.2
> > 
> > rpm -U ghc-5.00.2-rh62-1.i386.rpm
> > error: failed dependencies:
> >          ghc = 4.08 is needed by ghc-prof-4.08-1
> >          ghc = 5.00.1 is needed by ghc-prof-5.00.1-1
> This implies that you have ghc-prof-4.08-1 installed, and it
> does need ghc 4.08. Similarly ghc-prof-5.00.1-1.  Using -U
> means update, and it wants to remove older versions of the
> package mentioned, but it can't since that would break
> dependencies for ghc-prof, which you haven't asked it to
> change.
> rpm -U ghc-5.00.2-rh62-1.i386.rpm ghc-prof-5.00.2<whatever>
> ought to have worked, although you may need to do something
> about having _two_ versions of ghc-prof installed (rpm -e to
> erase?).

It is ok to have two or more versions of ghc-prof.  It only
contains libraries for the matching ghc base install and
uses different directories for different versions.

As pointed out, the problem is that -U implies erasing the
old versions.  If you like to keep the old versions, just
install with `-i' to install in addition to the old ones.
(Whether you install ghc-prof for the new version doesn't
matter in this case.)  If there are conflicts (there will be
conflicts in /usr/bin), pass the option --replacefiles,
which will the new package make overwrite all the old
(conflicting files).  This doesn't hurt as you can still
invoke the old versions of ghc by giving explicit version
numbers, like so

  % ghc-4.08 <some arguments>

If you do not like to retain the old versions, either
explicit erase (with -e) the old versions (of at least
ghc-prof) before installing the new, or use

  % rpm -U ghc-5.00.2-rh62-1.i386.rpm ghc-prof-5.00.2-rh62-1.i386.rpm

rpm will, then, understand that you want to update the whole
lot and delete all the old stuff first.