Hello community, here is the log from the commit of package ghc-cabal-helper for openSUSE:Factory checked in at 2015-08-28 08:26:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-cabal-helper (Old) and /work/SRC/openSUSE:Factory/.ghc-cabal-helper.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-cabal-helper" Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-cabal-helper/ghc-cabal-helper.changes 2015-08-25 07:19:04.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-cabal-helper.new/ghc-cabal-helper.changes 2015-08-28 08:27:09.000000000 +0200 @@ -1,0 +2,5 @@ +Wed Aug 26 20:05:13 UTC 2015 - mimi...@gmail.com + +- update to 0.5.2.0 + +------------------------------------------------------------------- Old: ---- cabal-helper-0.5.0.0.tar.gz New: ---- cabal-helper-0.5.2.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-cabal-helper.spec ++++++ --- /var/tmp/diff_new_pack.Q2KHJt/_old 2015-08-28 08:27:09.000000000 +0200 +++ /var/tmp/diff_new_pack.Q2KHJt/_new 2015-08-28 08:27:09.000000000 +0200 @@ -19,7 +19,7 @@ %global pkg_name cabal-helper %bcond_with tests Name: ghc-cabal-helper -Version: 0.5.0.0 +Version: 0.5.2.0 Release: 0 Summary: Simple interface to some of Cabal's configuration state used by ghc-mod License: AGPL-3.0+ @@ -85,11 +85,9 @@ %prep %setup -q -n %{pkg_name}-%{version} - %build %ghc_lib_build - %install %ghc_lib_install mkdir %{buildroot}%{_prefix}/bin @@ -100,15 +98,12 @@ %cabal test %endif - %post devel %ghc_pkg_recache - %postun devel %ghc_pkg_recache - %files -f %{name}.files %defattr(-,root,root,-) %doc LICENSE ++++++ cabal-helper-0.5.0.0.tar.gz -> cabal-helper-0.5.2.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-helper-0.5.0.0/CabalHelper/Main.hs new/cabal-helper-0.5.2.0/CabalHelper/Main.hs --- old/cabal-helper-0.5.0.0/CabalHelper/Main.hs 2015-08-12 09:25:45.000000000 +0200 +++ new/cabal-helper-0.5.2.0/CabalHelper/Main.hs 2015-08-20 04:02:22.000000000 +0200 @@ -168,15 +168,7 @@ return $ Just $ ChResponseVersion (show comp) ver "ghc-options":flags -> do - res <- componentsMap lbi v distdir $ \c clbi bi -> let - outdir = componentOutDir lbi c - (clbi', adopts) = case flags of - ["--with-inplace"] -> (clbi, mempty) - [] -> removeInplaceDeps v lbi pd clbi - - - opts = componentGhcOptions normal lbi bi clbi' outdir - in renderGhcOptions' lbi v (opts `mappend` adopts) + res <- componentOptions lvd True flags id return $ Just $ ChResponseCompList (res ++ [(ChSetupHsName, [])]) "ghc-src-options":flags -> do @@ -204,12 +196,15 @@ "ghc-merged-pkg-options":flags -> do let pd = localPkgDescr lbi res <- mconcat . map snd <$> (componentOptions' lvd True flags (\_ _ o -> return o) $ \opts -> mempty { - ghcOptPackageDBs = ghcOptPackageDBs opts, - ghcOptPackages = ghcOptPackages opts, - ghcOptHideAllPackages = ghcOptHideAllPackages opts + ghcOptPackageDBs = [], + ghcOptHideAllPackages = NoFlag, + ghcOptPackages = ghcOptPackages opts }) - let res' = res { ghcOptPackageDBs = nub $ ghcOptPackageDBs res } + let res' = res { ghcOptPackageDBs = withPackageDB lbi + , ghcOptHideAllPackages = Flag True + , ghcOptPackages = nub $ ghcOptPackages res + } Just . ChResponseList <$> renderGhcOptions' lbi v res' @@ -304,7 +299,7 @@ opts = componentGhcOptions normal lbi bi clbi' outdir opts' = f opts - in rf lbi v $ opts' `mappend` adopts + in rf lbi v $ nubPackageFlags $ opts' `mappend` adopts componentOptions (lbi, v, distdir) inplaceFlag flags f = componentOptions' (lbi, v, distdir) inplaceFlag flags renderGhcOptions' f @@ -380,6 +375,8 @@ isInplaceDep :: (InstalledPackageId, PackageId) -> Bool isInplaceDep (ipid, pid) = inplacePackageId pid == ipid +nubPackageFlags opts = opts { ghcOptPackages = nub $ ghcOptPackages opts } + renderGhcOptions' lbi v opts = do #if CABAL_MAJOR == 1 && CABAL_MINOR < 20 (ghcProg, _) <- requireProgram v ghcProgram (withPrograms lbi) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-helper-0.5.0.0/Distribution/Helper.hs new/cabal-helper-0.5.2.0/Distribution/Helper.hs --- old/cabal-helper-0.5.0.0/Distribution/Helper.hs 2015-08-12 09:25:45.000000000 +0200 +++ new/cabal-helper-0.5.2.0/Distribution/Helper.hs 2015-08-20 04:02:22.000000000 +0200 @@ -50,6 +50,7 @@ , Distribution.Helper.getSandboxPkgDb -- * Managing @dist/@ + , prepare , reconfigure , writeAutogenFiles @@ -261,6 +262,20 @@ return $ SomeLocalBuildInfo pkgDbs eps srcDirs ghcOpts ghcSrcOpts ghcPkgOpts ghcMergedPkgOpts ghcLangOpts +-- | Make sure the appropriate helper executable for the given project is +-- installed and ready to run queries. +prepare :: MonadIO m + => (FilePath -> [String] -> String -> IO String) + -> FilePath + -- ^ Path to project directory, i.e. the one containing the + -- @project.cabal@ file + -> FilePath + -- ^ Path to the @dist/@ directory + -> m () +prepare readProc projdir distdir = liftIO $ do + exe <- findLibexecExe "cabal-helper-wrapper" + void $ readProc exe [projdir, distdir] "" + -- | Create @cabal_macros.h@ and @Paths_\<pkg\>@ possibly other generated files -- in the usual place. writeAutogenFiles :: MonadIO m diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-helper-0.5.0.0/cabal-helper.cabal new/cabal-helper-0.5.2.0/cabal-helper.cabal --- old/cabal-helper-0.5.0.0/cabal-helper.cabal 2015-08-12 09:25:45.000000000 +0200 +++ new/cabal-helper-0.5.2.0/cabal-helper.cabal 2015-08-20 04:02:22.000000000 +0200 @@ -1,5 +1,5 @@ name: cabal-helper -version: 0.5.0.0 +version: 0.5.2.0 synopsis: Simple interface to some of Cabal's configuration state used by ghc-mod description: @cabal-helper@ provides a library which wraps the internal use of