Great, we found problem's root cause :-)
I'm not sure what would be the best solution though. Looking for good enough
one... here are some ideas:
- some of the options we've already discussed here ("use lib" or PERL5LIB)
- Some utility module may be available to facilitate determining/inclusion
of platform-specific library paths
- Customizable configuration of paths to include (into some config file)
Regards,
Yavor
On Fri, Mar 11, 2011 at 12:25, Marcel Loose <[email protected]> wrote:
> Hi Yavor,
>
> See the answers to your questions inline.
>
> On Thu, 2011-03-10 at 14:29 +0200, Yavor Nikolov wrote:
> > Hi Marcel,
> >
> > That's interesting. So as far as I understand, unshift @INC seems to
> > work in general but fails with the specific Bugzilla/lib folder?
> >
> > Something which I think "unshift @INC" won't do is inclusion of
> > platform-specific subfolders. E.g.:
> > <bugzilla-root>/lib/x86_64-linux-thread-multi
> >
> > So can you try following:
> > * dump @INC when things work fine (i.e. - when you have a hardcoded
> > "use lib" or PERL5LIB environment var is set) - I suppose it will pick
> > those additional x86_64-linux-thread-multi subdirs
>
> $ PERL5LIB=/srv/bugzilla-3.4.10/lib /usr/bin/perl
> /usr/sbin/scmbug_daemon.pl /etc/scmbug/daemon.conf
> $VAR1 = '/srv/bugzilla-3.4.10/lib';
> $VAR2 = '/srv/bugzilla-3.4.10';
> $VAR3 = '/usr/share/scmbug/lib';
> $VAR4 = '/srv/bugzilla-3.4.10/lib/x86_64-linux-thread-multi';
> $VAR5 = '/srv/bugzilla-3.4.10/lib';
> $VAR6 = '/usr/lib/perl5/5.10.0/x86_64-linux-thread-multi';
> $VAR7 = '/usr/lib/perl5/5.10.0';
> $VAR8 = '/usr/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi';
> $VAR9 = '/usr/lib/perl5/site_perl/5.10.0';
> $VAR10 = '/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi';
> $VAR11 = '/usr/lib/perl5/vendor_perl/5.10.0';
> $VAR12 = '/usr/lib/perl5/vendor_perl';
> $VAR13 = '.';
>
> You are right! Look at $VAR4. Also note that $VAR1 is identical to
> $VAR5. Apparently, $VAR1 is added
> by /usr/share/scmbug/lib/Scmbug/Daemon/Bugzilla.pm, whereas $VAR5 is
> added as a result of setting PERL5LIB.
>
> > * Can you try with the "unshift @INC" approach - also adding the
> > relevant additional platform-specific subfolders to @INC.
>
> Adding the line
>
> unshift @INC, $self->installation_directory() .
> "/lib/x86_64-linux-thread-multi";
>
> to /usr/share/scmbug/lib/Scmbug/Daemon/Bugzilla.pm also solves the
> problem.
>
> $ /usr/bin/perl /usr/sbin/scmbug_daemon.pl /etc/scmbug/daemon.conf
> $VAR1 = '/srv/bugzilla-3.4.10/lib/x86_64-linux-thread-multi';
> $VAR2 = '/srv/bugzilla-3.4.10/lib';
> $VAR3 = '/srv/bugzilla-3.4.10';
> $VAR4 = '/usr/share/scmbug/lib';
> $VAR5 = '/usr/lib/perl5/5.10.0/x86_64-linux-thread-multi';
> $VAR6 = '/usr/lib/perl5/5.10.0';
> $VAR7 = '/usr/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi';
> $VAR8 = '/usr/lib/perl5/site_perl/5.10.0';
> $VAR9 = '/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi';
> $VAR10 = '/usr/lib/perl5/vendor_perl/5.10.0';
> $VAR11 = '/usr/lib/perl5/vendor_perl';
> $VAR12 = '.';
>
> > Regards,
> > Yavor
>
> So, now that we really know what the problem is. What's the best way to
> solve this in a portable/distributable way?
>
> Cheers,
> Marcel Loose.
>
>
>
>
_______________________________________________
scmbug-users mailing list
[email protected]
http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users