X-Original-To: alpine-aports@mail.alpinelinux.org Delivered-To: alpine-aports@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id 1C37FDC0256 for ; Mon, 10 Aug 2015 20:19:48 +0000 (UTC) Received: from lithium.8pit.net (lithium.8pit.net [141.101.32.65]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 71670DC00B6; Mon, 10 Aug 2015 20:19:47 +0000 (UTC) Received: from localhost (ip5f5ac946.dynamic.kabel-deutschland.de [95.90.201.70]); by lithium.8pit.net (OpenSMTPD) with ESMTPSA id b3100509; TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Mon, 10 Aug 2015 22:19:45 +0200 (CEST) From: =?UTF-8?q?S=C3=B6ren=20Tempel?= To: alpine-aports@lists.alpinelinux.org Subject: [alpine-aports] [PATCH] main/mdocml: use a cron instead of a trigger to invoke makewhatis(8) Date: Mon, 10 Aug 2015 22:19:34 +0200 Message-Id: <1439237974-14854-1-git-send-email-soeren+git@soeren-tempel.net> X-Mailer: git-send-email 2.5.0 X-Virus-Scanned: ClamAV using ClamSMTP X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: The database created by makewhatis(8) doesn't need to be up to date all the time, it is not critical at all when the database doesn't contain a newly added manpage for a few hours. So instead of slowing down package installation by using a trigger the makewhatis(8) database is now created and updated using a daily cron. The daily cron is run once after the first install of mdocml as well. Many distribution (e.g. Gentoo) also use a cron instead of a trigger to invoke makewhatis(8), in my opinion it is simply saner to it this way. --- main/mdocml/APKBUILD | 18 +++++++++++------- main/mdocml/mdocml.cron | 4 ++++ main/mdocml/mdocml.post-install | 1 + main/mdocml/mdocml.trigger | 4 ---- 4 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 main/mdocml/mdocml.cron create mode 120000 main/mdocml/mdocml.post-install delete mode 100644 main/mdocml/mdocml.trigger diff --git a/main/mdocml/APKBUILD b/main/mdocml/APKBUILD index 278c71f..e912f10 100644 --- a/main/mdocml/APKBUILD +++ b/main/mdocml/APKBUILD @@ -1,21 +1,20 @@ # Maintainer: Natanael Copa pkgname=mdocml pkgver=1.13.3 -pkgrel=4 +pkgrel=5 pkgdesc="mdoc/man compiler" url="http://mdocml.bsd.lv/" arch="all" license="BSD" depends= makedepends="sqlite-dev" -install="$pkgname.post-deinstall" -triggers="$pkgname.trigger=/usr/share/man/*" +install="$pkgname.post-install $pkgname.post-deinstall" subpackages="$pkgname-doc $pkgname-dev man" source="http://mdocml.bsd.lv/snapshots/mdocml-$pkgver.tar.gz shared-libmandoc.patch mdocml.post-deinstall default-pager.patch - mdocml.trigger + mdocml.cron man.conf " @@ -23,11 +22,14 @@ _builddir="$srcdir"/$pkgname-$pkgver prepare() { cd "$_builddir" + + local i= for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done + cat >configure.local<