From martyn@inpharmatica.co.uk  Sat Apr 26 00:17:42 2003
Return-Path: <martyn@inpharmatica.co.uk>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 16B0137B401
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 26 Apr 2003 00:17:42 -0700 (PDT)
Received: from parmenides.zen.co.uk (parmenides.zen.co.uk [212.23.8.69])
	by mx1.FreeBSD.org (Postfix) with SMTP id 43A8F43FBF
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 26 Apr 2003 00:17:38 -0700 (PDT)
	(envelope-from martyn@inpharmatica.co.uk)
Received: (qmail 19630 invoked from network); 26 Apr 2003 07:17:36 -0000
Received: from protagoras.zen.co.uk (212.23.8.61)
  by parmenides.zen.co.uk with QMQP; 26 Apr 2003 07:17:36 -0000
Received: from dsl-217-155-79-129.zen.co.uk (HELO chrome.ninja.co.uk) (217.155.79.129)
  by protagoras.zen.co.uk with SMTP; 26 Apr 2003 07:17:36 -0000
Received: from martyn by chrome.ninja.co.uk with local (Exim 4.14 #1 (Debian))
	id 199JxB-0006bq-55
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 26 Apr 2003 07:18:33 +0000
Message-Id: <E199JxB-0006bq-55@chrome.ninja.co.uk>
Date: Sat, 26 Apr 2003 07:18:33 +0000
From: Martyn J.Pearce <fluffy@sixears.com>
Sender: User Martyn <martyn@inpharmatica.co.uk>
Reply-To: Martyn J.Pearce <fluffy@sixears.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] scrollkeeper will not build if /usr/local/share is symlinked
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         51429
>Category:       ports
>Synopsis:       [PATCH] scrollkeeper will not build if /usr/local/share is symlinked
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 26 00:20:15 PDT 2003
>Closed-Date:    Sat Apr 26 00:31:05 PDT 2003
>Last-Modified:  Mon Apr 28 21:00:20 PDT 2003
>Originator:     Martyn J. Pearce <fluffy@sixears.com>
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
None
>Environment:
System: FreeBSD chrome.ninja.co.uk 4.7-STABLE FreeBSD 4.7-STABLE #4: Mon Feb 10 20:15:19 GMT 2003 martyn@chrome.ninja.co.uk:/usr/obj/usr/src/sys/CHROME i386

All required packages are installed
/usr/local/share is a symlink, because due to disk space issues, it is stored
on a distinct filesystem from /usr/local
>Description:
On my box, scrollkeeper refuses to build, as it cannot find docbookx.dtd, etc.

I note that in the second chunk of the patch, two finds are run, the first 
appears to be redundant.  I have left this, since it's not causing a problem 
right now, but is it cruft?
>How-To-Repeat:
Attempt to install scrollkeeper with the above config.  Any of portupgrade down
to make install will fail
>Fix:
The patch adds -follow to the relevant find commands.

--- pkg_install.diff begins here ---
--- pkg-install	Sat Apr 26 07:06:13 2003
+++ pkg-install.orig	Sat Apr 26 07:03:10 2003
@@ -32,7 +32,7 @@
 #
 # find the prefix for DocBook DTD
 #
-found=`find ${PREFIX}/ -follow -name docbookx.dtd 2> /dev/null`
+found=`find ${PREFIX}/ -name docbookx.dtd 2> /dev/null`
 if [ "$found" = "" ] ; then
     echo could not locate docbookx.dtd for DocBook XML
     exit 1
@@ -103,8 +103,8 @@
 # find the prefix for ISO DocBook entities
 #
 top=`dirname $docbookdir`
-found=`find $top -follow -iname "iso*amsb.ent" 2> /dev/null`
-found=`find ${PREFIX}/ -follow -iname "iso*amsb.ent" 2> /dev/null`
+found=`find $top -iname "iso*amsb.ent" 2> /dev/null`
+found=`find ${PREFIX}/ -iname "iso*amsb.ent" 2> /dev/null`
 if [ "$found" = "" ] ; then
     echo could not locate iso-amsb.ent of ISO DocBook entities
     exit 1
@@ -193,7 +193,7 @@
 #
 top=`dirname $docbookdir`
 found=`find $top -name chunk.xsl 2> /dev/null`
-found=`find ${PREFIX}/ -follow -name chunk.xsl 2> /dev/null`
+found=`find ${PREFIX}/ -name chunk.xsl 2> /dev/null`
 if [ "$found" = "" ] ; then
     echo could not locate chunk-common.xsl of DocBook XSLT stylesheets
     exit 1
--- pkg_install.diff ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: marcus 
State-Changed-When: Sat Apr 26 00:30:02 PDT 2003 
State-Changed-Why:  
Committed, thanks!  In the future, though, when doing a diff it's: 

diff -u <orig file> <new file> 

Your diff effectively backed out the changes you wanted to make. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=51429 

From: FUJISHIMA Satsuki <sf@FreeBSD.org>
To: "Martyn J.Pearce" <fluffy@sixears.com>,
	Joe Marcus Clarke <marcus@FreeBSD.org>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: ports/51429: [PATCH] scrollkeeper will not build if	/usr/local/share is symlinked
Date: Tue, 29 Apr 2003 09:44:57 +0900

 Is there a problem if these find commands traverse ${PREFIX}/share/
 rather than ${PREFIX}/ ? docbookx.dtd, iso*amsb.ent and chunk.xsl are
 installed under share/ in FreeBSD world.
 
 Imagine if you have /usr/local/etc/cvsup/prefixes/ made by
 net/cvsup-mirror port. There are symlinks to /home/ncvs under
 prefixes/. Because of that, pkg-install of scrollkeeper needlessly
 traverses /home/ncvs tree entirely three times. Imagine if you have
 some other *BSD and XF* CVS tree. :-)
 
 And, I think some of ${PREFIX}'s in pkg-install which refer to the
 files installed by other ports should be ${LOCALBASE}, but this is a
 separate issue.
 
 -- 
 FUJISHIMA Satsuki

From: Joe Marcus Clarke <marcus@FreeBSD.org>
To: FUJISHIMA Satsuki <sf@FreeBSD.org>
Cc: "Martyn J.Pearce" <fluffy@sixears.com>,
	FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: ports/51429: [PATCH] scrollkeeper will not build
	if	/usr/local/share is symlinked
Date: 28 Apr 2003 20:47:56 -0400

 --=-mrnycXVPP3Lm9Cqqna5G
 Content-Type: text/plain
 Content-Transfer-Encoding: quoted-printable
 
 On Mon, 2003-04-28 at 20:44, FUJISHIMA Satsuki wrote:
 > Is there a problem if these find commands traverse ${PREFIX}/share/
 > rather than ${PREFIX}/ ? docbookx.dtd, iso*amsb.ent and chunk.xsl are
 > installed under share/ in FreeBSD world.
 >=20
 > Imagine if you have /usr/local/etc/cvsup/prefixes/ made by
 > net/cvsup-mirror port. There are symlinks to /home/ncvs under
 > prefixes/. Because of that, pkg-install of scrollkeeper needlessly
 > traverses /home/ncvs tree entirely three times. Imagine if you have
 > some other *BSD and XF* CVS tree. :-)
 
 Good call.  I'll fix that.
 
 >=20
 > And, I think some of ${PREFIX}'s in pkg-install which refer to the
 > files installed by other ports should be ${LOCALBASE}, but this is a
 > separate issue.
 
 If you look at what ${PREFIX} actually is in the script, you'll see it's
 really ${LOCALBASE}.  It uses libxml2 as a basis for where to look.
 
 Joe
 
 --=20
 Joe Marcus Clarke
 FreeBSD GNOME Team	::	marcus@FreeBSD.org
 http://www.FreeBSD.org/gnome
 
 --=-mrnycXVPP3Lm9Cqqna5G
 Content-Type: application/pgp-signature; name=signature.asc
 Content-Description: This is a digitally signed message part
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.1 (FreeBSD)
 
 iD8DBQA+rcu7b2iPiv4Uz4cRAj1zAJ0bhDS9jscG9OaM7UNXbJDPBuS+5wCcC/ik
 4+v0gkwQfeUSWVWAPPX7iaQ=
 =NNTc
 -----END PGP SIGNATURE-----
 
 --=-mrnycXVPP3Lm9Cqqna5G--
 

From: FUJISHIMA Satsuki <sf@FreeBSD.org>
To: Joe Marcus Clarke <marcus@FreeBSD.org>
Cc: "Martyn J.Pearce" <fluffy@sixears.com>,
	FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: ports/51429: [PATCH] scrollkeeper will not build	if	/usr/local/share is symlinked
Date: Tue, 29 Apr 2003 12:58:46 +0900

 At 28 Apr 2003 20:47:56 -0400,
 Joe Marcus Clarke wrote:
 > Good call.  I'll fix that.
 
 Good news. Thanks.
 
 > If you look at what ${PREFIX} actually is in the script, you'll see it's
 > really ${LOCALBASE}.  It uses libxml2 as a basis for where to look.
 
 You are correct. I've misread that. Sorry for false alert.
 
 -- 
 FUJISHIMA Satsuki
>Unformatted:
