diff options
author | Joey Hess <joey@kitenet.net> | 2013-05-17 11:24:18 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-05-17 11:24:18 -0400 |
commit | 728ef328ec233ebf680ecc7f083ca5751f87edf9 (patch) | |
tree | c489d6158d2ce8cf935310a109fea81a1371eee1 /Build | |
parent | 4f2547f065f4598cec8b44708cd9e915dd5130b3 (diff) |
Sanitize debian changelog version before putting it into cabal file. Closes: #708619
Diffstat (limited to 'Build')
-rw-r--r-- | Build/Configure.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Build/Configure.hs b/Build/Configure.hs index e57b79257..65ba375bf 100644 --- a/Build/Configure.hs +++ b/Build/Configure.hs @@ -10,6 +10,7 @@ import System.FilePath import System.Environment import Data.Maybe import Control.Monad.IfElse +import Data.Char import Build.TestConfig import Utility.SafeCommand @@ -129,7 +130,8 @@ getSshConnectionCaching = Config "sshconnectioncaching" . BoolConfig <$> {- Set up cabal file with version. -} cabalSetup :: IO () cabalSetup = do - version <- takeWhile (/= '~') <$> getChangelogVersion + version <- takeWhile (\c -> isDigit c || c == '.') + <$> getChangelogVersion cabal <- readFile cabalfile writeFile tmpcabalfile $ unlines $ map (setfield "Version" version) $ |