Bugzilla – Attachment 43293 Details for
Bug 14993
rebuild_zebra.pl, when recreating Zebra-directory structure, mkdir doesn't fail/error/die
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14993 - rebuild_zebra.pl, when recreating Zebra-directory structure, mkdir doesn't fail/error/die
Bug-14993---rebuildzebrapl-when-recreating-Zebra-d.patch (text/plain), 1.78 KB, created by
Olli-Antti Kivilahti
on 2015-10-09 10:19:46 UTC
(
hide
)
Description:
Bug 14993 - rebuild_zebra.pl, when recreating Zebra-directory structure, mkdir doesn't fail/error/die
Filename:
MIME Type:
Creator:
Olli-Antti Kivilahti
Created:
2015-10-09 10:19:46 UTC
Size:
1.78 KB
patch
obsolete
>From efb00062970e45e61856cb28976993d7ced8aaab Mon Sep 17 00:00:00 2001 >From: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> >Date: Fri, 9 Oct 2015 13:05:50 +0300 >Subject: [PATCH] Bug 14993 - rebuild_zebra.pl, when recreating Zebra-directory > structure, mkdir doesn't fail/error/die > >This is due to implicit perl programming. >Avoid doing this! > mkdir $bdir || die "Error $!"; > >TO REPLICATE: > >1. rm -r /home/koha/koha-dev/var/lib/zebradb (or whatever your zebradb location is) >2. run rebuild_zebra.pl -b -a -r -x -v >3. Observe how rebuild_zebra.pl tells that it has rebuilt all the missing > directories. >4. cd /home/koha/koha-dev/var/lib/zebradb/biblios >5. No such directory??? >6. You wait for several hours to reindex your zebradb to find that nothing > works :( > >AFTER THIS PATCH: > >1. rm -r /home/koha/koha-dev/var/lib/zebradb (or whatever your zebradb location is) >2. run rebuild_zebra.pl -b -a -r -x -v >3. Observe how rebuild_zebra.pl tells that it couldn't create missing directories. > >A (possibly) better fix would be to recreate the top two directories from the >path, but no point patching a dead horse, since ElasticSearch will be here soon :) >--- > misc/migration_tools/rebuild_zebra.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/misc/migration_tools/rebuild_zebra.pl b/misc/migration_tools/rebuild_zebra.pl >index aa31cb2..ce80154 100755 >--- a/misc/migration_tools/rebuild_zebra.pl >+++ b/misc/migration_tools/rebuild_zebra.pl >@@ -305,7 +305,7 @@ sub check_zebra_dirs { > my $bdir = $base . $dir; > if (! -d $bdir) { > $needed_repairing = 1; >- mkdir $bdir || die "Unable to create '$bdir': $!\n"; >+ mkdir($bdir) || die "Unable to create '$bdir': $!\n"; > print "$0: needed to create '$bdir'\n"; > } > } >-- >1.9.1
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 14993
: 43293