Subject: Re: problems with name dependencies in a package
To: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
From: Jon Buller <jon@bullers.net>
List: tech-pkg
Date: 02/14/2002 09:33:13
In message <Pine.GSO.4.21.0202141739380.5246-100000@rfhpc8317>, Hubert Feyrer w
rites:
> On Thu, 14 Feb 2002, Jon Buller wrote:
> > ${LN} -s ${PREFIX}/bin/${PROGRAM_PREFIX}patch ${PREFIX}/libexec/arch/arch/p
> atch
> >
> > Is that the right thing to do?
>
> Probably not as I expect you need to change all the scripts to find that
> "patch" binary. You could DTRT in the first place then.
Actually, all the arch commands are called through one script which
can set the path as needed. Imagine if cvs was a wrapper script
that fudged args and then exec'd update, commit, checkout, etc.
What I did to get it to work was create a ~/.arch-bin directory
with a single link patch->/usr/pkg/bin/gpatch and had that at the
front of the path arch sets for all its commands. libexec/arch/arch
is where all those subcommands are, so it is already on the path.
I have thought about trying to DTRT, but there are about a million
places the word patch appears in all the shell scripts, variables,
portions of other command names, comments, etc. I tried to find
the magic few I need, but it is beyond me. (Short of writing a
complete regression test and removing all patch binaries from the
system, and fixing the breakage.)
Yes, it's an ugly hack, but I don't see a feasable way around it.
Actually, I think to DTRT we probably need to fix patch, but I'm
not sure what arch expects different than ours. Something about
the exit values I think. Then again, perhaps GNU broke it, and we
don't want to include the breakage in ours. I haven't looked at
or used either enough to tell.
> > I'm worried a little that ${PREFIX}
> > might have changed between the install of patch and the install of
> > arch.
>
> If anything, you want to use LOCALBASE (or X11BASE) to get to other
> packages - PREFIX is strictly for *this* page (being installed/built right
> now). That aside, we do not support changing LOCALBASE/X11BASE.
Ah, I wasn't sure about that distinction. I'll change it to
${LOCALBASE}/bin/... -> ${PREFIX}/libexec/...
> > Also, is ${PROGRAM_PREFIX} the right way to get the g in
> > gpatch?
>
> Probably not - if anything, it's active in the devel/patch pkg, but not in
> yours. I'd hardcode "gpatch".
That's what I was afraid of. (That, or someone changing it between
building patch and installing arch.)
Thanks for the suggestions. I think this will work, not as pretty
as it should be, but it should work OK.
Jon