On Fri, Aug 06, 2004, Alexander Belck wrote:
> So how should I make ISPman use the OpenPKG perl ? ISPman has about
> 100 perl scripts, constantly updating over cvs, and all start with:
> 
> #!/usr/bin/perl
> 
> Can you suggest me what to do ?
> 
Substitute the path in the shebang line. Try

$ shtool subst -e 's;^#!/usr/bin/perl;#!/opkg/bin/perl;' *.pl

If you constantly update from CVS you better undo this change before the
update and redo afterwards to avoid conflicts. Usually this shouldn't be
a big problem because software should be *installed* before use and most
"make install" procedures allow you to set the prefix.

> Also, Ralf Engelschall replied to my environment saying thats OK just
> to run a OpenPKG binary giving the full path, so coult I just use
> #!/opkg/bin/perl ?
> 
Yes. I already mentioned remaining risks in this thread and practice
will tell you whether additional tweaking is needed.

> I realy don't understant what is all done by /opkg/etc/rc --eval all
> env. I see that the PATH, LD_LIBRARY_PATH, MANPATH and INFOPATH are
> prepend with /opkg_paths, but don't know if other things are changed.
> 
It defines useful (MAN ...) and sometimes required (PATH ...) variables
and functions for OpenPKG operation. They come from the %common and %env
sections in $PREFIX/etc/rc.d/*.rc and from the $PREFIX/etc/rc.conf file.
You can print and learn using

$ /usr/opkg/etc/rc --print all env

> > I do not recommend replacing such a critical part of the OS [...]
> 
> For what can I use OpenPKG perl ? Only for scripts written by me ? And
> when OpenPKG upgrades perl-5.8.5 I still can get the same problem you
> did.
> 
It is useful for all scripts using the OpenPKG perl interpreter. And
yes, the next upgrade might catch you. The beauty of OpenPKG is that
neither a OS upgrade will break your OpenPKG environment nor will an
OpenPKG upgrade break your OS. They are separate entities.

> When I get a project that's written in perl I mostly see as
> requirement something like perl >= 5.6 or perl >= 5.8 not thinks like:
> perl= perl-5.8.3_from_RH_9.0. This would restrict project usage too
> much.
> 
Experience prooved that "require 5.003" is a check too weak for the real
world.

--
[EMAIL PROTECTED], Cable & Wireless
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
User Communication List                      [EMAIL PROTECTED]

Reply via email to