Subject: Re: info file handling
To: None <wiz@NetBSD.org>
From: OBATA Akio <obata@lins.jp>
List: tech-pkg
Date: 12/28/2006 15:49:51
On Thu, 28 Dec 2006 03:50:33 +0100, Thomas Klausner wrote:
> On Wed, Dec 27, 2006 at 04:38:55PM +0900, OBATA Akio wrote:
> > I'm updating print/lilypond, and have info file handling problem.
> > It use $INFO_DIR, is it obsolete?
>
> I found, in pkginstall/bsd.pkginstall.mk:
> # INFO_DIR, if defined, specifies the directory path containing the "dir"
> # index file that should be updated. If the pathname is relative,
> # then it is taken to be relative to ${PREFIX}. This shouldn't
> # be needed unless "dir" is not in the same directory as the
> # installed info files.
In defaults/mk.conf:
PKGINFODIR?= info
# Pathname relative to ${PREFIX} of directory holding the
# info files and the info "dir" (index) file.
# Possible: any path you like, e.g. share/info.
# Default: info (i.e. /usr/pkg/info)
# NOTE: the support for custom setting (not "info") is not complete.
#
# XXX INFO_DIR is obsolete and should be removed after pkgsrc-2006Q1.
BTW...
In pkginstall/info-files:
# Lines starting with "# INFO: " are data read by this script that
# name the info files and directory containing the "dir" index that will
# that will be updated. If the directory is not specified, then the
# "dir" index is assumed to be in the same directory as the info file.
#
# # INFO: /usr/pkg/info/bar.info /usr/pkg/info
# # INFO: /usr/pkg/info/baz.info /usr/pkg/info
#
# For each INFO entry, if the path is relative, that it is taken to be
# relative to ${PKG_PREFIX}.
May I apply following patch?
Index: mk/pkginstall/info-files
===================================================================
RCS file: /cvsroot/pkgsrc/mk/pkginstall/info-files,v
retrieving revision 1.2
diff -u -r1.2 info-files
--- mk/pkginstall/info-files 19 Jul 2006 22:26:26 -0000 1.2
+++ mk/pkginstall/info-files 28 Dec 2006 06:46:09 -0000
@@ -70,7 +70,10 @@
;;
esac
- ${TEST} -n "$infodir" || infodir="${file%/*}"
+ case $infodir in
+ "") infodir="${file%/*}" ;;
+ [!/]*) infodir="${PKG_PREFIX}/$infodir" ;;
+ esac
infoindex="$infodir/dir"
nentries="`${GREP} -c '^\*' $infoindex 2>/dev/null`"
case "$nentries" in
@@ -109,7 +112,10 @@
;;
esac
- ${TEST} -n "$infodir" || infodir="${file%/*}"
+ case $infodir in
+ "") infodir="${file%/*}" ;;
+ [!/]*) infodir="${PKG_PREFIX}/$infodir" ;;
+ esac
infoindex="$infodir/dir"
${ECHO} " $file"
${INSTALL_INFO} --info-dir="$infodir" --delete $file >/dev/null 2>&1
--
"Of course I love NetBSD":-)
OBATA Akio / obata@lins.jp