Re: [greenstone-devel] AZCompactList.pm error

From John R. McPherson
DateWed, 01 Dec 2004 17:19:00 +1300
Subject Re: [greenstone-devel] AZCompactList.pm error
In-Reply-To (71E37EF6B7DCC1499CEA0316A256832801D4BBB3-loki-wc-globexplorer-net)
On Wed, 2004-12-01 at 16:18, Gregory S. Williamson wrote:
> I solved some earlier problems by upgrading to the most recent stable release of greenstone (and then upgrading perl to v5.8.5 by building it on this Redhat Linux box, version 2.4.20-8). Current version of Greenstone would seem to be:
> [root@localhost gsdl]# pwd
> /usr/local/gsdl
> [root@localhost gsdl]# more VERSION
> Version: 2.52
> Media: Web
> OS: linux
> Language: en
> Option: Source
>
> I ran mkcol.pl and import.pl happily (both with minimum parameters), but buildcol.pl ran for a while and then died with:
> ...
> GAPlug: processing HASH013e/5d0cd055.dir/doc.xml
> GAPlug: processing HASH01ac/28bc34f5.dir/doc.xml
> GAPlug: processing HASH02b1.dir/doc.xml
> GAPlug: processing HASH0149.dir/doc.xml
> Use of uninitialized value in array dereference at /usr/local/gsdl/perllib/classify/AZCompactList.pm line 852.
> Use of uninitialized value in concatenation (.) or string at /usr/local/gsdl/perllib/classify/AZCompactList.pm line 854.
>
> *** creating auxiliary files
>
> ===========
>
> The last indicated directory/document seem ok to my untutored eye.
>
> The specific lines referred to in the .pm file are:
> if (scalar (@currentOIDs) < $min) {
> my ($newkey) = $lastkey =~ /^(.)/;
> @currentOIDs = (@{$compactedhash->{$lastkey}}, @currentOIDs); # <-- this
> delete $compactedhash->{$lastkey};
> @{$compactedhash->{"$newkey-$currentlastletter"}} = @currentOIDs; # <-- And this
> } else {

Hi,
it's nothing to do with the last .xml file in the archives -
when building, all the archives files are read in, and then the
classifier calculates its tree.

This looks like there is something wrong with one of the documents'
metadata value, but the classifier should be able to skip any
documents that it can't classify, so this looks like a bug in
the AZCompactList classifier when it is trying to 'compact' documents
starting with one letter into the subtree for documents starting with
the previous letter. Sorry I can't be any more specific at the
moment...

John