[arch-commits] Commit in man-db/trunk (5 files)

Jan Steffens heftig at archlinux.org
Wed Jul 13 06:51:41 UTC 2016


    Date: Wednesday, July 13, 2016 @ 06:51:41
  Author: heftig
Revision: 271822

Revert to pure hooks again

mandb's slowness seems to come from lots of msync calls. Let's try looking into reducing them, or
using something like eatmydata in a pinch.

Added:
  man-db/trunk/man-db-purge.hook
    (from rev 271484, man-db/trunk/man-db-purge.hook)
Modified:
  man-db/trunk/PKGBUILD
  man-db/trunk/man-db.hook
Deleted:
  man-db/trunk/man-db.service
  man-db/trunk/man-db.timer

-------------------+
 PKGBUILD          |   19 ++++++++-----------
 man-db-purge.hook |    9 +++++++++
 man-db.hook       |    5 ++---
 man-db.service    |   12 ------------
 man-db.timer      |    9 ---------
 5 files changed, 19 insertions(+), 35 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-07-13 04:49:27 UTC (rev 271821)
+++ PKGBUILD	2016-07-13 06:51:41 UTC (rev 271822)
@@ -4,7 +4,7 @@
 
 pkgname=man-db
 pkgver=2.7.5
-pkgrel=3
+pkgrel=2
 pkgdesc="A utility for reading man pages"
 arch=('i686' 'x86_64')
 url="http://www.nongnu.org/man-db/"
@@ -19,13 +19,13 @@
 install=${pkgname}.install
 source=(http://download-mirror.savannah.gnu.org/releases/man-db/$pkgname-$pkgver.tar.xz{,.sig}
         convert-mans
-        man-db.{hook,timer,service})
+        man-db.hook
+        man-db-purge.hook)
 md5sums=('37da0bb0400cc7b640f33c26f6052202'
          'SKIP'
          '2b7662a7d5b33fe91f9f3e034361a2f6'
-         '8124b2e7faa16994f39bd3018a13106a'
-         'b84cbe6de43a9f941bb1935d6858eca8'
-         '96bd8cfb3979aa024886f59012826d47')
+         '2fe885f9f5d2914b6c7f41b8fd9c4f2b'
+         '0a8b9e0f85692ca9133d707069ab9714')
 validpgpkeys=('AC0A4FF12611B6FCCF01C111393587D97D86500B') # Colin Watson <cjwatson at debian.org>
 
 prepare() {
@@ -64,10 +64,7 @@
   # http://www.linuxfromscratch.org/lfs/view/6.4/chapter06/man-db.html
   install -D -m755 ${srcdir}/convert-mans  ${pkgdir}/usr/bin/convert-mans
 
-  # install man-db update timer
-  install -D -m644 ${srcdir}/man-db.hook ${pkgdir}/usr/share/libalpm/hooks/man-db.hook
-  install -D -m644 ${srcdir}/man-db.timer ${pkgdir}/usr/lib/systemd/system/man-db.timer
-  install -D -m644 ${srcdir}/man-db.service ${pkgdir}/usr/lib/systemd/system/man-db.service
-  install -d -m755 ${pkgdir}/usr/lib/systemd/system/multi-user.target.wants
-  ln -s ../man-db.timer ${pkgdir}//usr/lib/systemd/system/multi-user.target.wants/man-db.timer
+  # install man-db update hooks
+  install -d ${pkgdir}/usr/share/libalpm/hooks
+  install -m644 ${srcdir}/*.hook ${pkgdir}/usr/share/libalpm/hooks/
 }

Copied: man-db/trunk/man-db-purge.hook (from rev 271484, man-db/trunk/man-db-purge.hook)
===================================================================
--- man-db-purge.hook	                        (rev 0)
+++ man-db-purge.hook	2016-07-13 06:51:41 UTC (rev 271822)
@@ -0,0 +1,9 @@
+[Trigger]
+Type = File
+Operation = Remove
+Target = usr/share/man/*
+
+[Action]
+Description = Purging old manpage index entries...
+When = PostTransaction
+Exec = /bin/sh -c 'mkdir -p /var/cache/man; exec mandb --quiet'

Modified: man-db.hook
===================================================================
--- man-db.hook	2016-07-13 04:49:27 UTC (rev 271821)
+++ man-db.hook	2016-07-13 06:51:41 UTC (rev 271822)
@@ -2,10 +2,9 @@
 Type = File
 Operation = Install
 Operation = Upgrade
-Operation = Remove
 Target = usr/share/man/*
 
 [Action]
-Description = Starting manpage update...
+Description = Updating manpage index...
 When = PostTransaction
-Exec = /bin/sh -c 'systemctl start --fail --no-block man-db.service 2>/dev/null >&2'
+Exec = /bin/sh -c 'mkdir -p /var/cache/man; exec mandb --quiet --no-purge'

Deleted: man-db.service
===================================================================
--- man-db.service	2016-07-13 04:49:27 UTC (rev 271821)
+++ man-db.service	2016-07-13 06:51:41 UTC (rev 271822)
@@ -1,12 +0,0 @@
-[Unit]
-Description=Update man-db cache
-RequiresMountsFor=/var/cache/man
-
-[Service]
-Type=oneshot
-ExecStart=/usr/bin/mkdir -p /var/cache/man
-ExecStart=/usr/bin/mandb --quiet
-CPUSchedulingPolicy=batch
-Nice=19
-IOSchedulingClass=best-effort
-IOSchedulingPriority=7

Deleted: man-db.timer
===================================================================
--- man-db.timer	2016-07-13 04:49:27 UTC (rev 271821)
+++ man-db.timer	2016-07-13 06:51:41 UTC (rev 271822)
@@ -1,9 +0,0 @@
-[Unit]
-Description=Daily man-db cache update
-
-[Timer]
-# This is not OnCalendar in order to allow manual starts
-# to push back the next scheduled activation
-OnBootSec=30s
-OnUnitActiveSec=1d
-Persistent=true



More information about the arch-commits mailing list