Re: perl wrapper and PATH

2002-06-09 Thread Anton Berezin

On Sat, Jun 08, 2002 at 02:14:09PM -0400, Trish Lynch wrote:

 Anton, if you don;t get around to it this weekend, mind if I take a
 stab at it?

No, I don't mind at all.  If only we can agree who does what.  :-(

Cheers,
\Anton.
-- 
| Anton Berezin|  FreeBSD: The power to serve |
| catpipe Systems ApS   _ _ |_ |   http://www.FreeBSD.org |
| [EMAIL PROTECTED](_(_||  |[EMAIL PROTECTED] | 
| +45 7021 0050| Private: [EMAIL PROTECTED] |

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: perl wrapper and PATH

2002-06-09 Thread Doug Barton

Bill Fenner wrote:
 
 I know that the specific mergemaster issues have been addressed, but I
 thought this experience pointed out something subtly astonishing, so I
 figured I'd point it out.
 
 I ran mergemaster, and the perl wrapper started complaining that I
 needed to install perl, so I did pkg_add -r perl.  The port talked
 all about use.perl port or use.perl system, but I figured
 system was wrapper so I didn't bother running use.perl .  I tried
 perl -de 0, and voila, I had perl.  So I ran mergemaster again,
 and the wrapper started complaining again that I needed to install
 perl.
 
 Turns out that mergemaster sets a restrictive PATH, and the wrapper
 (apparently) looks for the real perl in the PATH.  This can be
 awfully confusing -- /usr/bin/perl works, but env PATH=/usr/bin perl
 doesn't work.

Actually in the case of the old mergemaster, I don't think even
/usr/bin/perl would have worked, since PATH would still exclude
/usr/local/bin, therefore the wrapper wouldn't have found it. 

 I ran use.perl port, and that gave me a working perl for mergemaster.
 Interestingly, use.perl system didn't give me back the perl wrapper;
 I'm not sure what I got.  Sigh.

I think I have a new version of use.perl that will handle this problem.
I'm fixin' to post the patch. 

Doug

-- 
   We have known freedom's price. We have shown freedom's power.
  And in this great conflict, ...  we will see freedom's victory.
- George W. Bush, President of the United States
  State of the Union, January 28, 2002

 Do YOU Yahoo!?

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: perl wrapper and PATH

2002-06-09 Thread Garance A Drosihn

At 12:48 PM +0200 6/9/02, Anton Berezin wrote:
On Sat, Jun 08, 2002 at 02:14:09PM -0400, Trish Lynch wrote:

   Anton, if you don;t get around to it this weekend, mind
   if I take a stab at it?

No, I don't mind at all.  If only we can agree who does what.  :-(

RPI has been running with something like the perl wrapper on our
systems for many years.  It can be very useful, if it's done
right.  My fear is that everyone is hoping for some quick fix
(something as quick as creating a symlink), and does not want
to really think about what we want from this wrapper.

I would argue we need to stop a minute and think of what we're
doing, why we're doing it, and what result we want.  We don't
have to paint a lot of bikesheds, but we should think it
through a bit more than we have so far.

We (developers) have decided to make the incompatible system
change of removing perl from the base system (a change that I
completely agree with).  This is an incompatible change, no
matter how much we try to lessen the disruption from it.  If
we want to make this incompatible change on relatively short
notice, then we must have a wrapper in /usr/bin/perl which
works exactly as /usr/bin/perl worked when it was part of the
base OS.

We do not want a solution that starts out users will just have
to edit all the perl scripts they've ever done, and change
That is not user-friendly.  We (developers) are making this
change, it is our responsibility to make it go smoothly.

The perl wrapper should not depend on the setting of PATH.  When
perl was part of the base OS, then what you got by specifying
/usr/bin/perl did not depend on the setting of PATH.  The new
wrapper should not.  We do not know all the environments that
all the user-written perl scripts will be running in.

I do completely agree that it would be very useful if whatever
we did for a wrapper did make it easier to have multiple
versions of perl available.  In fact, at RPI this is the *main*
reason we have a wrapper for perl (and for several other
interpretters).

I have thoughts on how that version-selection could work, but
that debate can wait.  The main point I want to make right
now is that the initial version of the wrapper should not
depend on PATH.  It should just work when the port is
installed, and work in all situations.  If 'use.perl port'
is required for the wrapper to work in all situations, then
the wrapper should say 'Run use.perl port' in addition to
saying 'pkg_add -r perl'.  I think it would be better if
the use.perl step was not required, although obviously that
script does need to be smarter in case someone does run it.

-- 
Garance Alistair Drosehn=   [EMAIL PROTECTED]
Senior Systems Programmer   or  [EMAIL PROTECTED]
Rensselaer Polytechnic Instituteor  [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: perl wrapper and PATH

2002-06-09 Thread Doug Barton

Garance A Drosihn wrote:
 
 At 12:48 PM +0200 6/9/02, Anton Berezin wrote:
 On Sat, Jun 08, 2002 at 02:14:09PM -0400, Trish Lynch wrote:
 
Anton, if you don;t get around to it this weekend, mind
if I take a stab at it?
 
 No, I don't mind at all.  If only we can agree who does what.  :-(
 
 RPI has been running with something like the perl wrapper on our
 systems for many years.  It can be very useful, if it's done
 right.  My fear is that everyone is hoping for some quick fix
 (something as quick as creating a symlink), and does not want
 to really think about what we want from this wrapper.

And yet, with the use.perl script installed as part of the port, we can
provide a solution that IS, as quick as creating a symlink. tobez and
I were discussing it some last night, and we have an idea for just
automatically doing the right thing for -current systems that have no
perl installed. 

I agree that for users who want perl, we should have a /usr/bin/perl
that just works. I also agree that more thought needs to go into what
form that takes. 

-- 
   We have known freedom's price. We have shown freedom's power.
  And in this great conflict, ...  we will see freedom's victory.
- George W. Bush, President of the United States
  State of the Union, January 28, 2002

 Do YOU Yahoo!?

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: perl wrapper and PATH

2002-06-08 Thread Szilveszter Adam

On Fri, Jun 07, 2002 at 11:26:18PM -0700, Bill Fenner wrote:
 I ran use.perl port, and that gave me a working perl for mergemaster.
 Interestingly, use.perl system didn't give me back the perl wrapper;
 I'm not sure what I got.  Sigh.

That script predates the removal of perl from the base system, and was
supposed to facilitate the switching between various perl versions. It
still has its justification of existence on -STABLE, but on -CURRENT, it
does not work well any more. What you got is likely links to nowhere,
your perl wrapper binary was clobbered.

Bottom line: if at all, it should only be used for use.perl port, for
the cases where the wrapper does not work as desired.

-- 
Regards:

Szilveszter ADAM
Szombathely Hungary

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: perl wrapper and PATH

2002-06-08 Thread John Hay

 On Fri, Jun 07, 2002 at 11:26:18PM -0700, Bill Fenner wrote:
  I ran use.perl port, and that gave me a working perl for mergemaster.
  Interestingly, use.perl system didn't give me back the perl wrapper;
  I'm not sure what I got.  Sigh.
 
 That script predates the removal of perl from the base system, and was
 supposed to facilitate the switching between various perl versions. It
 still has its justification of existence on -STABLE, but on -CURRENT, it
 does not work well any more. What you got is likely links to nowhere,
 your perl wrapper binary was clobbered.
 
 Bottom line: if at all, it should only be used for use.perl port, for
 the cases where the wrapper does not work as desired.

Or maybe we should get rid of the wrapper and change the perl port/package
to run use.perl port by default on current?

John
-- 
John Hay -- [EMAIL PROTECTED] / [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: perl wrapper and PATH

2002-06-08 Thread Trish Lynch

On Sat, 8 Jun 2002, John Hay wrote:

  On Fri, Jun 07, 2002 at 11:26:18PM -0700, Bill Fenner wrote:
   I ran use.perl port, and that gave me a working perl for mergemaster.
   Interestingly, use.perl system didn't give me back the perl wrapper;
   I'm not sure what I got.  Sigh.
 
  That script predates the removal of perl from the base system, and was
  supposed to facilitate the switching between various perl versions. It
  still has its justification of existence on -STABLE, but on -CURRENT, it
  does not work well any more. What you got is likely links to nowhere,
  your perl wrapper binary was clobbered.
 
  Bottom line: if at all, it should only be used for use.perl port, for
  the cases where the wrapper does not work as desired.

 Or maybe we should get rid of the wrapper and change the perl port/package
 to run use.perl port by default on current?

 John
 --
 John Hay -- [EMAIL PROTECTED] / [EMAIL PROTECTED]

 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with unsubscribe freebsd-current in the body of the message


The wrapper is there so that there are no suprises to people that
*expect* perl in the system.

What would possibly be a good idea is that the wrapper is there, but it
doesn;t actually redirect to the new perl. Then use.perl is run from the
port. The case for system should be removed or some way of relinking to
the wrapper instead should be provided?

The problem is that use.perl is needed on -STABLE systems, so... a
different behaviour when the OS version is =5 might be needed?

I Cc:ed this to the ports maintainer just in case... If they would like I
can fix use.perl to have a different behaviour on -current and thereafter,
but I don;t want to step on anybody's toes.

-Trish


--
Trish Lynch [EMAIL PROTECTED]
FreeBSD The Power to Serve
Ecartis Core Team   [EMAIL PROTECTED]
   http://www.freebsd.org



To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: perl wrapper and PATH

2002-06-08 Thread Anton Berezin

On Sat, Jun 08, 2002 at 09:48:05AM -0400, Trish Lynch wrote:

 The wrapper is there so that there are no suprises to people that
 *expect* perl in the system.

 What would possibly be a good idea is that the wrapper is there, but
 it doesn;t actually redirect to the new perl. Then use.perl is run
 from the port. The case for system should be removed or some way of
 relinking to the wrapper instead should be provided?

It sounds reasonable, but what's the point of having a wrapper at all
then?

 The problem is that use.perl is needed on -STABLE systems, so... a
 different behaviour when the OS version is =5 might be needed?

I don't like that but I am afraid it has to be done.

 I Cc:ed this to the ports maintainer just in case... If they would
 like I can fix use.perl to have a different behaviour on -current and
 thereafter, but I don;t want to step on anybody's toes.

Thanks, but I think I'll try to hack something up during weekend.

I am of the opinion that we don't need the wrapper and that use.perl can
easily do some symlink magic to solve all outstanding issues with perl
in -current.

Cheers,
\Anton.
-- 
| Anton Berezin|  FreeBSD: The power to serve |
| catpipe Systems ApS   _ _ |_ |   http://www.FreeBSD.org |
| [EMAIL PROTECTED](_(_||  |[EMAIL PROTECTED] | 
| +45 7021 0050| Private: [EMAIL PROTECTED] |

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: perl wrapper and PATH

2002-06-08 Thread David O'Brien

On Sat, Jun 08, 2002 at 05:07:39PM +0200, Anton Berezin wrote:
 It sounds reasonable, but what's the point of having a wrapper at all
 then?
 
One way or the other we need to have /usr/bin/perl exist and be usable.
Many have perl scripts in ~/bin that they expect to run on all modern
OS's -- which means they have /usr/bin/perl.

 I am of the opinion that we don't need the wrapper and that use.perl can
 easily do some symlink magic to solve all outstanding issues with perl
 in -current.

With the limitations in the exiting wrapper, either use.perl or using
mailwrapper is probably what we should do.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: perl wrapper and PATH

2002-06-08 Thread Trish Lynch

On Sat, 8 Jun 2002, David O'Brien wrote:

 On Sat, Jun 08, 2002 at 05:07:39PM +0200, Anton Berezin wrote:
  It sounds reasonable, but what's the point of having a wrapper at all
  then?

 One way or the other we need to have /usr/bin/perl exist and be usable.
 Many have perl scripts in ~/bin that they expect to run on all modern
 OS's -- which means they have /usr/bin/perl.


Exactly, the reason for the wrapper even if its not a wrapper, but a
placeholder, is to notify people that there has been a change, and you now
need to install the perl port for perl.

The optimum behaviour would be to use.perl port when its installed, and
if the port is removed, have the placeholder still in place. (a -current
version of use.perl system)

  I am of the opinion that we don't need the wrapper and that use.perl can
  easily do some symlink magic to solve all outstanding issues with perl
  in -current.

 With the limitations in the exiting wrapper, either use.perl or using
 mailwrapper is probably what we should do.


*nod*

Anton, if you don;t get around to it this weekend, mind if I take a stab
at it?

-Trish

--
Trish Lynch [EMAIL PROTECTED]
FreeBSD The Power to Serve
Ecartis Core Team   [EMAIL PROTECTED]
   http://www.freebsd.org



To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message