[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#1916: perl: wrong entries in Config.pm




Hi,
	I think that Config.pm handling should meet the following
 requirements: 

 1) The perl-5.XXX-Y package should install correctly (that's
    the whole point, right? ;-)
 2) The user should be able to install any extensions into
   /usr/local by default,
 3) there should be an easy way for any developer to change the
    default in order to package an extension such that it installs
    into /usr, without having to hack Config.pm (which would need to
    be done programmatically in debian.rules:build)

	One possible way of doing this is:

 a) set up debian.rules:build/config.over in perl-5.XXX-Y such that
    the prefix is /usr, and files install into /usr/bin and
    /usr/lib/perl5/, and anything else that needs to meet requirement
    1 (which you have been doing already, of course).  Make the site
    directory /usr/local/lib/perl5, to facilitate b) below.
 b) In debian.rules:binary, after doing make install, add in rules
    that 
	i)  mv debian-tmp/usr/lib/perl/{arch}/Config.pm \
	    debian-tmp/usr/lib/perl/{arch}/Config.pm.dev 
	ii) change all occurrences of ='/usr/bin to ='/usr/local/bin
	    in debian-tmp/usr/lib/perl/{arch}/Config.pm.dev, and also all
	    occurrences of ='/usr/lib/perl5 to ='/usr/local/lib/perl5,
	    and send the output to
	    debian-tmp/usr/lib/perl/{arch}/Config.pm.user. (I'd give
	    the sed script, by I don't have access to my linux box at
	    the moment.
	iii) cd debian-tmp/usr/lib/perl/{arch}; 
             ln -s Config.pm.user Config.pm
     {arch} is, of course, something like i486-linux/5.002, (I haven't
     yet installed 5.002 on my linux box)

	This meets requirement 2) above; also, any developer need only 
 change the Config.pm link, and would be all set to install in /usr,
 this meets requirement 3) above.

	Also, by making the site directory /usr/local/lib/perl5 in
 step a, we ensure that perl would search /usr/local/lib/perl5 for
 anything installed by the user. 

	How does this sound?

		manoj

-- Refreshed by a brief blackout, I got to my feet and went next
 door. Martin Amis, _Money_

Manoj Srivastava              Systems Research Programmer, Project Pilgrim,
Phone: (413) 545-3918               A143B Lederle Graduate Research Center,
Fax:   (413) 545-1249        University of Massachusetts, Amherst, MA 01003
<srivasta@pilgrim.umass.edu>  <URL:http://www.pilgrim.umass.edu/~srivasta/>


Reply to: