File tree Expand file tree Collapse file tree 1 file changed +5
-14
lines changed
src/Distribution/Server/Packages Expand file tree Collapse file tree 1 file changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -207,32 +207,23 @@ writeLegacy users =
207207--
208208-- This used to live in Distribution.Server.Util.Index.
209209--
210- -- NOTE: In order to mitigate the effects of
211- -- https://github.com/haskell/cabal/issues/4624
212- -- as a hack, this operation filters out .cabal files
213- -- with cabal-version >= 2.
214210writeLegacyAux :: Package pkg
215211 => (pkg -> ByteString )
216212 -> (pkg -> Tar. Entry -> Tar. Entry )
217213 -> [Tar. Entry ]
218214 -> PackageIndex pkg
219215 -> ByteString
220216writeLegacyAux externalPackageRep updateEntry extras =
221- Tar. write . (extras++ ) . mapMaybe entry . PackageIndex. allPackages
217+ Tar. write . (extras++ ) . map entry . PackageIndex. allPackages
222218 where
223219 -- entry :: pkg -> Maybe Tar.Entry
224- entry pkg
225- | specVerGEq2 = Nothing
226- | otherwise = Just
227- . updateEntry pkg
228- . Tar. fileEntry tarPath
229- $ cabalText
220+ entry pkg =
221+ updateEntry pkg
222+ . Tar. fileEntry tarPath
223+ $ cabalText
230224 where
231225 Right tarPath = Tar. toTarPath False fileName
232226 name = unPackageName $ packageName pkg
233227 fileName = name </> display (packageVersion pkg)
234228 </> name <.> " cabal"
235-
236- -- TODO: Hack-alert! We want to do this in a more elegant way.
237- specVerGEq2 = maybe False (>= CabalSpecV2_0 ) $ parseSpecVerLazy cabalText
238229 cabalText = externalPackageRep pkg
You can’t perform that action at this time.
0 commit comments