pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/plist Info pages don't always end in ".info" as not...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d2e6ab349a01
branches:  trunk
changeset: 507740:d2e6ab349a01
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Tue Feb 07 19:18:42 2006 +0000

description:
Info pages don't always end in ".info" as noted in PR pkg/32699.  Fix the
PLIST handling based on the suggestion in the PR by Johan Danielsson.
This restores the behavior from the old PLIST code.

diffstat:

 mk/plist/plist-info.awk |  17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diffs (44 lines):

diff -r eb668814887d -r d2e6ab349a01 mk/plist/plist-info.awk
--- a/mk/plist/plist-info.awk   Tue Feb 07 19:11:32 2006 +0000
+++ b/mk/plist/plist-info.awk   Tue Feb 07 19:18:42 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: plist-info.awk,v 1.4 2006/02/07 18:42:38 jlam Exp $
+# $NetBSD: plist-info.awk,v 1.5 2006/02/07 19:18:42 jlam Exp $
 #
 # Copyright (c) 2006 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -62,10 +62,10 @@
 }
 
 ###
-### Ignore *.info-1, *.info-2, etc. files in the PLIST as we get the
-### list of installed *.info-[0-9]* files below.
+### Ignore *-1, *-2, etc. files in the PLIST as we get the list of
+### installed split files below.
 ###
-/^[^@]/ && /^info\/[^\/]*\.info-[0-9]+(\.gz)?$/ {
+/^[^@]/ && /^info\/[^\/]*(\.info)?-[0-9]+(\.gz)?$/ {
        next
 }
 
@@ -73,13 +73,18 @@
 ### For each info page entry, print all of the installed info sub-pages
 ### associated with that entry.
 ###
-/^[^@]/ && /^info\/[^\/]*\.info(\.gz)?$/ {
+/^[^@]/ && /^info\/[^\/]*(\.info)?(\.gz)?$/ {
        sub("^info/", INFO_DIR "/")
        cmd = TEST " -f " PREFIX "/" $0
        if (system(cmd) == 0) {
                sub("\\.gz$", "")
-               cmd = "cd " PREFIX " && " LS " -1 " $0 "*"
+               base = $0
+               cmd = "cd " PREFIX " && " LS " -1 " base "*"
                while (cmd | getline) {
+                       # Filter out unrelated info files
+                       if ($0 !~ "^" base "(-[0-9]+)?(\.gz)?$") {
+                               continue
+                       }
                        #if ((MANZ ~ /[yY][eE][sS]/) && ($0 !~ /\.gz$/)) {
                        #       $0 = $0 ".gz"
                        #} else if ((MANZ !~ /[yY][eE][sS]/) && ($0 ~ /\.gz$/)) {



Home | Main Index | Thread Index | Old Index