[Koha-patches] No Koha Uninstall Script.

Galen Charlton galen.charlton at liblime.com
Wed Jul 1 15:35:39 CEST 2009


Hi,

2009/7/1 Patrick Mackeown <patrick at bookscape.co.uk>:
> I've been giving Bug 459 (No unistall script) some thought. And I've come up
> with what might well be a solution. I'd be interested to hear thoughts on
> the matter.

Some initial thoughts, based on a cursory glance at the script.
First, thanks for taking this on.

I see this in the comments:

"PLEASE be aware that the install log's contents are *highly* suspect
the installation directories recorded in the installation log always
point to /usr/share/koha completely regardless of where the koha
installation actually took place! So, in truth, the significance is where
the install log is located (that's a likely location of the koha installation
that you want to remove,) not what the install log says inside it."

While in principle the install log is always going to be
untrustworthy, if it's in fact always plugging in "/usr/share/koha"
instead of the actual path, that's a bug.  What version of Koha have
you tested this against - one of the 3.0.x distributions, or HEAD?

> my $deluser= "/usr/sbin/userdel";
> my $delgroup= "/usr/sbin/groupdel";

The script should should verify its assumptions about the platform.

Later on:

>         # Env variables are present.
>        $KOHAROOT=$ENV{PERL5LIB};

Since PERL5LIB is used by Perl, not Koha directly, the uninstall
script should keep in mind that it can be set to point to multiple
directories.  If that condition applies, the script should either test
each one individually or terminate the uninstall script.

Hopefully others will chime in with further comments and some testing.
 I think the next version of this script can be accepted as a contrib,
but it will take a while before it's sufficiently idiot-resistant to
live in the main tree.

Regards,

Galen
-- 
Galen Charlton
VP, Research & Development, LibLime
galen.charlton at liblime.com
p: 1-888-564-2457 x709
skype: gmcharlt



More information about the Koha-patches mailing list