EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #01117


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Revision cleaning system


Dear all,

trying to use the RemoveRevisions plugin (this one : http://files.eprints.org/615/ ) i noticed that something was not going as expected.

After a lot of debugging i saw that in my 3.2.4 eprint repository purging an eprint didn't clean the revision records in the file table : for each eprint now i have toomany records in file table (many pointing to old files and some to the correct new).

This effect is very big in my repository because it is readonly : all records are batch imported, and before importing every eprint is deleted (if present) and freshly imported as new. This action erases the xml revision files but doesn't delete the appropriated record in the file table.

I noticed it because i'm testing to migrate to 3.3.10 where i changed the importing batch, using the --update function of import file.

To resolve the proliferation of such records in file table i modified the RemoveRevisions plugin to check and possibly remove all those records in file table that are inconsistent with xml revision files .

After having copied the attach in ~/archives/"repository"/cfg/plugins/EPrints/Plugin/Export directory if you execute

~/bin/export "repository" --verbose archive CheckRevisions

you can do a check only. If you use the --arg write=1 you delete inconsistent record in file table, without deleting files in the revision directory.

Any comment is very welcomed.


Best regards,
Paolo Tealdi

--
Ing. Paolo Tealdi         Area IT - Politecnico Torino
Telefono/Phone : +39-011-0906714 , FAX : +39-011-0906799
Indirizzo/Address : C.so Duca degli Abruzzi,  24 - 10129 Torino - ITALY
Skype : tealdi.paolo
Please consider your environmental responsibility before printing this e-mail

Attachment: CheckRevisions.pm
Description: Perl program