Geoffrey Young wrote:

Stas Bekman wrote:

Stas Bekman wrote:


I'm not quite sure I understand why I can't install mp2 if mp1 is
installed? I thought the whole deal was about making it possible to
have both, no?


sorry, that was a false alarm.

I've nuked Apache2/ but Apache2.pm was still there. So the detection
code got all confused. May be it needs to be improved to just die if it
finds Apache2.pm, which is no longer in mp2?


yeah, it was in my mind to do something like that originally, but every time
I started to code it in I either got distracted or my mind started racing
with alternative scenarios that wouldn't be caught.

anyway, I think what we have is decent but clearly could be better.  if you
have the inclination anything you want to do with it is fine.  my thought is
that we should refuse to install if either Apache2.pm is found or
mod_perl.pm > 1.99 is found.

How about this patch:

Index: Makefile.PL
===================================================================
--- Makefile.PL (revision 164840)
+++ Makefile.PL (working copy)
@@ -9,7 +9,7 @@
 use constant MIN_HTTPD_VERSION_DYNAMIC => '2.0.47';
 use constant MIN_HTTPD_VERSION_STATIC  => '2.0.51';

-my($old_modperl_version, $old_modperl_pm);
+my($old_modperl_version, $old_modperl_pm, $old_Apache2_pm);

 BEGIN {
     eval {
@@ -18,6 +18,7 @@
         if ($mod_perl::VERSION < 1.999_22 && $old_mp2) {
             $old_modperl_version = $mod_perl::VERSION;
             $old_modperl_pm = delete $INC{'mod_perl.pm'};
+            $old_Apache2_pm = delete $INC{'Apache2.pm'};
         }
     };
 }
@@ -142,10 +143,24 @@
                 "no collision)\n";
         }
         else {
+            my @files = ();
+            my @dirs = ();
+            push @files, $old_Apache2_pm if $old_Apache2_pm;
+            push @dirs, $path if $path =~ /Apache2/;
+
+            my $note = '';
+            if (@files || @dirs) {
+                $note  = "Problematic\n";
+                $note .= "files: @files\n" if @files;
+                $note .= "dirs: @dirs\n"   if @dirs;
+            }
+
             print " not ok\n\n";
             print <<EOI;
 Cannot install mod_perl/$VERSION on top of $vstring
 due to a major API change between mod_perl 1.999_21 and 1.999_22.
+
+$note
 Please nuke the prior mod_perl installation from your site_lib,
 use a different perl to run the installation process, or use the
 PREFIX option when creating your Makefile.  see





With pristine 1.999_21 install we now get:

    Cannot install mod_perl/1.999.23-dev on top of mod_perl/1.999_001
    due to a major API change between mod_perl 1.999_21 and 1.999_22.

Problematic
files: /home/stas/perl/5.8.7-ithread/lib/site_perl/5.8.6/Apache2.pm
dirs: /home/stas/perl/5.8.7-ithread/lib/site_perl/5.8.6/Apache2/mod_perl.pm


    Please nuke the prior mod_perl installation from your site_lib,
    use a different perl to run the installation process, or use the
    PREFIX option when creating your Makefile.  see

With semi-nuked 1.999_21 install (Apache2/ and everything under it is
gone, but Apache2.pm is still there). now the error will be:


Cannot install mod_perl/1.999.23-dev on top of mod_perl/1.29_01 due to a major API change between mod_perl 1.999_21 and 1.999_22.

    Problematic
    files: /home/stas/perl/5.8.7-ithread/lib/site_perl/5.8.6/Apache2.pm

    Please nuke the prior mod_perl installation from your site_lib,
    use a different perl to run the installation process, or use the
    PREFIX option when creating your Makefile.  see

In any case I find it an improvement, since it tells the user exactly which dirs, files need to be nuked.

--
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to