Package: git-annex
Version: 4.20130516
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu ubuntu-patch saucy
If the top version in git-annex's debian/changelog is not a valid Cabal
version (for instance if it's been binNMUed, or modified by a
derivative), Setup fails with "Setup: git-annex.cabal:2: Parse of field
'version' failed". Build/Configure.hs effectively encodes a requirement
that the Debian changelog version must only take certain forms.
I suggest stripping off anything from the tail of the changelog version
that isn't a digit or '.', perhaps like this (apologies, my Haskell is
pretty rough):
* Build/Configure.hs: Only take characters from the changelog version that
are valid in Cabal versions.
diff -Nru git-annex-4.20130516ubuntu1/Build/Configure.hs
git-annex-4.20130516ubuntu2/Build/Configure.hs
--- git-annex-4.20130516ubuntu1/Build/Configure.hs 2013-05-16
00:18:11.000000000 +0100
+++ git-annex-4.20130516ubuntu2/Build/Configure.hs 2013-05-17
10:31:55.000000000 +0100
@@ -10,6 +10,7 @@
import System.Environment
import Data.Maybe
import Control.Monad.IfElse
+import Data.Char
import Build.TestConfig
import Utility.SafeCommand
@@ -114,7 +115,7 @@
let verline = takeWhile (/= '\n') changelog
return $ middle (words verline !! 1)
where
- middle = drop 1 . init
+ middle = takeWhile (\c -> isDigit c || c == '.') . drop 1 . init
getGitVersion :: Test
getGitVersion = do
Thanks,
--
Colin Watson [[email protected]]
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]