EPrints Technical Mailing List Archive

Message: #05589


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

[EP-tech] Coverpage and revisions


Dear all,
it's two year that we are using in production environment a deeply modified plugin to create CoverPages for our open access publications. The plugin, if the attachment is open, creates on the fly a coverpaged version of the attachment, linked to the original one adding an object eprint relation.

The piece of code that save the relation is :

if ($cpdoc) { #Coverpaged document $doc->add_object_relations($cpdoc, #Adding relation EPrints::Utils::make_relation( "hasCoverPageVersion" ) => EPrints::Utils::make_relation( "isCoverPageVersionOf" )); $cpdoc->commit; #Commit coperpaged document $doc->commit; #Commit original document (and also eprint)
    # $doc->commit also triggers a $eprint->commit
    # fake the mtime of the coverpage to be at least the lastmod time of the eprint
    my $cpfile = $cpdoc->get_stored_file($cpdoc->get_main);
    my $eprint = $doc->get_parent();
    if ($cpfile && $eprint) {
      $cpfile->set_value('mtime', $eprint->get_value('lastmod'));
      $cpfile->commit;
    }

All well. It works very well and we are very satisfied for that plugin (Honor to Wirtschafts Universitat Wien guys).

We have noticed that for every coverpage created eprints stores a revision. I found a record that has >4K revisions, all triggering the new coverpage version created (we are noticing that our document filesystem has >1.4M files for 80K eprints document ... ) . Is there a way to force eprints not to create a revision when a coverpage is created, modifying that piece of code ? If i remember well for "normal" eprints field, creating a revision is triggered by "volatile" attribute field, but for document object relations ?
maybe forcing  $doc->{non_volatile_change} to false before the commit ?

Best regards and have a nice weekend.
Paolo Tealdi


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