koha-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-devel] New configuration/install script


From: Andrew Arensburger
Subject: [Koha-devel] New configuration/install script
Date: Wed Oct 30 06:35:03 2002
User-agent: Mutt/1.2.5.1i

        As I mentioned on IRC a while back, I've been working on a new
configuration/installation script for Koha. Now I've uploaded a first
draft to the CVS main branch, to give people a look at it. Just run
"safe-installer".
        This is nowhere near complete, but it should be enough for
people to tell whether I'm on the right track or not, and whether I
should continue. Currently, this script only installs and/or upgrades
the Koha database.

        Some features of note:
        - The current 'installer.pl' asks a question, makes a change
          to the system, asks the next question, makest the next
          change, and so forth.
          'safe-installer', on the other hand, asks all of the
          questions up front, and only then installs everything. This
          way, if you interrupt it before it's done, you don't wind up
          with a half-completed installation.
        - 'safe-installer' doesn't actually do anything itself.
          There's a Makefile to do the real work of creating the
          database, installing the web files, etc. This way, you don't
          have to be root to do the configuration. You might not even
          have to be root to do the installation.
        - 'safe-installer' works by creating a "Make.conf" file that
          contains the configuration values that will be used by
          'make'.
          The advantage of this is that if someone wants to write a
          Koha RPM/port/apt/package/whatever, they can simply create
          "Make.conf" and use 'make install', thereby bypassing the
          interactive installer.
        - I've thrown in "install-sh", because Koha really ought to be
          portable, but not every OS has a BSD-compatible 'install'
          tool, nor does every OS support 'mkdir -p'. 'install-sh'
          does all of this, and is in the public domain, which should
          be GPL-compatible.

A note in passing: one fairly interesting aspect of this script is
that it involves a completely different type of optimization than I'm
used to. Normally, when you're trying to estimate the speed of a
program, you assume that all atomic operations (integer addition and
multiplication, if-then, comparisons, etc.) all take the same amount
of time. Here, however, an 'if' statement could take tens of seconds,
if it involves getting input from the user. So the trick is to
optimize for user time by asking as few questions as possible (in the
average case, at least), while at the same time keeping them clear
enough to give Joe Average User an idea of what's going on.

-- 
Andrew Arensburger                      This message *does* represent the
address@hidden                      views of ooblick.com
             Build a better mousetrap and the world will
             immediately get their fingers caught in it.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]