aboutsummaryrefslogtreecommitdiff
path: root/Assistant/Threads
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-12-14 12:46:57 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-12-14 12:46:57 -0400
commit3a0bd261d9cfd395ed23ff43515523e6c6658c33 (patch)
tree9186c5daf386ba8e76c47ec869a737344a5a74d1 /Assistant/Threads
parentac4b4a812da85b46e7d656b12d9ff5568ef706fd (diff)
fold Build/SysConfig.hs into BuildInfo via include
This avoids warnings from stack about the module not being listed in the cabal file. So, the generated file is also renamed to Build/SysConfig. Note that the setup program seems to be cached despite these changes; I had to cabal clean to get cabal to update it so that Build/SysConfig was written. This commit was sponsored by Jochen Bartl on Patreon.
Diffstat (limited to 'Assistant/Threads')
-rw-r--r--Assistant/Threads/UpgradeWatcher.hs4
-rw-r--r--Assistant/Threads/Upgrader.hs6
2 files changed, 5 insertions, 5 deletions
diff --git a/Assistant/Threads/UpgradeWatcher.hs b/Assistant/Threads/UpgradeWatcher.hs
index 952db1f13..a50c84596 100644
--- a/Assistant/Threads/UpgradeWatcher.hs
+++ b/Assistant/Threads/UpgradeWatcher.hs
@@ -21,7 +21,7 @@ import Assistant.Alert
import Assistant.DaemonStatus
#ifdef WITH_WEBAPP
import Assistant.WebApp.Types
-import qualified Build.SysConfig
+import qualified BuildInfo
#endif
import Control.Concurrent.MVar
@@ -103,7 +103,7 @@ showSuccessfulUpgrade urlrenderer = do
(T.pack "Enable Automatic Upgrades")
urlrenderer ConfigEnableAutomaticUpgradeR
)
- void $ addAlert $ upgradeFinishedAlert button Build.SysConfig.packageversion
+ void $ addAlert $ upgradeFinishedAlert button BuildInfo.packageversion
#else
noop
#endif
diff --git a/Assistant/Threads/Upgrader.hs b/Assistant/Threads/Upgrader.hs
index 2bfbe5be1..75c4353b9 100644
--- a/Assistant/Threads/Upgrader.hs
+++ b/Assistant/Threads/Upgrader.hs
@@ -19,7 +19,7 @@ import Assistant.DaemonStatus
import Assistant.Alert
import Utility.NotificationBroadcaster
import qualified Annex
-import qualified Build.SysConfig
+import qualified BuildInfo
import qualified Utility.DottedVersion as DottedVersion
import Types.Distribution
#ifdef WITH_WEBAPP
@@ -31,7 +31,7 @@ import qualified Data.Text as T
upgraderThread :: UrlRenderer -> NamedThread
upgraderThread urlrenderer = namedThread "Upgrader" $
- when (isJust Build.SysConfig.upgradelocation) $ do
+ when (isJust BuildInfo.upgradelocation) $ do
{- Check for upgrade on startup, unless it was just
- upgraded. -}
unlessM (liftIO checkSuccessfulUpgrade) $
@@ -63,7 +63,7 @@ checkUpgrade urlrenderer = do
where
go Nothing = debug [ "Failed to check if upgrade is available." ]
go (Just d) = do
- let installed = DottedVersion.normalize Build.SysConfig.packageversion
+ let installed = DottedVersion.normalize BuildInfo.packageversion
let avail = DottedVersion.normalize $ distributionVersion d
let old = DottedVersion.normalize <$> distributionUrgentUpgrade d
if Just installed <= old