@@ -198,7 +198,6 @@ import Distribution.Types.GivenComponent
198198import Distribution.Types.LibraryName
199199import qualified Distribution.Types.LocalBuildConfig as LBC
200200import Distribution.Types.PackageVersionConstraint
201- import qualified Distribution.Types.PackageId as PI
202201import Distribution.Types.PkgconfigDependency
203202import Distribution.Types.UnqualComponentName
204203
@@ -792,21 +791,8 @@ rebuildInstallPlan
792791 -- }
793792 -- deriving (Eq, Generic, Show, Read)
794793 --
795- -- let mapPkgIdx f = PI.fromList . map f . PI.allPackages
796- -- let updateIPI :: IPI.InstalledPackageInfo -> IPI.InstalledPackageInfo
797- -- updateIPI ipi = ipi {
798- -- IPI.sourcePackageId = (IPI.sourcePackageId ipi){ PI.pkgCompiler = IPI.pkgCompiler ipi }
799- -- }
800- -- let addCompilerToSourcePkg :: CompilerId -> [PackageSpecifier UnresolvedSourcePackage] -> [PackageSpecifier UnresolvedSourcePackage]
801- -- addCompilerToSourcePkg compilerId = map (addCompilerId compilerId)
802- -- addCompilerId :: CompilerId -> PackageSpecifier UnresolvedSourcePackage -> PackageSpecifier UnresolvedSourcePackage
803- -- addCompilerId compilerId (NamedPackage name props) = NamedPackage name props
804- -- addCompilerId compilerId (SpecificSourcePackage pkg) = SpecificSourcePackage (f pkg)
805- -- where f :: SourcePackage UnresolvedPkgLoc -> SourcePackage UnresolvedPkgLoc
806- -- f pkg = pkg{srcpkgPackageId = (srcpkgPackageId pkg){pkgCompiler = Just compilerId}}
807-
794+ -- can probably use fromList $ Map.elems $ on it.
808795 hinstalledPkgIndex <-
809- -- mapPkgIdx updateIPI <$>
810796 getInstalledPackages
811797 verbosity
812798 (hostToolchain toolchains)
@@ -816,16 +802,13 @@ rebuildInstallPlan
816802 -- for now. FIXME!
817803 -- let hinstalledPkgIndex' = PI.fromList $ PI.allPackages hinstalledPkgIndex
818804 binstalledPkgIndex <-
819- -- mapPkgIdx updateIPI <$>
820805 getInstalledPackages
821806 verbosity
822807 (buildToolchain toolchains)
823808 -- FIXME: HACK
824809 -- if host and build compiler are the same, we want to get -package-db in here.
825810 (corePackageDbs $ if buildIsHost toolchains then Host else Build )
826811
827- -- let localPackages' = addCompilerToSourcePkg (compilerId . toolchainCompiler . hostToolchain $ toolchains) localPackages
828-
829812 (sourcePkgDb, tis, ar) <-
830813 getSourcePackages
831814 verbosity
0 commit comments