Hello community,

here is the log from the commit of package hdevtools for openSUSE:Factory 
checked in at 2016-10-22 13:21:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/hdevtools (Old)
 and      /work/SRC/openSUSE:Factory/.hdevtools.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "hdevtools"

Changes:
--------
--- /work/SRC/openSUSE:Factory/hdevtools/hdevtools.changes      2016-09-05 
21:21:09.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.hdevtools.new/hdevtools.changes 2016-10-22 
13:21:11.000000000 +0200
@@ -1,0 +2,5 @@
+Thu Sep 15 07:00:20 UTC 2016 - [email protected]
+
+- Update to version 0.1.4.1 revision 0 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  hdevtools-0.1.4.0.tar.gz

New:
----
  hdevtools-0.1.4.1.tar.gz

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

Other differences:
------------------
++++++ hdevtools.spec ++++++
--- /var/tmp/diff_new_pack.BFVWnt/_old  2016-10-22 13:21:12.000000000 +0200
+++ /var/tmp/diff_new_pack.BFVWnt/_new  2016-10-22 13:21:12.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           hdevtools
-Version:        0.1.4.0
+Version:        0.1.4.1
 Release:        0
 Summary:        Persistent GHC powered background server for FAST haskell 
development tools
 License:        MIT
@@ -28,6 +28,7 @@
 BuildRequires:  ghc-cmdargs-devel
 BuildRequires:  ghc-directory-devel
 BuildRequires:  ghc-filepath-devel
+BuildRequires:  ghc-ghc-boot-devel
 BuildRequires:  ghc-ghc-devel
 BuildRequires:  ghc-ghc-paths-devel
 BuildRequires:  ghc-network-devel

++++++ hdevtools-0.1.4.0.tar.gz -> hdevtools-0.1.4.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hdevtools-0.1.4.0/CHANGELOG.md 
new/hdevtools-0.1.4.1/CHANGELOG.md
--- old/hdevtools-0.1.4.0/CHANGELOG.md  2016-08-08 13:40:29.000000000 +0200
+++ new/hdevtools-0.1.4.1/CHANGELOG.md  2016-09-04 15:22:05.000000000 +0200
@@ -1,5 +1,9 @@
 # Changelog
 
+## 0.1.4.1 - 2016-09-04
+
+ * Do not try to execute `stack` commands if not available.
+
 ## 0.1.4.0 - 2016-08-08
 
  * Determine GHC libdir and binaries using stack.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hdevtools-0.1.4.0/hdevtools.cabal 
new/hdevtools-0.1.4.1/hdevtools.cabal
--- old/hdevtools-0.1.4.0/hdevtools.cabal       2016-08-08 13:40:29.000000000 
+0200
+++ new/hdevtools-0.1.4.1/hdevtools.cabal       2016-09-04 15:21:48.000000000 
+0200
@@ -1,5 +1,5 @@
 name:                hdevtools
-version:             0.1.4.0
+version:             0.1.4.1
 synopsis:            Persistent GHC powered background server for FAST haskell 
development tools
 license:             MIT
 license-file:        LICENSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hdevtools-0.1.4.0/src/Stack.hs 
new/hdevtools-0.1.4.1/src/Stack.hs
--- old/hdevtools-0.1.4.0/src/Stack.hs  2016-08-08 13:39:43.000000000 +0200
+++ new/hdevtools-0.1.4.1/src/Stack.hs  2016-09-04 15:20:39.000000000 +0200
@@ -31,7 +31,7 @@
 
 -- | Search for a @stack.yaml@ upwards in given file path tree.
 findStackYaml :: FilePath -> IO (Maybe FilePath)
-findStackYaml = fmap (fmap trim) . execInPath "stack path --config-location"
+findStackYaml = fmap (fmap trim) . execStackInPath "path --config-location"
 
 -- | Run @stack path@ to compute @StackConfig@
 getStackConfig :: CommandExtra -> IO (Maybe StackConfig)
@@ -49,29 +49,18 @@
     root = takeDirectory p
 
 getStackGhcBinDir :: FilePath -> IO (Maybe FilePath)
-getStackGhcBinDir = fmap (fmap trim) . execInPath "stack path --compiler-bin"
+getStackGhcBinDir = fmap (fmap trim) . execStackInPath "path --compiler-bin"
 
 getStackGhcLibDir :: FilePath -> IO (Maybe FilePath)
-getStackGhcLibDir = fmap (fmap takeDirectory) . execInPath "stack path 
--global-pkg-db"
+getStackGhcLibDir = fmap (fmap takeDirectory) . execStackInPath "path 
--global-pkg-db"
 
---------------------------------------------------------------------------------
 getStackDist :: FilePath -> IO (Maybe FilePath)
---------------------------------------------------------------------------------
-getStackDist p = (trim <$>) <$> execInPath cmd p
-  where
-    cmd        = "stack path --dist-dir"
-    -- dir        = takeDirectory p
-    -- splice     = (dir </>) . trim
+getStackDist p = (trim <$>) <$> execStackInPath "path --dist-dir" p
 
---------------------------------------------------------------------------------
 getStackDbs :: FilePath -> IO (Maybe [FilePath])
---------------------------------------------------------------------------------
-getStackDbs p = do mpp <- execInPath cmd p
-                   case mpp of
-                       Just pp -> Just <$> extractDbs pp
-                       Nothing -> return Nothing
-  where
-    cmd       = "stack path --ghc-package-path"
+getStackDbs p =
+  execStackInPath "path --ghc-package-path" p >>=
+  maybe (return Nothing) (\pp -> return <$> extractDbs pp)
 
 extractDbs :: String -> IO [FilePath]
 extractDbs = filterM doesDirectoryExist . stringPaths
@@ -95,6 +84,11 @@
    where
      f = reverse . dropWhile isSpace
 
+-- Execute stack command in path (if stack is available)
+execStackInPath :: String -> FilePath -> IO (Maybe String)
+execStackInPath a p =
+  findExecutable "stack" >>= maybe (return Nothing) (const $ execInPath 
("stack " ++ a) p)
+
 #if __GLASGOW_HASKELL__ < 709
 execInPath :: String -> FilePath -> IO (Maybe String)
 execInPath cmd p = do


Reply via email to