]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/libdir_not_used_in_wrappers.mdwn
(no commit message)
[ikiwiki.git] / doc / bugs / libdir_not_used_in_wrappers.mdwn
1 [[!tag patch wishlist]]
2
3 If I install ikiwiki in a user directory (let's say /home/bruno/ikiwiki) with all perl modules (thoses coming from Bundle::Ikiwiki and Bundle::Ikiwiki:Extras) inside that directory (in /home/bruno/ikiwiki/lib/perl5) then the generated CGI wrapper does not work even if I make libdir point to that directory. The error reported explain that wrapper <code>Can't locate IkiWiki.pm in @INC</code>.
4
5 This is bad when you try to install Ikiwiki in such a way (everything needed by ikiwiki in one single directory) since ikiwiki is unusable in such case.
6
7 Situations where this behavior (everything in one directory) may be wanted include installing latest ikiwiki on Debian stable, Ubuntu or more simply installing it on any hosting provider without root access. 
8
9 Here is a simple patch correcting that behavior.
10
11 <pre>
12 ---
13  IkiWiki/Wrapper.pm |    1 +
14  1 files changed, 1 insertions(+), 0 deletions(-)
15
16 diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm
17 index ff110b5..5289966 100644
18 --- a/IkiWiki/Wrapper.pm
19 +++ b/IkiWiki/Wrapper.pm
20 @@ -121,6 +121,7 @@ $check_commit_hook
21  $envsave
22         newenviron[i++]="HOME=$ENV{HOME}";
23         newenviron[i++]="WRAPPED_OPTIONS=$configstring";
24 +       newenviron[i++]="PERL5LIB=$config{libdir}";
25         newenviron[i]=NULL;
26         environ=newenviron;
27  
28 -- 
29 1.6.0.4
30 </pre>
31
32 -- [[/users/bbb]]