[Pkg-haskell-commits] darcs: haskell-hoogle: Call update-hoogle command automatically with deb-triggers

kiwamu at debian.or.jp kiwamu at debian.or.jp
Thu Sep 13 00:17:50 UTC 2012


Thu Sep 13 00:14:09 UTC 2012  kiwamu at debian.or.jp
  * Call update-hoogle command automatically with deb-triggers
  Ignore-this: 489e2fff0d33556b3c4e31bcf9c8d358

    M ./hoogle.postinst -8 +11
    A ./hoogle.triggers
    M ./update-hoogle.8 -7 +3

Thu Sep 13 00:14:09 UTC 2012  kiwamu at debian.or.jp
  * Call update-hoogle command automatically with deb-triggers
  Ignore-this: 489e2fff0d33556b3c4e31bcf9c8d358
diff -rN -u old-haskell-hoogle//hoogle.postinst new-haskell-hoogle//hoogle.postinst
--- old-haskell-hoogle//hoogle.postinst	2012-09-13 00:17:49.965325634 +0000
+++ new-haskell-hoogle//hoogle.postinst	2012-09-13 00:17:49.985325172 +0000
@@ -13,14 +13,17 @@
 #DEBHELPER#
 
 ## ----------------------------------------------------------------------
-if [ "$1" = "configure" ]
-then
-
-    ## ------------------------------------------------------------------
-    ## create /var/lib/hoogle/databases
-    [ -d /var/lib/hoogle/databases ] && update-hoogle
-
-fi
+case "$1" in
+    triggered|configure)
+	[ -d /var/lib/hoogle/databases ] && update-hoogle
+        ;;
+    abort-upgrade|abort-remove|abort-deconfigure)
+        ;;
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 0
+        ;;
+esac
 
 ## ----------------------------------------------------------------------
 exit 0
diff -rN -u old-haskell-hoogle//hoogle.triggers new-haskell-hoogle//hoogle.triggers
--- old-haskell-hoogle//hoogle.triggers	1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-hoogle//hoogle.triggers	2012-09-13 00:17:49.985325172 +0000
@@ -0,0 +1 @@
+interest /usr/lib/ghc-doc/haddock
diff -rN -u old-haskell-hoogle//update-hoogle.8 new-haskell-hoogle//update-hoogle.8
--- old-haskell-hoogle//update-hoogle.8	2012-09-13 00:17:49.953331981 +0000
+++ new-haskell-hoogle//update-hoogle.8	2012-09-13 00:17:49.993330467 +0000
@@ -10,12 +10,8 @@
 This program creates hoogle database for Debian system.
 It collects haddock documents, then create the database for hoogle command.
 .PP
-.B update\-hoogle
-isn't called automatically when
-.B libghc\-*\-doc
-package installed.
-You should run this program manually to synchronize hoogle database with
-haddock documents.
+This program is called by hoogle's postinst script automatically.
+But you can run this program manually too, if hoogle database broken.
 .SH "FILES"
 .TP 
 .B /var/lib/hoogle/databases
@@ -26,4 +22,4 @@
 Kiwamu Okabe <kiwamu at debian.or.jp>
 .SH "SEE ALSO"
 .LP 
-hoogle(1), haddock(1)
+hoogle(1), haddock(1), deb-triggers(5)





More information about the Pkg-haskell-commits mailing list