[Pkg-haskell-commits] darcs: tools: Better handle packages that have been binNMUed before

Joachim Breitner mail at joachim-breitner.de
Mon Jul 11 19:58:17 UTC 2011


Mon Jul 11 19:57:57 UTC 2011  Joachim Breitner <mail at joachim-breitner.de>
  * Better handle packages that have been binNMUed before
  Ignore-this: 3b8952050554dc5175c905dd1d7ee232

    M ./haskell-pkg-debcheck.hs -5 +5

Mon Jul 11 19:57:57 UTC 2011  Joachim Breitner <mail at joachim-breitner.de>
  * Better handle packages that have been binNMUed before
  Ignore-this: 3b8952050554dc5175c905dd1d7ee232
diff -rN -u old-tools//haskell-pkg-debcheck.hs new-tools//haskell-pkg-debcheck.hs
--- old-tools//haskell-pkg-debcheck.hs	2011-07-11 19:58:17.278343229 +0000
+++ new-tools//haskell-pkg-debcheck.hs	2011-07-11 19:58:17.286279874 +0000
@@ -207,13 +207,13 @@
         guard (isNotIgnored p)
         v <- parseDebianVersion <$>
              fieldValue "Version" para
-        s <- BS.unpack <$>
+        sf <- BS.unpack <$>
              fieldValue "Source" para
+        -- extract the source name and version if both are given
+        let (s,sv) = case words sf of
+                    [s,('(':sv)] -> (s, parseDebianVersion (init sv))
+                    [s]          -> (s,v)
         guard (s == bToS ! p)
-        -- extract the source version if available
-        let sv = case words s of
-                    [_,('(':sv)] -> parseDebianVersion (init sv)
-                    _            -> v
         return ((p,arch), (v,sv))
     ) .
     unControl





More information about the Pkg-haskell-commits mailing list