fix up Read instance incompatability caused by recent commit
9c4650358c
changed the Read instance for Key. I've checked all uses of that instance (by removing it and seeing what breaks), and they're all limited to the webapp, except one. That is GitAnnexDistribution's Read instance. So,9c4650358c
would have broken upgrades of git-annex from downloads.kitenet.net. Once the .info files there got updated for a new release, old releases would have failed to parse them and never upgraded. To fix this, I found a way to make the .info files that contain GitAnnexDistribution values be readable by the old version of git-annex. This commit was sponsored by Ewen McNeill.
This commit is contained in:
parent
634a485b50
commit
27eca014be
6 changed files with 59 additions and 21 deletions
|
@ -119,13 +119,14 @@ makeinfos updated version = do
|
|||
Just k -> whenM (inAnnex k) $ do
|
||||
liftIO $ putStrLn f
|
||||
let infofile = f ++ ".info"
|
||||
liftIO $ writeFile infofile $ show $ GitAnnexDistribution
|
||||
let d = GitAnnexDistribution
|
||||
{ distributionUrl = mkUrl f
|
||||
, distributionKey = k
|
||||
, distributionVersion = bv
|
||||
, distributionReleasedate = now
|
||||
, distributionUrgentUpgrade = Nothing
|
||||
}
|
||||
liftIO $ writeFile infofile $ formatInfoFile d
|
||||
void $ inRepo $ runBool [Param "add", File infofile]
|
||||
signFile infofile
|
||||
signFile f
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue