GHC 5.00.2 RPM apparently circular dependency demands

Hi, This is probably ignorance on my part, but I am having trouble installing ghc.5.00.2 with the new RPMs. Here is the data I have recorded. Perhaps different installation parameters are required? 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 rpm -i --force ghc-5.00.2-rh62-1.i386.rpm Segmentation fault (core dumped) Thanks in advance. Byron Hale byron.hale@einfo.com

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?).
rpm -i --force ghc-5.00.2-rh62-1.i386.rpm
That was a bad idea!
Segmentation fault (core dumped)
That indicates a bug in rpm! You should report it with bugzilla. It's possible that this might have done something bad to your rpm database :-(. Try rpm --rebuilddb and if that fails, restore it from backups. Cheers, Jón -- Jón Fairbairn Jon.Fairbairn@cl.cam.ac.uk 31 Chalmers Road jf@cl.cam.ac.uk Cambridge CB1 3SZ +44 1223 570179 (after 14:00 only, please!)

Jon Fairbairn
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. Cheers, Manuel

Byron Hale wrote:
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
RPM is telling you is that upgrading ghc would break an existing dependency among your installed packages. Namely, ghc-prof (GHC profiling support) is also installed on your computer and depends on ghc-4.08-1. Thus, you have two common options: (1) upgrade both ghc and ghc-prof at the same time: rpm -Uhv ghc-5.00.2-rh62-1.i386.rpm ghc-prof-5.00.2-rh62-1.i386.rpm (2) or, remove ghc-prof (eliminating the dependency) before upgrading: rpm -e ghc-prof rpm -Uhv ghc-5.00.2-rh62-1.i386.rpm Go with (1) if you want profiling support in your GHC installation; (2) otherwise. Let me know if neither of these work for you. Cheers, Tom
participants (4)
-
Byron Hale
-
Jon Fairbairn
-
Manuel M. T. Chakravarty
-
Tom Moertel