man-db: re-release version 2.9.3 (backgrounding via cygstart)
authorAchim Gratz <Achim.Gratz@Stromeko.DE>
Thu, 7 Jan 2021 20:03:09 +0000 (21:03 +0100)
committerAchim Gratz <Achim.Gratz@Stromeko.DE>
Thu, 7 Jan 2021 20:03:09 +0000 (21:03 +0100)
man-db.cygport

index 0f920303af8af37401b36e2a1d3529409f2387e3..2f507b58f3ae971f8ec555a3631d7fc802358d27 100644 (file)
@@ -2,7 +2,7 @@
 BUILD_REQUIRES=" flex groff libgdbm-devel libiconv-devel libpipeline-devel lzip po4a zstd"
 NAME="man-db"
 VERSION="2.9.3"
-RELEASE="3"
+RELEASE="4"
 CATEGORY="Base"
 SUMMARY="Man page viewer"
 DESCRIPTION="man-db is an implementation of the standard Unix documentation
@@ -69,19 +69,20 @@ src_install() {
        dodir /etc/postinstall
        cat > ${D}/etc/postinstall/zp_${PN}-update-index.dash <<"_EOF"
 if [ -f /var/cache/man/index.db ] ; then
-    of=/var/log/mandb-index.log
-    tf=$(/usr/bin/mktemp -p /var/log mandb-index-XXXXXXXX.log)
-    exec 3> $tf
-    /usr/bin/mv --backup=simple $tf $of
-    if [ -f /var/cache/man/.index-synchronously ] ; then
-       printf "  ManDB index update starting...\n"
-       /usr/bin/mandb < /dev/null >&3 2>&1
-       printf "  ... ManDB index update complete.\n"
+    if [ -f /var/cache/man/.index-synchronously ] || [ "$1" = "background" ] ; then
+        printf "  ManDB index update starting...\n"
+        tf=$(/usr/bin/mktemp -p /var/log mandb-index-XXXXXXXX.log)
+        exec 3> $tf
+        /usr/bin/mv --backup=simple $tf /var/log/mandb-index.log
+        printf "ManDB update started: $(/usr/bin/date -Iseconds)\n" >&3 
+        /usr/bin/mandb <&- >&3 2>&1
+        printf "ManDB update finished: $(/usr/bin/date -Iseconds)\n" >&3 
+       exec  3>&-
+        printf "  ... ManDB index update complete.\n"
     else
-       printf "  ManDB index update commencing in background...\n"
-       exec /usr/bin/nohup /usr/bin/mandb < /dev/null >&3 2>&1 &
+        printf "  ManDB index update commencing in background...\n"
+        /usr/bin/cygstart --hide /usr/bin/dash $0 background
     fi
-    exec 3&>-
 else
     printf "  ManDB index not available.\n"
 fi
This page took 0.032254 seconds and 5 git commands to generate.