fix inverted Ord for TrustLevel (intermediate commit)

This commit removes the Ord and Enum instances, commenting out all code
that depends on them, to make sure that all code effected by the
inversion fix has been identified.

(Assuming no ifdefs involve TrustLevel.)

The next commit will fix up all the identified code.
This commit is contained in:
Joey Hess 2018-04-13 14:50:14 -04:00
parent 1831cc4a7d
commit a0e4b9678b
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
7 changed files with 16 additions and 13 deletions

View file

@ -300,6 +300,6 @@ willDropMakeItWorse srcuuid destuuid deststartedwithcopy key afile =
checktrustlevel = do
desttrust <- lookupTrust destuuid
srctrust <- lookupTrust srcuuid
return (desttrust <= srctrust || desttrust < UnTrusted)
return True -- return (desttrust >= srctrust || desttrust > UnTrusted)
data DropCheck = DropWorse | DropAllowed | DropCheckNumCopies

View file

@ -151,14 +151,18 @@ genCfg cfg descs = unlines $ intercalate [""]
, com " setting field = value"
]
trust = settings cfg descs cfgTrustMap
trust = undefined
-- TODO: Down order
{- settings cfg descs cfgTrustMap
[ com "Repository trust configuration"
, com "(Valid trust levels: " ++ trustlevels ++ ")"
]
(\(t, u) -> line "trust" u $ showTrustLevel t)
(\u -> lcom $ line "trust" u $ showTrustLevel def)
where
trustlevels = unwords $ map showTrustLevel [Trusted .. DeadTrusted]
trustlevels = "XXX" -- unwords $ reverse $
-- map showTrustLevel [minBound..maxBound]
-}
groups = settings cfg descs cfgGroupMap
[ com "Repository groups"