From 728ef328ec233ebf680ecc7f083ca5751f87edf9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 17 May 2013 11:24:18 -0400 Subject: Sanitize debian changelog version before putting it into cabal file. Closes: #708619 --- Build/Configure.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Build') 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) $ -- cgit v1.2.3