summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2017-02-15 17:39:04 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-02-18 07:54:16 +0700
commitf100798b1edee866c3679b1c1a4b84b578f02bd4 (patch)
treef6bfc6cf2828df72574a2af310da46917dcb9793
parent720d6700bb27e710ea48f1f577ead4bec40ca538 (diff)
downloadslackbuilds-f100798b1edee866c3679b1c1a4b84b578f02bd4.tar.gz
system/man-db: Updated for version 2.7.6.1.
-rw-r--r--system/man-db/doinst.sh23
-rw-r--r--system/man-db/man-db.SlackBuild11
-rw-r--r--system/man-db/man-db.cron13
-rw-r--r--system/man-db/man-db.info6
4 files changed, 40 insertions, 13 deletions
diff --git a/system/man-db/doinst.sh b/system/man-db/doinst.sh
index 4478281966..cb474322c8 100644
--- a/system/man-db/doinst.sh
+++ b/system/man-db/doinst.sh
@@ -14,6 +14,16 @@ config() {
config etc/man_db.conf.new
+# In English, the if/find below means "only run the database creation if
+# it was last done over an hour ago". This is needed because upgradepkg
+# runs doinst.sh twice, but I don't want the 10+ minute long database
+# creation to happen twice on upgrade (or at all, when I'm repeatedly
+# reinstalling man-db for testing purposes).
+
+if \
+ [ ! -e /var/cache/man/man-db ] || \
+ [ -n "$( find var/cache/man/ -type d -a -name man-db -a -mmin +60 )" ]
+then
# Generate the initial man database (or rebuild it if it exists).
# We want to skip this step if installing somewhere besides / (e.g. with
# the -root option or ROOT env variable set for installpkg), hence the
@@ -29,9 +39,10 @@ config etc/man_db.conf.new
# the 2>/dev/null was added for 2.7.6 because it complains about
# missing CACHEDIR.TAG files... which don't matter, because we've
# got NOCACHE in the config file.
-( \
- [ -x /bin/readlink ] && \
- [ "$( /bin/readlink -f $( pwd ) )" = "/" ] && \
- ( [ -x /opt/man-db/bin/mandb ] && /opt/man-db/bin/mandb -c -q ) || \
- ( [ -x /usr/bin/mandb ] && /usr/bin/mandb -c -q ) \
-) 2>/dev/null
+ ( \
+ [ -x /bin/readlink ] && \
+ [ "$( /bin/readlink -f $( pwd ) )" = "/" ] && \
+ ( [ -x /opt/man-db/bin/mandb ] && /opt/man-db/bin/mandb -c -q ) || \
+ ( [ -x /usr/bin/mandb ] && /usr/bin/mandb -c -q ) \
+ ) 2>/dev/null
+fi
diff --git a/system/man-db/man-db.SlackBuild b/system/man-db/man-db.SlackBuild
index 21c1ec5b3a..862bd35185 100644
--- a/system/man-db/man-db.SlackBuild
+++ b/system/man-db/man-db.SlackBuild
@@ -6,6 +6,15 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20170215 bkw:
+# - update for 2.7.6.1 (whoops, last update wasn't for the latest version
+# - only update the cache in doinst.sh if it's over an hour old. this
+# takes several minutes, and happens twice (uselessly) if the package
+# is upgraded (since upgradepkg runs doinst.sh twice). waiting an hour
+# also makes my life easier when I'm testing this script.
+# - fix man-db.cron so it works even if USR=yes (whoops), and stop trying
+# to chown the cache to the nonexistent 'man' user.
+
# 20170125 bkw:
# - update for 2.7.6.
# - add --disable-cache-owner. TODO: revisit this at some
@@ -26,7 +35,7 @@
# - update README and README.Slackware slightly.
PRGNAM=man-db
-VERSION=${VERSION:-2.7.6}
+VERSION=${VERSION:-2.7.6.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
diff --git a/system/man-db/man-db.cron b/system/man-db/man-db.cron
index d25bf3b5ec..93c3a00ff2 100644
--- a/system/man-db/man-db.cron
+++ b/system/man-db/man-db.cron
@@ -9,7 +9,7 @@ set -e
if ! [ -d /var/cache/man ]; then
# Recover from deletion, per FHS.
mkdir -p /var/cache/man
- chown man:root /var/cache/man || true
+ chown root:root /var/cache/man || true
chmod 2755 /var/cache/man
fi
@@ -19,5 +19,12 @@ fi
# some day.
#find /var/cache/man -type f -name '*.gz' -atime +6 -print0 | xargs -r0 rm -f &> /dev/null
-# regenerate man database
-[ -x /opt/man-db/bin/mandb ] && /opt/man-db/bin/mandb --no-purge --quiet
+# regenerate man database. /opt/man-db/bin probably isn't in cron's $PATH,
+# so check for it specially, otherwise use $PATH.
+if [ -x /opt/man-db/bin/mandb ]; then
+ MANDB=/opt/man-db/bin/mandb
+else
+ MANDB=mandb
+fi
+
+$MANDB --no-purge --quiet
diff --git a/system/man-db/man-db.info b/system/man-db/man-db.info
index 873e2a5d19..e4b784d6f1 100644
--- a/system/man-db/man-db.info
+++ b/system/man-db/man-db.info
@@ -1,9 +1,9 @@
PRGNAM="man-db"
-VERSION="2.7.6"
+VERSION="2.7.6.1"
HOMEPAGE="http://www.nongnu.org/man-db/"
-DOWNLOAD="http://download.savannah.gnu.org/releases/man-db/man-db-2.7.6.tar.xz \
+DOWNLOAD="http://download.savannah.gnu.org/releases/man-db/man-db-2.7.6.1.tar.xz \
http://download.savannah.gnu.org/releases/libpipeline/libpipeline-1.4.1.tar.gz"
-MD5SUM="e0aa460ab00b047f3784d70ae8ccfcab \
+MD5SUM="2948d49d0ed7265f60f83aa4a9ac9268 \
e54590ec68d6c1239f67b5b44e92022c"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""