http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11078 --- Comment #10 from Doug Kingston <dpk@randomnotes.org> --- (In reply to Robin Sheat from comment #9)
Oh good, I've been meaning to do this for a while.
A few comments: * it creates /var/lock/koha_rebuild_zebra_databasename/lock, why not /var/lock/koha/rebuild_zebra_databasename? That way if we add more locking stuff, it will all be under the 'koha' directory. The existing koha scripts that create koha instances call install -d -o $kohauser -g $kohauser /var/lock/koha/$kohasite When invoked this way, only the last directory in this path is owned by the user and the intervening directories are owned by root. rebuild_zebra.pl is run as $kohauser so it cannot create another directory under /var/lock/koha.
* it doesn't look like it handles lockdir not being set in the config very nicely, it should probably default to /var/lock if the config setting isn't available, otherwise it seems it would try to create a directory under '/'. My changes make sure this is set for proper installs (see the change to rewrite-config.pl, but I am happy to put in a fallback if QA team wants it. This level of protection is not present for other config variables. Lots of other things will go pear-shaped if their definition is missing.
* it doesn't set up the lockdir config for package installations, this would be a very simple matter of adding <lockdir>/var/lock</lockdir> in debian/templates/koha-conf-site.xml.in. It's OK to hard-code the value in there because it'll always be the same. Thanks for the pointer, I did not know about that template. This is just what code reviews are for.
-- You are receiving this mail because: You are watching all bug changes.