[DHG_packages] 01/01: Search for .agda-lib files in /var/lib/agda So that agda -l standard-library works out of te box

Joachim Breitner nomeata at moszumanska.debian.org
Sat Oct 14 02:56:45 UTC 2017


This is an automated email from the git hooks/post-receive script.

nomeata pushed a commit to annotated tag agda_v2.5.3-3
in repository DHG_packages.

commit d089cbd255e8bae6ade195f4bc11d1ac033df6ce
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Fri Oct 13 22:36:18 2017 -0400

    Search for .agda-lib files in /var/lib/agda So that agda -l standard-library works out of te box
---
 p/agda/debian/changelog            |  7 +++++++
 p/agda/debian/patches/series       |  1 +
 p/agda/debian/patches/var-lib-agda | 28 ++++++++++++++++++++++++++++
 3 files changed, 36 insertions(+)

diff --git a/p/agda/debian/changelog b/p/agda/debian/changelog
index ead3296..a69304c 100644
--- a/p/agda/debian/changelog
+++ b/p/agda/debian/changelog
@@ -1,3 +1,10 @@
+agda (2.5.3-3) unstable; urgency=medium
+
+  * Search for .agda-lib files in /var/lib/agda
+    So that agda -l standard-library works out of te box
+
+ -- Joachim Breitner <nomeata at debian.org>  Fri, 13 Oct 2017 22:54:31 -0400
+
 agda (2.5.3-2) unstable; urgency=medium
 
   * Typo in build-depends
diff --git a/p/agda/debian/patches/series b/p/agda/debian/patches/series
index e69de29..d1460db 100644
--- a/p/agda/debian/patches/series
+++ b/p/agda/debian/patches/series
@@ -0,0 +1 @@
+var-lib-agda
diff --git a/p/agda/debian/patches/var-lib-agda b/p/agda/debian/patches/var-lib-agda
new file mode 100644
index 0000000..69bffb6
--- /dev/null
+++ b/p/agda/debian/patches/var-lib-agda
@@ -0,0 +1,28 @@
+See https://github.com/agda/agda/issues/2804
+
+Index: agda/src/full/Agda/Interaction/Library.hs
+===================================================================
+--- agda.orig/src/full/Agda/Interaction/Library.hs	2017-10-13 21:58:48.432139892 -0400
++++ agda/src/full/Agda/Interaction/Library.hs	2017-10-13 22:39:44.970695744 -0400
+@@ -215,13 +215,20 @@
+   -> LibM [AgdaLibFile] -- ^ Content of library files.  (Might have empty @LibName at s.)
+ getInstalledLibraries overrideLibFile = mkLibM [] $ do
+     file <- lift $ getLibrariesFile overrideLibFile
+-    ifNotM (lift $ doesFileExist file) (return []) $ {-else-} do
++    userlibs <- ifNotM (lift $ doesFileExist file) (return []) $ {-else-} do
+       ls    <- lift $ stripCommentLines <$> readFile file
+       files <- lift $ sequence [ (i, ) <$> expandEnvironmentVariables s | (i, s) <- ls ]
+       parseLibFiles (Just file) files
++
++    systemlibs <- ifNotM (lift $ doesDirectoryExist systemLibDir) (return []) $ do
++      files <- lift $ filter isLibFile <$> listDirectory systemLibDir
++      parseLibFiles Nothing $ zip [1..] $ map (systemLibDir </>) files
++    return $ userlibs ++ systemlibs
+   `catchIO` \ e -> do
+     tell [ OtherError $ unlines ["Failed to read installed libraries.", show e] ]
+     return []
++  where systemLibDir = "/var/lib/agda"
++        isLibFile fn = takeExtension fn == ".agda-lib" && not ("." `List.isPrefixOf` fn)
+ 
+ -- | Parse the given library files.
+ --

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-haskell/DHG_packages.git



More information about the Pkg-haskell-commits mailing list