diff options
author | Joey Hess <joey@kitenet.net> | 2014-04-23 13:30:30 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-04-23 13:30:30 -0400 |
commit | bc12661f32692ab84c216c4fdeb8d9aee3656543 (patch) | |
tree | daac4d3c254c0c3daa6723ad39c5ba311bf540bc /Assistant | |
parent | 3c4c9d30c58c4820ec3c18c461051cc7685b6e5e (diff) |
Standalone builds now check gpg signatures before upgrading.
Diffstat (limited to 'Assistant')
-rw-r--r-- | Assistant/Threads/Upgrader.hs | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/Assistant/Threads/Upgrader.hs b/Assistant/Threads/Upgrader.hs index 60aeec70b..637c82a7d 100644 --- a/Assistant/Threads/Upgrader.hs +++ b/Assistant/Threads/Upgrader.hs @@ -18,11 +18,8 @@ import Assistant.Types.UrlRenderer import Assistant.DaemonStatus import Assistant.Alert import Utility.NotificationBroadcaster -import Utility.Tmp import qualified Annex import qualified Build.SysConfig -import qualified Utility.Url as Url -import qualified Annex.Url as Url import qualified Git.Version import Types.Distribution #ifdef WITH_WEBAPP @@ -62,7 +59,7 @@ upgraderThread urlrenderer = namedThread "Upgrader" $ checkUpgrade :: UrlRenderer -> Assistant () checkUpgrade urlrenderer = do debug [ "Checking if an upgrade is available." ] - go =<< getDistributionInfo + go =<< downloadDistributionInfo where go Nothing = debug [ "Failed to check if upgrade is available." ] go (Just d) = do @@ -86,16 +83,3 @@ canUpgrade urgency urlrenderer d = ifM autoUpgradeEnabled noop #endif ) - -getDistributionInfo :: Assistant (Maybe GitAnnexDistribution) -getDistributionInfo = do - uo <- liftAnnex Url.getUrlOptions - liftIO $ withTmpFile "git-annex.tmp" $ \tmpfile h -> do - hClose h - ifM (Url.downloadQuiet distributionInfoUrl tmpfile uo) - ( readish <$> readFileStrict tmpfile - , return Nothing - ) - -distributionInfoUrl :: String -distributionInfoUrl = fromJust Build.SysConfig.upgradelocation ++ ".info" |