Hello community, here is the log from the commit of package cab for openSUSE:Factory checked in at 2016-07-20 09:18:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cab (Old) and /work/SRC/openSUSE:Factory/.cab.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cab" Changes: -------- --- /work/SRC/openSUSE:Factory/cab/cab.changes 2015-07-12 22:52:02.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.cab.new/cab.changes 2016-07-20 09:18:42.000000000 +0200 @@ -1,0 +2,5 @@ +Sun Jul 10 17:12:41 UTC 2016 - [email protected] + +- Update to version 0.2.16 revision 0 with cabal2obs. + +------------------------------------------------------------------- Old: ---- cab-0.2.15.tar.gz New: ---- cab-0.2.16.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cab.spec ++++++ --- /var/tmp/diff_new_pack.q8SlhO/_old 2016-07-20 09:18:44.000000000 +0200 +++ /var/tmp/diff_new_pack.q8SlhO/_new 2016-07-20 09:18:44.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package cab # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 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 @@ -17,22 +17,18 @@ %global pkg_name cab - -Name: cab -Version: 0.2.15 +Name: %{pkg_name} +Version: 0.2.16 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 -BuildRoot: %{_tmppath}/%{name}-%{version}-build - -BuildRequires: ghc-Cabal-devel -BuildRequires: ghc-rpm-macros +Requires: cabal-install # Begin cabal-rpm deps: BuildRequires: chrpath +BuildRequires: ghc-Cabal-devel BuildRequires: ghc-attoparsec-devel BuildRequires: ghc-bytestring-devel BuildRequires: ghc-conduit-devel @@ -42,8 +38,9 @@ BuildRequires: ghc-filepath-devel BuildRequires: ghc-process-devel BuildRequires: ghc-resourcet-devel +BuildRequires: ghc-rpm-macros +BuildRoot: %{_tmppath}/%{name}-%{version}-build # End cabal-rpm deps -Requires: cabal-install %description This is a MacPorts-like maintenance command of Haskell cabal packages. @@ -52,7 +49,6 @@ check all outdated packages, or if you want a way to remove outdated packages recursively, this command helps you. - %package -n ghc-%{name} Summary: Haskell %{name} library Group: System/Libraries @@ -60,30 +56,31 @@ %description -n ghc-%{name} This package provides the Haskell %{name} shared library. - %package -n ghc-%{name}-devel Summary: Haskell %{name} library development files Group: Development/Libraries/Other +Requires: ghc-%{name} = %{version}-%{release} Requires: ghc-compiler = %{ghc_version} Requires(post): ghc-compiler = %{ghc_version} Requires(postun): ghc-compiler = %{ghc_version} -Requires: ghc-%{name} = %{version}-%{release} %description -n ghc-%{name}-devel This package provides the Haskell %{name} library development files. - %prep %setup -q + %build %ghc_lib_build + %install %ghc_lib_install %ghc_fix_dynamic_rpath %{pkg_name} + %post -n ghc-%{name}-devel %ghc_pkg_recache ++++++ cab-0.2.15.tar.gz -> cab-0.2.16.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cab-0.2.15/Distribution/Cab/Commands.hs new/cab-0.2.16/Distribution/Cab/Commands.hs --- old/cab-0.2.15/Distribution/Cab/Commands.hs 2015-01-09 04:11:53.000000000 +0100 +++ new/cab-0.2.16/Distribution/Cab/Commands.hs 2016-02-15 06:47:24.000000000 +0100 @@ -126,9 +126,9 @@ getDirs :: (String,String) -> [String] -> IO [FilePath] getDirs (name,ver) sandboxOpts = do - libdirs <- queryGhcPkg "library-dirs" + importDirs <- queryGhcPkg "import-dirs" haddock <- map docDir <$> queryGhcPkg "haddock-html" - return $ topDir $ libdirs ++ haddock + return $ topDir $ importDirs ++ haddock where nameVer = name ++ "-" ++ ver queryGhcPkg field = do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cab-0.2.15/Distribution/Cab/PkgDB.hs new/cab-0.2.16/Distribution/Cab/PkgDB.hs --- old/cab-0.2.15/Distribution/Cab/PkgDB.hs 2015-01-09 04:11:53.000000000 +0100 +++ new/cab-0.2.16/Distribution/Cab/PkgDB.hs 2016-02-15 06:47:24.000000000 +0100 @@ -21,12 +21,12 @@ , verOfPkgInfo ) where -import Distribution.Cab.Utils (fromDotted) +import Distribution.Cab.Utils (fromDotted, installedUnitId) import Distribution.Cab.Version import Distribution.Cab.VerDB (PkgName) import Distribution.Version (Version(..)) import Distribution.InstalledPackageInfo - (InstalledPackageInfo_(..), InstalledPackageInfo) + (InstalledPackageInfo, sourcePackageId) import Distribution.Package (PackageName(..), PackageIdentifier(..)) import Distribution.Simple.Compiler (PackageDB(..)) import Distribution.Simple.GHC (configure, getInstalledPackages, getPackageDBContents) @@ -74,8 +74,12 @@ getDBs :: [PackageDB] -> IO PkgDB getDBs specs = do - (_,_,pro) <- configure normal Nothing Nothing defaultProgramDb - getInstalledPackages normal specs pro + (_comp,_,pro) <- configure normal Nothing Nothing defaultProgramDb + getInstalledPackages normal +#if MIN_VERSION_Cabal(1,23,0) + _comp +#endif + specs pro getDB :: PackageDB -> IO PkgDB getDB spec = do @@ -130,7 +134,7 @@ ---------------------------------------------------------------- topSortedPkgs :: PkgInfo -> PkgDB -> [PkgInfo] -topSortedPkgs pkgi db = topSort $ pkgids [pkgi] +topSortedPkgs pkgi db = topSort $ unitids [pkgi] where - pkgids = map installedPackageId + unitids = map installedUnitId topSort = topologicalOrder . fromList . reverseDependencyClosure db diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cab-0.2.15/Distribution/Cab/Printer.hs new/cab-0.2.16/Distribution/Cab/Printer.hs --- old/cab-0.2.15/Distribution/Cab/Printer.hs 2015-01-09 04:11:53.000000000 +0100 +++ new/cab-0.2.16/Distribution/Cab/Printer.hs 2016-02-15 06:47:24.000000000 +0100 @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} module Distribution.Cab.Printer ( printDeps , printRevDeps @@ -11,21 +12,21 @@ import qualified Data.Map as M import Distribution.Cab.PkgDB import Distribution.Cab.Version -import Distribution.InstalledPackageInfo (InstalledPackageInfo_(..)) +import Distribution.Cab.Utils (UnitId, installedUnitId, lookupUnitId) +import Distribution.InstalledPackageInfo (author, depends, license) import Distribution.License (License(..)) -import Distribution.Package (InstalledPackageId) -import Distribution.Simple.PackageIndex (lookupInstalledPackageId, allPackages) +import Distribution.Simple.PackageIndex (allPackages) ---------------------------------------------------------------- -type RevDB = Map InstalledPackageId [InstalledPackageId] +type RevDB = Map UnitId [UnitId] makeRevDepDB :: PkgDB -> RevDB makeRevDepDB db = M.fromList revdeps where pkgs = allPackages db deps = map idDeps pkgs - idDeps pkg = (installedPackageId pkg, depends pkg) + idDeps pkg = (installedUnitId pkg, depends pkg) kvs = sort $ concatMap decomp deps decomp (k,vs) = map (\v -> (v,k)) vs kvss = groupBy ((==) `on` fst) kvs @@ -37,14 +38,14 @@ printDeps :: Bool -> Bool -> PkgDB -> Int -> PkgInfo -> IO () printDeps rec info db n pkgi = mapM_ (printDep rec info db n) $ depends pkgi -printDep :: Bool -> Bool -> PkgDB -> Int -> InstalledPackageId -> IO () -printDep rec info db n pid = case lookupInstalledPackageId db pid of - Nothing -> return () - Just pkgi -> do - putStr $ prefix ++ fullNameOfPkgInfo pkgi - extraInfo info pkgi +printDep :: Bool -> Bool -> PkgDB -> Int -> UnitId -> IO () +printDep rec info db n uid = case lookupUnitId db uid of + Nothing -> return () + Just uniti -> do + putStr $ prefix ++ fullNameOfPkgInfo uniti + extraInfo info uniti putStrLn "" - when rec $ printDeps rec info db (n+1) pkgi + when rec $ printDeps rec info db (n+1) uniti where prefix = replicate (n * 4) ' ' @@ -56,20 +57,20 @@ revdb = makeRevDepDB db printRevDeps' :: Bool -> Bool -> PkgDB -> RevDB -> Int -> PkgInfo -> IO () -printRevDeps' rec info db revdb n pkgi = case M.lookup pkgid revdb of +printRevDeps' rec info db revdb n pkgi = case M.lookup unitid revdb of Nothing -> return () - Just pkgids -> mapM_ (printRevDep' rec info db revdb n) pkgids + Just unitids -> mapM_ (printRevDep' rec info db revdb n) unitids where - pkgid = installedPackageId pkgi + unitid = installedUnitId pkgi -printRevDep' :: Bool -> Bool -> PkgDB -> RevDB -> Int -> InstalledPackageId -> IO () -printRevDep' rec info db revdb n pid = case lookupInstalledPackageId db pid of - Nothing -> return () - Just pkgi -> do - putStr $ prefix ++ fullNameOfPkgInfo pkgi - extraInfo info pkgi +printRevDep' :: Bool -> Bool -> PkgDB -> RevDB -> Int -> UnitId -> IO () +printRevDep' rec info db revdb n uid = case lookupUnitId db uid of + Nothing -> return () + Just uniti -> do + putStr $ prefix ++ fullNameOfPkgInfo uniti + extraInfo info uniti putStrLn "" - when rec $ printRevDeps' rec info db revdb (n+1) pkgi + when rec $ printRevDeps' rec info db revdb (n+1) uniti where prefix = replicate (n * 4) ' ' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cab-0.2.15/Distribution/Cab/Utils.hs new/cab-0.2.16/Distribution/Cab/Utils.hs --- old/cab-0.2.15/Distribution/Cab/Utils.hs 2015-01-09 04:11:53.000000000 +0100 +++ new/cab-0.2.16/Distribution/Cab/Utils.hs 2016-02-15 06:47:24.000000000 +0100 @@ -1,7 +1,27 @@ +{-# LANGUAGE CPP #-} module Distribution.Cab.Utils where import Data.List +import Distribution.InstalledPackageInfo (InstalledPackageInfo) +#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) +import qualified Distribution.Package as Cabal (UnitId) +import qualified Distribution.Simple.PackageIndex as Cabal + (lookupUnitId) +#else +import qualified Distribution.InstalledPackageInfo as Cabal + (installedPackageId) +import qualified Distribution.Package as Cabal (InstalledPackageId) +import qualified Distribution.Simple.PackageIndex as Cabal + (lookupInstalledPackageId) +#endif + -- | -- >>> fromDotted "1.2.3" -- [1,2,3] @@ -16,3 +36,27 @@ -- "1.2.3" toDotted :: [Int] -> String toDotted = intercalate "." . map show + +#if MIN_VERSION_Cabal(1,23,0) +type UnitId = Cabal.UnitId +#else +type UnitId = Cabal.InstalledPackageId +#endif + +installedUnitId :: InstalledPackageInfo -> UnitId +#if MIN_VERSION_Cabal(1,23,0) +installedUnitId = Cabal.installedUnitId +#else +installedUnitId = Cabal.installedPackageId +#endif + +#if MIN_VERSION_Cabal(1,23,0) +lookupUnitId :: PackageIndex a -> UnitId -> Maybe a +lookupUnitId = Cabal.lookupUnitId +#elif MIN_VERSION_Cabal(1,21,0) +lookupUnitId :: PackageInstalled a => PackageIndex a -> UnitId -> Maybe a +lookupUnitId = Cabal.lookupInstalledPackageId +#else +lookupUnitId :: PackageIndex -> UnitId -> Maybe InstalledPackageInfo +lookupUnitId = Cabal.lookupInstalledPackageId +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cab-0.2.15/cab.cabal new/cab-0.2.16/cab.cabal --- old/cab-0.2.15/cab.cabal 2015-01-09 04:11:53.000000000 +0100 +++ new/cab-0.2.16/cab.cabal 2016-02-15 06:47:24.000000000 +0100 @@ -1,5 +1,5 @@ Name: cab -Version: 0.2.15 +Version: 0.2.16 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.23 + , Cabal >= 1.18 && < 1.25 , attoparsec >= 0.10 , bytestring , conduit >= 1.1
