From: Spider Boardman Date: Mon, 24 Feb 1997 14:12:11 +0000 (-0500) Subject: installperl breaks running system (for a while) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ec2a3d87ba26a9586ad981051a949403027c147a;p=p5sagit%2Fp5-mst-13.2.git installperl breaks running system (for a while) "installperl" causes scripts with "/usr/bin/perl" or equivalent to fail during the process of installation, which can take a while with slow disks and/or slow CPUs. It should install the libraries and such *before* linking "$installbin/perl" to the version-dependent executable. p5p-msgid: <199702241412.JAA11829@Orb.Nashua.NH.US> --- diff --git a/installperl b/installperl index aaa6773..1267f49 100755 --- a/installperl +++ b/installperl @@ -90,59 +90,6 @@ if ($d_dosuid) { &chmod(04711, "$installbin/sperl$ver$exe_ext"); } -# Make links to ordinary names if installbin directory isn't current directory. - -if (! $versiononly && ! &samepath($installbin, '.')) { - &safe_unlink("$installbin/perl$exe_ext", "$installbin/suidperl$exe_ext"); - &link("$installbin/perl$ver$exe_ext", "$installbin/perl$exe_ext"); - &link("$installbin/sperl$ver$exe_ext", "$installbin/suidperl$exe_ext") - if $d_dosuid; -} - -if (!$versiononly && ! &samepath($installbin, 'x2p')) { - &safe_unlink("$installbin/a2p$exe_ext"); - &cmd("cp x2p/a2p$exe_ext $installbin/a2p$exe_ext"); - &chmod(0755, "$installbin/a2p$exe_ext"); -} - -# cppstdin is just a script, but it is architecture-dependent, so -# it can't safely be shared. Place it in $installbin. -# Note that Configure doesn't build cppstin if it isn't needed, so -# we skip this if cppstdin doesn't exist. -if (! $versiononly && (-f cppstdin) && (! &samepath($installbin, '.'))) { - &safe_unlink("$installbin/cppstdin"); - &cmd("cp cppstdin $installbin/cppstdin"); - &chmod(0755, "$installbin/cppstdin"); -} - -# Install scripts. - -mkpath($installscript, 1, 0777); - -if (! $versiononly) { - for (@scripts) { - &cmd("cp $_ $installscript"); - s#.*/##; &chmod(0755, "$installscript/$_"); - } -} - -# pstruct should be a link to c2ph - -if (! $versiononly) { - &safe_unlink("$installscript/pstruct"); - &link("$installscript/c2ph","$installscript/pstruct"); -} - -# Install pod pages. Where? I guess in $installprivlib/pod. - -if (! $versiononly && !($installprivlib =~ m/\Q$]/)) { - mkpath("${installprivlib}/pod", 1, 0777); - foreach $file (@pods) { - # $file is a name like pod/perl.pod - cp_if_diff($file, "${installprivlib}/${file}"); - } -} - # Install library files. $do_installarchlib = $do_installprivlib = 0; @@ -216,6 +163,59 @@ if (!$versiononly && !$nonono && -t STDIN && -t STDERR } } +# Make links to ordinary names if installbin directory isn't current directory. + +if (! $versiononly && ! &samepath($installbin, '.')) { + &safe_unlink("$installbin/perl$exe_ext", "$installbin/suidperl$exe_ext"); + &link("$installbin/perl$ver$exe_ext", "$installbin/perl$exe_ext"); + &link("$installbin/sperl$ver$exe_ext", "$installbin/suidperl$exe_ext") + if $d_dosuid; +} + +if (!$versiononly && ! &samepath($installbin, 'x2p')) { + &safe_unlink("$installbin/a2p$exe_ext"); + &cmd("cp x2p/a2p$exe_ext $installbin/a2p$exe_ext"); + &chmod(0755, "$installbin/a2p$exe_ext"); +} + +# cppstdin is just a script, but it is architecture-dependent, so +# it can't safely be shared. Place it in $installbin. +# Note that Configure doesn't build cppstin if it isn't needed, so +# we skip this if cppstdin doesn't exist. +if (! $versiononly && (-f cppstdin) && (! &samepath($installbin, '.'))) { + &safe_unlink("$installbin/cppstdin"); + &cmd("cp cppstdin $installbin/cppstdin"); + &chmod(0755, "$installbin/cppstdin"); +} + +# Install scripts. + +mkpath($installscript, 1, 0777); + +if (! $versiononly) { + for (@scripts) { + &cmd("cp $_ $installscript"); + s#.*/##; &chmod(0755, "$installscript/$_"); + } +} + +# pstruct should be a link to c2ph + +if (! $versiononly) { + &safe_unlink("$installscript/pstruct"); + &link("$installscript/c2ph","$installscript/pstruct"); +} + +# Install pod pages. Where? I guess in $installprivlib/pod. + +if (! $versiononly && !($installprivlib =~ m/\Q$]/)) { + mkpath("${installprivlib}/pod", 1, 0777); + foreach $file (@pods) { + # $file is a name like pod/perl.pod + cp_if_diff($file, "${installprivlib}/${file}"); + } +} + # Check to make sure there aren't other perls around in installer's # path. This is probably UNIX-specific. Check all absolute directories # in the path except for where public executables are supposed to live. @@ -230,9 +230,9 @@ if (!$versiononly) { @otherperls = (); for (@path) { next unless m,^/,; - next if ($_ eq $binexp); # Use &samepath here because some systems have other dirs linked # to $mainperldir (like SunOS) + next if &samepath($_, $binexp); next if ($mainperl_is_instperl && &samepath($_, $mainperldir)); push(@otherperls, "$_/perl$exe_ext") if (-x "$_/perl$exe_ext" && ! -d "$_/perl$exe_ext");