Tom Mack <[EMAIL PROTECTED]> writes:
> I stupidly accepted the configure script's defaults which created an
> install that overwrote my standard "head" (as in accomplice to "tail"). I
> think a better warning should be given when installing a program that
> overwrites (or even just blocks the use of) such a common program.
>
> My system is Mac OS X 10.1, my head and tail programs were/are in /usr/bin
> which is where the new head, post, and get programs were put as well.
I just checked in the following patch to the Makefile.PL. It should
make the default be not to install on top of programs unrelated to
LWP. Can you check that it has the intended effect on MacOS?
Regards,
Gisle
Index: Makefile.PL
===================================================================
RCS file: /cvsroot/libwww-perl/lwp5/Makefile.PL,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -p -r1.63 -r1.64
--- Makefile.PL 3 Jan 2002 01:51:36 -0000 1.63
+++ Makefile.PL 29 May 2002 16:21:34 -0000 1.64
@@ -1,10 +1,10 @@
# This -*- perl -*- script writes the Makefile for libwww-perl
-# $Id: Makefile.PL,v 1.63 2002/01/03 01:51:36 gisle Exp $
+# $Id: Makefile.PL,v 1.64 2002/05/29 16:21:34 gisle Exp $
require 5.005;
use strict;
-use ExtUtils::MakeMaker;
-use Config;
+use ExtUtils::MakeMaker qw(WriteMakefile prompt);
+use Config qw(%Config);
#--- Configuration section ---
@@ -111,8 +111,21 @@ $Config{sitebin}.
EOT
@tmp = ();
- for (@request_aliases) {
- if (prompt("Do you want to install the $_ alias?", "y") =~ /^y/) {
+ for my $alias (@request_aliases) {
+ my $default = "y";
+ # check that we don't overwrite something unrelated with
+ # the current defaults.
+ if (open(PROG, "<$Config{sitebin}/$alias")) {
+ $default = "n";
+ while (<PROG>) {
+ if (/lwp-request/) {
+ $default = "y";
+ last;
+ }
+ }
+ close(PROG);
+ }
+ if (prompt("Do you want to install the $alias alias?", $default) =~ /^y/) {
push(@tmp, $_);
}
}