]> git.draconx.ca Git - gentoo-fixes.git/commitdiff
sys-apps/man: Use absolute paths in makewhatis cron job.
authorNick Bowler <nbowler@draconx.ca>
Tue, 26 Mar 2019 04:27:42 +0000 (00:27 -0400)
committerNick Bowler <nbowler@draconx.ca>
Tue, 26 Mar 2019 04:27:42 +0000 (00:27 -0400)
We don't know what the user's cron configuration will put in
PATH, so we should use absolute paths in the default installed
configuration file.

And remove the pkg_postinst bit that deletes certain installed
configuration files as there is no explanation for why that makes
any sense at all.

sys-apps/man/Manifest
sys-apps/man/files/makewhatis.cron [deleted file]
sys-apps/man/man-1.6g-r2.ebuild [moved from sys-apps/man/man-1.6g-r1.ebuild with 85% similarity]

index 989dc8bd06f397fa4cfd76e0e80c8fb1983a37bb..73a41e597660bf10d1093e8152b4f49a9f8f91dd 100644 (file)
@@ -1,4 +1,3 @@
-AUX makewhatis.cron 115 BLAKE2B 55491e18ad63037715d611cb2f2dbd9a577616bda54ade3b74e88dc5e3cea679ef6ac3486b0682cb385f68ae307eb0ccbcc521f0eb15a9adb0ac5c88877aaf3e SHA512 378f1980da40d67d82e3ed6a8d470df58180ca3eeee1d9f6df5d8eec7101461ee0af2f5d7c1da81af086f0aad0665bdffd4c6ee65418dff5f7c187a39b2e79b8
 AUX man-1.5m2-apropos.patch 450 BLAKE2B 911c3a05d3f82a196091c59ca55706b4b0b9c49da0ccb5f912dcde345708997a581af0620f75a3ff71de29eb82c7609b9c6ddf0ce5ab56000e74c97aa823df90 SHA512 cf8c5f6debe6de3a424d1b4cb4cd234e2524477150fb726f7dc659ed436d491c0506649f63d06f1b825765d48e18736ef6476dcbbb27aabe1d1a3b47d7bf7317
 AUX man-1.6-cross-compile.patch 1748 BLAKE2B 9cab0cec9ad887068c6124bce49f4faf93545c5eed264c6fda0b145c5fe8e8215690d16359974601b8e962cb1e25cde618b425db4a000271cd590eb44ec76df5 SHA512 9f4d851ed77d7cb7771b6a49bed59545e1312d7f82665ff526712c892ecf1269487aeffa67062eb36bbb2d4b9467d6b626501aaec23a0e37fc2eb9a1ebc7a4fb
 AUX man-1.6c-cut-duplicate-manpaths.patch 2148 BLAKE2B 19ae613d1f3d340fb16a788a5097e06f87ea3be767765aea1d16826bb681e1191043397fb06e06b0772cbff04762a968e07cbdc480765bbf64a363715c23a6f3 SHA512 00141e89313e5dd4bf781c2010ca1aea4f8c265339cb4a46ee596870388b41e78135191b0266f4d1046a15f92d404477622139baf5f92a9692c8f9ee79d3a820
@@ -13,4 +12,4 @@ AUX man-1.6g-fbsd.patch 366 BLAKE2B 882b3b3048e3dcb4f64f38e94d7603ae577038dce663
 AUX man-1.6g-nonportable-echo.patch 607 BLAKE2B c04845b50fc1f7e962ff40e6173e14293c83b675c1db87de9f9a442ac8fdb4a27fe75d6d83a587da611f7fee214a79e4a449bd3d5f00afa6925798068674fb64 SHA512 ddbbe14755a0ccea627a734c37428485a5f310ab916a230707b45ed503e629518cc7ea81aa5097b0bd403f2fa6e1305dce246c01e791987f5f11901b1d100b6e
 AUX man-1.6g-xz.patch 1848 BLAKE2B 6a0855eda72386a0f48e715e9ba620b3473b3aa854c42fabd93bc02b7c9cd44fbd07f2608257fe953bdfa9b02e8fa35876d651ba5aab99937fe42325fcfb7b69 SHA512 6a883fa800a6d3b11c76a70e1a31c0736d380271c9f21315863ddaca9529e3d613b587724287fb94bab2b0d97215f6ccb3f1438a5c5e339e5a2edf872c92515c
 DIST man-1.6g.tar.gz 256906 BLAKE2B f13e21400aecd41a5f001b37bf3c6f9fd8463ff627f761cfd0a6846c7b8dac48a6dc87ff2cf4786b55800a558141cffcc0d66420943e46f708292f5653b42d51 SHA512 c786fa2201aed92293e5590dc3ad5d550cf14e5059fa274ef7719af86ee4c892e747576495b6dc0a09286e73e2f0f0caf860216e0c8032d9ef13e5d26853048b
-EBUILD man-1.6g-r1.ebuild 4385 BLAKE2B f7af3f05d4fdcc3b0395c05107a7e1523d84f51bd22dcfcc58bf3c5b7dd04e7b296ff7d8aca4207ab2cfc4549388a989261ca5cd2d129db19ec42c576e72e049 SHA512 414b3cf02d10811c3855c33220e5f14717e3b4a6057e6be6f28dd12bb11770bb47468902c19e0bccafc689015a3e05da3c4e5236474c328c1bf9c6859cab42c5
+EBUILD man-1.6g-r2.ebuild 3930 BLAKE2B e6af0c063cce75b40ac6ab16581586304fb28ca0f0c53ed04ad52fe980c902ab484be01bbc947a558782402297c2e32e1d3fb9fb55101ed875cf65e94c6c4003 SHA512 e3cd0c582bfeb01155bed8ffaf52f095a522f65bfcd15e92dc4484df41b021b57fd5e915c2dc380a2ae02dd026e421d737b932b30fc50eb9629fc685f8d44075
diff --git a/sys-apps/man/files/makewhatis.cron b/sys-apps/man/files/makewhatis.cron
deleted file mode 100644 (file)
index bef5ea6..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-# this is part of the man package
-# it updates the search database for manpages
-
-exec nice makewhatis -u
similarity index 85%
rename from sys-apps/man/man-1.6g-r1.ebuild
rename to sys-apps/man/man-1.6g-r2.ebuild
index 0911511a443f043731e6aca5755f2eab0e9abe3c..d4574946b723b23bfc4b3d43fbe348b1049f3a69 100644 (file)
@@ -92,11 +92,17 @@ src_configure() {
 
        echoit \
        ./configure \
-               -bindir="${EPREFIX}"/usr/bin \
-               -confdir="${EPREFIX}"/etc \
+               -prefix="$EPREFIX/usr" \
+               -confdir="$EPREFIX/etc" \
                +sgid +fhs \
                +lang ${mylang} \
                || die "configure failed"
+
+       cat >makewhatis.cron <<EOF
+#!/bin/sh
+
+exec nice $EPREFIX/usr/sbin/makewhatis -u
+EOF
 }
 
 src_install() {
@@ -109,7 +115,7 @@ src_install() {
 
        # makewhatis only adds man-pages from the last 24hrs
        exeinto /etc/cron.daily
-       newexe "${FILESDIR}"/makewhatis.cron makewhatis
+       newexe makewhatis.cron makewhatis
 
        keepdir /var/cache/man
        [[ -z ${EPREFIX} ]] && diropts -m0775 -g man
@@ -128,19 +134,6 @@ pkg_postinst() {
 
        echo
 
-       local f files=$(ls "${ROOT}"/etc/cron.{daily,weekly}/makewhatis{,.cron} 2>/dev/null)
-       for f in ${files} ; do
-               [[ ${f} == */etc/cron.daily/makewhatis ]] && continue
-               [[ $(md5sum "${f}") == "8b2016cc778ed4e2570b912c0f420266 "* ]] \
-                       && rm -f "${f}"
-       done
-       files=$(ls "${ROOT}"etc/cron.{daily,weekly}/makewhatis{,.cron} 2>/dev/null)
-       if [[ ${files/$'\n'} != ${files} ]] ; then
-               ewarn "You have multiple makewhatis cron files installed."
-               ewarn "You might want to delete all but one of these:"
-               ewarn ${files}
-       fi
-
        if has_version app-doc/heirloom-doctools; then
                ewarn "Please note that the /etc/man.conf file installed will not"
                ewarn "work with heirloom's nroff by default (yet)."