summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-02-24 18:51:57 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-02-24 18:59:12 -0400
commit1630f299751d4e8b186cd176c8219f11257586d8 (patch)
treecb283de1b365a7ba7ac14b6de4eb0c7b9116fdd1 /Build
parent4e8d9714a31987f879b4cad5c2b394386d02a829 (diff)
fix up Read instance incompatability caused by recent commit
2f868db90c7ba16eee901b9b1472b1e1a889dd93 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, 2f868db90c7ba16eee901b9b1472b1e1a889dd93 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.
Diffstat (limited to 'Build')
-rw-r--r--Build/DistributionUpdate.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Build/DistributionUpdate.hs b/Build/DistributionUpdate.hs
index dd18a7883..e026d655b 100644
--- a/Build/DistributionUpdate.hs
+++ b/Build/DistributionUpdate.hs
@@ -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