Hello community,

here is the log from the commit of package cab for openSUSE:Factory checked in 
at 2017-06-04 01:51:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cab (Old)
 and      /work/SRC/openSUSE:Factory/.cab.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cab"

Sun Jun  4 01:51:13 2017 rev:3 rq:494128 version:0.2.17

Changes:
--------
--- /work/SRC/openSUSE:Factory/cab/cab.changes  2016-07-20 09:18:42.000000000 
+0200
+++ /work/SRC/openSUSE:Factory/.cab.new/cab.changes     2017-06-04 
01:51:17.388585307 +0200
@@ -1,0 +2,5 @@
+Mon Apr 24 12:26:19 UTC 2017 - [email protected]
+
+- Update to version 0.2.17 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  cab-0.2.16.tar.gz

New:
----
  cab-0.2.17.tar.gz

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

Other differences:
------------------
++++++ cab.spec ++++++
--- /var/tmp/diff_new_pack.p6i5cf/_old  2017-06-04 01:51:17.900512978 +0200
+++ /var/tmp/diff_new_pack.p6i5cf/_new  2017-06-04 01:51:17.904512413 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package cab
 #
-# 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,15 +18,13 @@
 
 %global pkg_name cab
 Name:           %{pkg_name}
-Version:        0.2.16
+Version:        0.2.17
 Release:        0
 Summary:        A maintenance command of Haskell cabal packages
 License:        BSD-3-Clause
 Group:          Development/Languages/Other
 Url:            https://hackage.haskell.org/package/%{name}
 Source0:        
https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
-Requires:       cabal-install
-# Begin cabal-rpm deps:
 BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-attoparsec-devel
@@ -39,8 +37,8 @@
 BuildRequires:  ghc-process-devel
 BuildRequires:  ghc-resourcet-devel
 BuildRequires:  ghc-rpm-macros
+Requires:       cabal-install
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-# End cabal-rpm deps
 
 %description
 This is a MacPorts-like maintenance command of Haskell cabal packages.
@@ -70,16 +68,12 @@
 %prep
 %setup -q
 
-
 %build
 %ghc_lib_build
 
-
 %install
 %ghc_lib_install
-
-%ghc_fix_dynamic_rpath %{pkg_name}
-
+%ghc_fix_rpath %{pkg_name}-%{version}
 
 %post -n ghc-%{name}-devel
 %ghc_pkg_recache

++++++ cab-0.2.16.tar.gz -> cab-0.2.17.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cab-0.2.16/Distribution/Cab/GenPaths.hs 
new/cab-0.2.17/Distribution/Cab/GenPaths.hs
--- old/cab-0.2.16/Distribution/Cab/GenPaths.hs 2016-02-15 06:47:24.000000000 
+0100
+++ new/cab-0.2.17/Distribution/Cab/GenPaths.hs 2017-04-24 02:22:54.000000000 
+0200
@@ -6,9 +6,9 @@
 import Control.Exception
 import Control.Monad
 import Data.List (isSuffixOf)
-import Distribution.Package
+import Distribution.Cab.Utils (readGenericPackageDescription, unPackageName)
+import Distribution.Package (pkgName, pkgVersion)
 import Distribution.PackageDescription
-import Distribution.PackageDescription.Parse (readPackageDescription)
 import Distribution.Verbosity (silent)
 import Distribution.Version
 import System.Directory
@@ -31,9 +31,9 @@
 
 getNameVersion :: FilePath -> IO (String,Version)
 getNameVersion file = do
-    desc <- readPackageDescription silent file
+    desc <- readGenericPackageDescription silent file
     let pkg = package . packageDescription $ desc
-        PackageName nm = pkgName pkg
+        nm = unPackageName $ pkgName pkg
         name = map (trans '-' '_') nm
         version = pkgVersion pkg
     return (name, version)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cab-0.2.16/Distribution/Cab/PkgDB.hs 
new/cab-0.2.17/Distribution/Cab/PkgDB.hs
--- old/cab-0.2.16/Distribution/Cab/PkgDB.hs    2016-02-15 06:47:24.000000000 
+0100
+++ new/cab-0.2.17/Distribution/Cab/PkgDB.hs    2017-04-24 02:22:54.000000000 
+0200
@@ -21,13 +21,13 @@
   , verOfPkgInfo
   ) where
 
-import Distribution.Cab.Utils (fromDotted, installedUnitId)
+import Distribution.Cab.Utils
+    (fromDotted, installedUnitId, mkPackageName, unPackageName)
 import Distribution.Cab.Version
 import Distribution.Cab.VerDB (PkgName)
-import Distribution.Version (Version(..))
 import Distribution.InstalledPackageInfo
     (InstalledPackageInfo, sourcePackageId)
-import Distribution.Package (PackageName(..), PackageIdentifier(..))
+import Distribution.Package (PackageIdentifier(..))
 import Distribution.Simple.Compiler (PackageDB(..))
 import Distribution.Simple.GHC (configure, getInstalledPackages, 
getPackageDBContents)
 import Distribution.Simple.PackageIndex
@@ -93,7 +93,7 @@
 -- > pkgdb <- getGlobalPkgDB
 -- > lookupByName "base" pkgdb
 lookupByName :: PkgName -> PkgDB -> [PkgInfo]
-lookupByName name db = concatMap snd $ lookupPackageName db (PackageName name)
+lookupByName name db = concatMap snd $ lookupPackageName db (mkPackageName 
name)
 
 -- |
 --
@@ -103,11 +103,8 @@
 lookupByVersion name ver db = lookupSourcePackageId db src
   where
     src = PackageIdentifier {
-        pkgName = PackageName name
-      , pkgVersion = Version {
-          versionBranch = fromDotted ver
-        , versionTags = []
-        }
+        pkgName = mkPackageName name
+      , pkgVersion = toVersion $ fromDotted ver
       }
 
 ----------------------------------------------------------------
@@ -118,9 +115,7 @@
 ----------------------------------------------------------------
 
 nameOfPkgInfo :: PkgInfo -> PkgName
-nameOfPkgInfo = toString . pkgName . sourcePackageId
-  where
-    toString (PackageName x) = x
+nameOfPkgInfo = unPackageName . pkgName . sourcePackageId
 
 fullNameOfPkgInfo :: PkgInfo -> String
 fullNameOfPkgInfo pkgi = nameOfPkgInfo pkgi ++ " " ++ verToString 
(verOfPkgInfo pkgi)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cab-0.2.16/Distribution/Cab/Utils.hs 
new/cab-0.2.17/Distribution/Cab/Utils.hs
--- old/cab-0.2.16/Distribution/Cab/Utils.hs    2016-02-15 06:47:24.000000000 
+0100
+++ new/cab-0.2.17/Distribution/Cab/Utils.hs    2017-04-24 02:22:54.000000000 
+0200
@@ -4,10 +4,15 @@
 import Data.List
 
 import Distribution.InstalledPackageInfo (InstalledPackageInfo)
+import Distribution.Package (PackageName)
+import Distribution.PackageDescription (GenericPackageDescription)
+import Distribution.Simple.PackageIndex (PackageIndex)
+import Distribution.Verbosity (Verbosity)
+
 #if MIN_VERSION_Cabal(1,21,0) && !(MIN_VERSION_Cabal(1,23,0))
 import Distribution.Package (PackageInstalled)
 #endif
-import Distribution.Simple.PackageIndex (PackageIndex)
+
 #if MIN_VERSION_Cabal(1,23,0)
 import qualified Distribution.InstalledPackageInfo as Cabal
     (installedUnitId)
@@ -22,6 +27,17 @@
     (lookupInstalledPackageId)
 #endif
 
+#if MIN_VERSION_Cabal(2,0,0)
+import qualified Distribution.Package as Cabal
+    (mkPackageName, unPackageName)
+import qualified Distribution.PackageDescription.Parse as Cabal
+    (readGenericPackageDescription)
+#else
+import qualified Distribution.Package as Cabal (PackageName(..))
+import qualified Distribution.PackageDescription.Parse as Cabal
+    (readPackageDescription)
+#endif
+
 -- |
 -- >>> fromDotted "1.2.3"
 -- [1,2,3]
@@ -37,6 +53,8 @@
 toDotted :: [Int] -> String
 toDotted = intercalate "." . map show
 
+-- UnitIds
+
 #if MIN_VERSION_Cabal(1,23,0)
 type UnitId = Cabal.UnitId
 #else
@@ -60,3 +78,28 @@
 lookupUnitId :: PackageIndex -> UnitId -> Maybe InstalledPackageInfo
 lookupUnitId = Cabal.lookupInstalledPackageId
 #endif
+
+-- PackageNames
+
+mkPackageName :: String -> PackageName
+#if MIN_VERSION_Cabal(2,0,0)
+mkPackageName = Cabal.mkPackageName
+#else
+mkPackageName = Cabal.PackageName
+#endif
+
+unPackageName :: PackageName -> String
+#if MIN_VERSION_Cabal(2,0,0)
+unPackageName = Cabal.unPackageName
+#else
+unPackageName (Cabal.PackageName s) = s
+#endif
+
+-- GenericPackageDescription
+
+readGenericPackageDescription :: Verbosity -> FilePath -> IO 
GenericPackageDescription
+#if MIN_VERSION_Cabal(2,0,0)
+readGenericPackageDescription = Cabal.readGenericPackageDescription
+#else
+readGenericPackageDescription = Cabal.readPackageDescription
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cab-0.2.16/Distribution/Cab/Version.hs 
new/cab-0.2.17/Distribution/Cab/Version.hs
--- old/cab-0.2.16/Distribution/Cab/Version.hs  2016-02-15 06:47:24.000000000 
+0100
+++ new/cab-0.2.17/Distribution/Cab/Version.hs  2017-04-24 02:22:54.000000000 
+0200
@@ -1,13 +1,15 @@
+{-# LANGUAGE CPP #-}
 module Distribution.Cab.Version (
     Ver
   , toVer
+  , toVersion
   , verToString
   , version
   , versionToString
   ) where
 
 import Distribution.Cab.Utils
-import Distribution.Version (Version(..))
+import Distribution.Version
 
 -- | Package version.
 newtype Ver = Ver [Int] deriving (Eq,Ord,Read,Show)
@@ -19,6 +21,14 @@
 toVer :: [Int] -> Ver
 toVer is = Ver is
 
+-- | Creating 'Version' in Cabal.
+toVersion :: [Int] -> Version
+#if MIN_VERSION_Cabal(2,0,0)
+toVersion is = mkVersion is
+#else
+toVersion is = Version is []
+#endif
+
 -- | From 'Version' to 'String'
 --
 -- >>> verToString $ toVer [1,2,3]
@@ -28,16 +38,18 @@
 
 -- | From 'Version' in Cabal to 'Ver'.
 --
--- >>> version $ Version [1,2,3] []
+-- >>> version $ toVersion [1,2,3]
 -- Ver [1,2,3]
 version :: Version -> Ver
+#if MIN_VERSION_Cabal(2,0,0)
+version = Ver . versionNumbers
+#else
 version = Ver . versionBranch
+#endif
 
 -- | From 'Version' in Cabal to 'String'.
 --
--- >>> versionToString $ Version [1,2,3] []
+-- >>> versionToString $ toVersion [1,2,3]
 -- "1.2.3"
 versionToString :: Version -> String
 versionToString = verToString . version
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cab-0.2.16/cab.cabal new/cab-0.2.17/cab.cabal
--- old/cab-0.2.16/cab.cabal    2016-02-15 06:47:24.000000000 +0100
+++ new/cab-0.2.17/cab.cabal    2017-04-24 02:22:54.000000000 +0200
@@ -1,5 +1,5 @@
 Name:                   cab
-Version:                0.2.16
+Version:                0.2.17
 Author:                 Kazu Yamamoto <[email protected]>
 Maintainer:             Kazu Yamamoto <[email protected]>
 License:                BSD3
@@ -21,7 +21,7 @@
   Default-Language:     Haskell2010
   GHC-Options:          -Wall
   Build-Depends:        base >= 4.0 && < 5
-                      , Cabal >= 1.18 && < 1.25
+                      , Cabal >= 1.18 && < 2.1
                       , attoparsec >= 0.10
                       , bytestring
                       , conduit >= 1.1


Reply via email to