File tree 1 file changed +5
-14
lines changed
src/Distribution/Server/Packages 1 file changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -207,32 +207,23 @@ writeLegacy users =
207
207
--
208
208
-- This used to live in Distribution.Server.Util.Index.
209
209
--
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.
214
210
writeLegacyAux :: Package pkg
215
211
=> (pkg -> ByteString )
216
212
-> (pkg -> Tar. Entry -> Tar. Entry )
217
213
-> [Tar. Entry ]
218
214
-> PackageIndex pkg
219
215
-> ByteString
220
216
writeLegacyAux externalPackageRep updateEntry extras =
221
- Tar. write . (extras++ ) . mapMaybe entry . PackageIndex. allPackages
217
+ Tar. write . (extras++ ) . map entry . PackageIndex. allPackages
222
218
where
223
219
-- 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
230
224
where
231
225
Right tarPath = Tar. toTarPath False fileName
232
226
name = unPackageName $ packageName pkg
233
227
fileName = name </> display (packageVersion pkg)
234
228
</> 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
238
229
cabalText = externalPackageRep pkg
You can’t perform that action at this time.
0 commit comments