summaryrefslogtreecommitdiff
path: root/mk/plist/plist-info.awk
diff options
context:
space:
mode:
authorjlam <jlam>2006-02-07 19:18:42 +0000
committerjlam <jlam>2006-02-07 19:18:42 +0000
commitf92eef5ad5b6f7e7bd1ae54ab2913828861b04e3 (patch)
treed8f1fe6bbda4d701edaa5b1f68e3e7418355f197 /mk/plist/plist-info.awk
parent4850a478b30ab600f4f55ae50f7326684f7a8eeb (diff)
downloadpkgsrc-f92eef5ad5b6f7e7bd1ae54ab2913828861b04e3.tar.gz
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 (limited to 'mk/plist/plist-info.awk')
-rw-r--r--mk/plist/plist-info.awk17
1 files changed, 11 insertions, 6 deletions
diff --git a/mk/plist/plist-info.awk b/mk/plist/plist-info.awk
index 4cb2baae46d..d345fe7d27f 100644
--- a/mk/plist/plist-info.awk
+++ b/mk/plist/plist-info.awk
@@ -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 @@ BEGIN {
}
###
-### 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 @@ BEGIN {
### 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$/)) {