Front page | perl.perl5.porters |
Postings from March 2007
[perl #41657] [PATCH] 5.8.8 Add flag to disable incpush_oldversion
Thread Previous
From:
Robin Norwood
Date:
March 1, 2007 12:52
Subject:
[perl #41657] [PATCH] 5.8.8 Add flag to disable incpush_oldversion
Message ID:
rt-3.6.HEAD-2051-1172780110-15.41657-75-0@perl.org
# New Ticket Created by Robin Norwood
# Please include the string: [perl #41657]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41657 >
This is a bug report for perl from rnorwood@redhat.com,
generated with the help of perlbug 1.35 running under perl v5.8.8.
-----------------------------------------------------------------
[Please enter your report here]
This is a followup to the patch submitted by Tom Callaway - perl RT#41586.
This patch works with the 'incpush_oldversion' patch, providing a flag
to disable the inclusion of the paths found by incpush_oldversion.
--- perl-5.8.8/pod/perlrun.pod.-R-switch 2006-01-13 11:29:17.000000000 -0500
+++ perl-5.8.8/pod/perlrun.pod 2006-06-02 00:29:17.000000000 -0400
@@ -11,6 +11,7 @@
S<[ B<-I>I<dir> ] [ B<-m>[B<->]I<module> ] [ B<-M>[B<->]I<'module...'> ] [ B<-f> ]>
S<[ B<-C [I<number/list>] >]>
S<[ B<-P> ]>
+ S<[ B<-R> ]>
S<[ B<-S> ]>
S<[ B<-x>[I<dir>] ]>
S<[ B<-i>[I<extension>] ]>
@@ -813,6 +814,25 @@
before being searched for on the PATH. On Unix platforms, the
program will be searched for strictly on the PATH.
+=item B<-R>
+X<-R>
+
+Disables the module compatibility default search path.
+
+By default, this perl distribution will prepend to the default
+search path (@INC) the -V:archname subdirectory of each member of
+the -V:inc_version_list under the perl vendor and site installation
+directories.
+i.e. in shell notation:
+ {-V:vendorlib_stem,-V:sitelib_stem}/{-V:inc_version_list}/-V:archname
+where inc_version_list includes previous perl versions, to provide
+compatibility for binary modules installed under previous perl versions.
+This can be quite a long list of directories to search, which can slow
+down module loading. You can disable searching these previous perl
+version architecture specific directories by specifying the -R switch,
+then the default search path will be as for the previous perl releases.
+
+
=item B<-t>
X<-t>
--- perl-5.8.8/proto.h.-R-switch 2006-06-01 19:13:32.000000000 -0400
+++ perl-5.8.8/proto.h 2006-06-01 23:15:04.000000000 -0400
@@ -1620,7 +1620,7 @@
STATIC void S_init_ids(pTHX);
STATIC void S_init_lexer(pTHX);
STATIC void S_init_main_stash(pTHX);
-STATIC void S_init_perllib(pTHX);
+STATIC void S_init_perllib(pTHX,bool gr_i);
STATIC void S_init_postdump_symbols(pTHX_ int argc, char **argv, char **env);
STATIC void S_init_predump_symbols(pTHX);
STATIC void S_my_exit_jump(pTHX)
--- perl-5.8.8/embed.fnc.-R-switch 2006-06-01 19:13:32.000000000 -0400
+++ perl-5.8.8/embed.fnc 2006-06-01 23:21:25.000000000 -0400
@@ -1080,7 +1080,7 @@
s |void |init_ids
s |void |init_lexer
s |void |init_main_stash
-s |void |init_perllib
+s |void |init_perllib |bool greedy_incpush
s |void |init_postdump_symbols|int argc|NN char **argv|NULLOK char **env
s |void |init_predump_symbols
rs |void |my_exit_jump
--- perl-5.8.8/embed.h.-R-switch 2006-06-01 19:13:32.000000000 -0400
+++ perl-5.8.8/embed.h 2006-06-01 23:13:11.000000000 -0400
@@ -3170,7 +3170,7 @@
#define init_ids() S_init_ids(aTHX)
#define init_lexer() S_init_lexer(aTHX)
#define init_main_stash() S_init_main_stash(aTHX)
-#define init_perllib() S_init_perllib(aTHX)
+#define init_perllib(gr_i) S_init_perllib(aTHX,gr_i)
#define init_postdump_symbols(a,b,c) S_init_postdump_symbols(aTHX_ a,b,c)
#define init_predump_symbols() S_init_predump_symbols(aTHX)
#define my_exit_jump() S_my_exit_jump(aTHX)
--- perl-5.8.8/perl.c.-R-switch 2006-06-01 23:08:08.000000000 -0400
+++ perl-5.8.8/perl.c 2006-06-02 00:00:23.000000000 -0400
@@ -1649,6 +1649,7 @@
#ifdef USE_SITECUSTOMIZE
bool minus_f = FALSE;
#endif
+ bool greedy_incpush = TRUE;
PL_fdscript = -1;
PL_suidscript = -1;
@@ -1770,11 +1771,15 @@
PL_preprocess = TRUE;
s++;
goto reswitch;
+ case 'R':
+ greedy_incpush = FALSE;
+ s++;
+ goto reswitch;
case 'S':
forbid_setid("-S");
dosearch = TRUE;
s++;
- goto reswitch;
+ goto reswitch;
case 'V':
{
SV *opts_prog;
@@ -2062,7 +2067,7 @@
scriptname = "-";
}
- init_perllib();
+ init_perllib(greedy_incpush);
open_script(scriptname,dosearch,sv);
@@ -4736,7 +4741,7 @@
}
STATIC void
-S_init_perllib(pTHX)
+S_init_perllib(pTHX, bool greedy_incpush)
{
char *s;
if (!PL_tainting) {
@@ -4803,7 +4808,8 @@
* DLL-based path intuition to work correctly */
# if !defined(WIN32)
incpush(SITEARCH_EXP, FALSE, FALSE, TRUE);
- incpush_oldversion(aTHX_ SITEARCH_EXP);
+ if ( greedy_incpush )
+ incpush_oldversion(aTHX_ SITEARCH_EXP);
# endif
#endif
@@ -4825,7 +4831,8 @@
* DLL-based path intuition to work correctly */
# if !defined(WIN32)
incpush(PERL_VENDORARCH_EXP, FALSE, FALSE, TRUE);
- incpush_oldversion(aTHX_ PERL_VENDORARCH_EXP);
+ if ( greedy_incpush )
+ incpush_oldversion(aTHX_ PERL_VENDORARCH_EXP);
# endif
#endif
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=low
---
This perlbug was built using Perl v5.8.8 in the Red Hat build system.
It is being executed now by Perl v5.8.8 - Thu Feb 22 16:37:17 EST 2007.
Site configuration information for perl v5.8.8:
Configured by Red Hat, Inc. at Thu Feb 22 16:37:17 EST 2007.
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
Platform:
osname=linux, osvers=2.6.19-1.2895.fc6, archname=i386-linux-thread-multi
uname='linux solitude.devel.redhat.com 2.6.19-1.2895.fc6 #1 smp wed jan 10 19:28:18 est 2007 i686 i686 i386 gnulinux '
config_args='-des -Doptimize=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=generic -fasynchronous-unwind-tables -Dversion=5.8.8 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Dvendorprefix=/usr -Dsiteprefix=/usr -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl=n -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr -Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_sethostent_r_proto -Ud_endprotoent_r_proto -Ud_setprotoent_r_proto -Ud_endservent_r_proto -Ud_setservent_r_proto -Dinc_version_list=5.8.7 5.8.6 5.8.5 -Dscriptdir=/usr/bin'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
optimize='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=generic -fasynchronous-unwind-tables',
cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -I/usr/include/gdbm'
ccversion='', gccversion='4.1.1 20070105 (Red Hat 4.1.1-51)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
perllibs=-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=/lib/libc-2.5.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.5'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE'
cccdlflags='-fPIC', lddlflags='-shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=generic -fasynchronous-unwind-tables -L/usr/local/lib'
Locally applied patches:
---
@INC for perl v5.8.8:
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8
/usr/lib/perl5/site_perl/5.8.7
/usr/lib/perl5/site_perl/5.8.6
/usr/lib/perl5/site_perl/5.8.5
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8
/usr/lib/perl5/vendor_perl/5.8.7
/usr/lib/perl5/vendor_perl/5.8.6
/usr/lib/perl5/vendor_perl/5.8.5
/usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/5.8.8
.
---
Environment for perl v5.8.8:
HOME=/home/rnorwood
LANG=en_US.UTF-8
LANGUAGE (unset)
LD_LIBRARY_PATH=/opt/oracle/lib
LOGDIR (unset)
PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/rnorwood/bin::/sbin:/usr/sbin:/usr/local/sbin:/opt/bin:/home/rnorwood/bin::/sbin:/usr/sbin:/usr/local/sbin:/opt/bin:/home/rnorwood/bin::/sbin:/usr/sbin:/usr/local/sbin:/opt/bin:/home/rnorwood/bin::/sbin:/usr/sbin:/usr/local/sbin:/opt/bin:/home/rnorwood/bin::/sbin:/usr/sbin:/usr/local/sbin:/opt/bin
PERL_BADLANG (unset)
SHELL=/bin/bash
--
Robin Norwood
Red Hat, Inc.
"The Sage does nothing, yet nothing remains undone."
-Lao Tzu, Te Tao Ching
Thread Previous