On 5/27/07, Bruce Dubbs <[EMAIL PROTECTED]> wrote:
> On 5/27/07, Dan Nicholson <[EMAIL PROTECTED]> wrote:
> > On 4/12/07, Fix <[EMAIL PROTECTED]> wrote:
> > > On 4/12/07, Dan Nicholson <[EMAIL PROTECTED]> wrote:
> > >
> > > > for dir in /opt{,/*}/lib/pkgconfig; do
> > > >     [ -d "$dir" ] || continue
> > > >     pathappend $dir PKG_CONFIG_PATH
> > > > done
> > > >
> > > > for dir in /opt{,/*}/bin; do
> > > >     [ -d "$dir" ] || continue
> > > >     pathappend $dir
> > > > done
> > > >
> > > > Does the above work for you?
> > >
> > > If it does work in the bash 3.x, it works for me. As far as I can see, it 
> > > does.
> >
> > Committed after 2.5 months!
>
> Actually, this doesn't work for me.  I have several versions of kde
> and qt in /opt.  I don't want all copies to be listed in either PATH
> or PKG_CONFIG_PATH.  I use sym links to choose which one I want.  Even
> with a single copy, this puts, for example, both /opt/qt-3.3.8/bin and
> /opt/qt/bin in the path.  They point to the same place.  This is not
> optimal.

I see. So, probably find or ls or something smarter about symlinks
will actually be needed.

> The reason for using symlinks in /opt is to be able to check things
> out and revert easily.  Using the above in this case could quite
> possibly have users accessing the wrong version of multiple version of
> packages in /opt.

How do you handle the multiple versions, though? If you have
/opt/qt-3.3.8 and /opt/qt-3.3.7 with /opt/qt -> qt-3.3.8, then `find
/opt/*/bin -type d' (what's in the book right now) will still add all
those paths and prepend them to PATH.

It might just be best to drop the globbing altogether and assume that
if you install something in /opt, then you will setup the appropriate
PATH, PKG_CONFIG_PATH, ld.so.conf, etc. In that case, we can just have
a single test for /opt/bin and /opt/lib/pkgconfig just like the
/usr/local cases.

> I know that I can/do fix things so they work for me, but a mention in
> the book would be appropriate.  I'd even comment out the above and
> place a comment with a warning that users could add the ablove only if
> they don't need to exclude any subdirectories of opt.

I agree. I don't think your setup is crazy at all and I think a lot of
people use it. I'd like to support that here as best as possible.

--
Dan
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to