Bugzilla – Attachment 62907 Details for
Bug 18502
koha-shell broken on dev installs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18502: Make koha-shell set the right PERL5LIB on dev installs
Bug-18502-Make-koha-shell-set-the-right-PERL5LIB-o.patch (text/plain), 2.10 KB, created by
Marcel de Rooy
on 2017-05-01 10:14:54 UTC
(
hide
)
Description:
Bug 18502: Make koha-shell set the right PERL5LIB on dev installs
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-05-01 10:14:54 UTC
Size:
2.10 KB
patch
obsolete
>From a0cdd2e715170f1e1486a3030ba5dd03c1019198 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 27 Apr 2017 11:37:27 -0300 >Subject: [PATCH] Bug 18502: Make koha-shell set the right PERL5LIB on dev > installs >Content-Type: text/plain; charset=utf-8 > >Bug 16749 introduced a nice way to have flexible paths. During the discussion on how to do it, we moved from having it contain the path to the git dir to just a boolean. The 'koha-shell' script didn't get attention it seems, and it is broken on dev installs. > >This was hidden by the fact that many of us run dev installs on kohadevbox, which sets a .bashrc file for de instance's user, containing the right path when opening the new shell. > >This patch changes the logic so on a dev install, intranetdir is picked as the right path. This is how it is handled in koha-functions.sh > >To test: >- On kohadevbox, run: > $ sudo koha-shell kohadev -c "perl misc4dev/populate_db.pl" >=> FAIL: C4/Installer.pm not found on PERL5LIB error. >- Apply this patch >- Replace /usr/bin/koha-shell with debian/scripts/koha-shell > $ sudo cp kohaclone/debian/scripts/koha-shell /usr/bin/koha-shell >- Run: > $ sudo koha-shell kohadev -c "perl misc4dev/populate_db.pl" >=> SUCCESS: No warning about missing libs is raised. >- Sign off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > debian/scripts/koha-shell | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/debian/scripts/koha-shell b/debian/scripts/koha-shell >index 0d747da..926c04d 100755 >--- a/debian/scripts/koha-shell >+++ b/debian/scripts/koha-shell >@@ -83,7 +83,11 @@ sub read_perl5lib { > $result =~ s/^PERL5LIB=\s*//; > my $dev_install = `xmlstarlet sel -t -v 'yazgfs/config/dev_install' /etc/koha/sites/$instance/koha-conf.xml`; > chomp $dev_install; >- return $dev_install || $result; >+ if ( $dev_install ) { >+ # pick PERL5LIB from the intranetdir entry >+ $result = `xmlstarlet sel -t -v "yazgfs/config/intranetdir" /etc/koha/sites/$instance/koha-conf.xml`; >+ } >+ return $result; > } > > __DATA__ >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18502
:
62790
|
62792
|
62907
|
62957