Hello community,

here is the log from the commit of package ghc-torrent for openSUSE:Factory 
checked in at 2017-04-14 13:38:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-torrent (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-torrent.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-torrent"

Fri Apr 14 13:38:52 2017 rev:4 rq:485165 version:10000.1.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-torrent/ghc-torrent.changes  2016-12-06 
14:26:06.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-torrent.new/ghc-torrent.changes     
2017-04-14 13:38:52.905548915 +0200
@@ -1,0 +2,5 @@
+Wed Mar 22 09:16:51 UTC 2017 - [email protected]
+
+- Update to version 10000.1.1 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  torrent-10000.0.1.tar.gz

New:
----
  torrent-10000.1.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-torrent.spec ++++++
--- /var/tmp/diff_new_pack.a731az/_old  2017-04-14 13:38:53.481467521 +0200
+++ /var/tmp/diff_new_pack.a731az/_new  2017-04-14 13:38:53.485466955 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-torrent
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %global pkg_name torrent
 Name:           ghc-%{pkg_name}
-Version:        10000.0.1
+Version:        10000.1.1
 Release:        0
 Summary:        BitTorrent file parser and generater
 License:        BSD-3-Clause

++++++ torrent-10000.0.1.tar.gz -> torrent-10000.1.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/torrent-10000.0.1/CHANGELOG 
new/torrent-10000.1.1/CHANGELOG
--- old/torrent-10000.0.1/CHANGELOG     2016-11-11 20:08:50.000000000 +0100
+++ new/torrent-10000.1.1/CHANGELOG     2017-03-19 17:26:15.000000000 +0100
@@ -1,3 +1,17 @@
+haskell-torrent (10000.1.1) unstable; urgency=medium
+
+  * Fix build with pre-AMP base.
+
+ -- Joey Hess <[email protected]>  Sun, 19 Mar 2017 12:25:49 -0400
+
+haskell-torrent (10000.1.0) unstable; urgency=medium
+
+  * Don't crash when parsing a torrent with no announce value.
+    Torrents commonly have only an announce-list.
+  * tAnnounce converted to Maybe ByteString (API change)
+
+ -- Joey Hess <[email protected]>  Sun, 19 Mar 2017 01:02:16 -0400
+
 haskell-torrent (10000.0.1) unstable; urgency=medium
 
   * Added showTorrent.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/torrent-10000.0.1/src/Data/Torrent.hs 
new/torrent-10000.1.1/src/Data/Torrent.hs
--- old/torrent-10000.0.1/src/Data/Torrent.hs   2016-11-11 20:08:50.000000000 
+0100
+++ new/torrent-10000.1.1/src/Data/Torrent.hs   2017-03-19 17:26:15.000000000 
+0100
@@ -18,6 +18,7 @@
 import Data.BEncode.Parser
 import Data.Binary
 import Data.Generics
+import Data.Maybe
 
 import qualified Data.ByteString.Lazy as BS
 import Data.ByteString.Lazy (ByteString)
@@ -26,7 +27,7 @@
 
 data Torrent
        = Torrent
-               { tAnnounce     :: ByteString
+               { tAnnounce     :: Maybe ByteString
                , tAnnounceList :: [ByteString]
                , tComment      :: ByteString
                , tCreatedBy    :: Maybe ByteString
@@ -76,7 +77,7 @@
 
 parseTorrent :: BParser Torrent
 parseTorrent = do
-       announce <- bbytestring $ dict "announce"
+       announce <- optional $ bbytestring $ dict "announce"
        creator <- optional $ bbytestring $ dict "created by"
        info <- dict "info"
        setInput info
@@ -100,10 +101,10 @@
                return $ MultiFile files name pLen pieces
 
 serializeTorrent :: Torrent -> BEncode
-serializeTorrent torrent = BDict $ Map.fromList
-       [ ("announce", BString $ tAnnounce torrent)
-       , ("comment", BString $ tComment torrent)
-       , ("info", info)
+serializeTorrent torrent = BDict $ Map.fromList $ catMaybes
+       [ fmap (\b -> ("announce", BString b)) (tAnnounce torrent)
+       , Just ("comment", BString $ tComment torrent)
+       , Just ("info", info)
        ]
   where
        info = BDict $ Map.fromList $
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/torrent-10000.0.1/torrent.cabal 
new/torrent-10000.1.1/torrent.cabal
--- old/torrent-10000.0.1/torrent.cabal 2016-11-11 20:08:50.000000000 +0100
+++ new/torrent-10000.1.1/torrent.cabal 2017-03-19 17:26:15.000000000 +0100
@@ -1,5 +1,5 @@
 Name: torrent
-Version: 10000.0.1
+Version: 10000.1.1
 Cabal-Version: >= 1.6
 Maintainer: Joey Hess <[email protected]>
 Author: Lemmih <[email protected]>
@@ -22,4 +22,4 @@
 
 source-repository head
   type: git
-  location: git://git.kitenet.net/haskell-torrent.git
+  location: git://git.joeyh.name/haskell-torrent.git


Reply via email to