EPrints Technical Mailing List Archive

Message: #03932


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

[EP-tech] static rebuild bug in 3.2


Hi folks,


found a bug in 3.2 which is fixed in 3.3 but posting here in case anyone else comes up against it as it's a bit of a random one and was causing two seemingly identical installs to behave differently.


The error looks something like:


------------------------------------------------------------------
---------------- EPrints System Error ----------------------------
------------------------------------------------------------------
Can't copy /home/broker/ePrints/archives/eprints1/cfg/static to /home/broker/ePrints/archives/eprints1/html/en: Is a directory
------------------------------------------------------------------
 at /home/broker/ePrints/perl_lib/EPrints/Update/Static.pm line 325, <DATA> line 151.
        EPrints::Update::Static::copy_plain('/home/broker/ePrints/archives/eprints1/cfg/static', '/home/broker/ePrints/archives/eprints1/html/en', 'HASH(0x34d27c0)') called at /home/broker/ePrints/perl_lib/EPrints/Update/Static.pm line 171
        EPrints::Update::Static::update_static_file('EPrints::Repository=HASH(0xa434c8)', 'en', '') called at /home/broker/ePrints/perl_lib/EPrints/Apache/Rewrite.pm line 568
        EPrints::Apache::Rewrite::handler('Apache2::RequestRec=SCALAR(0x3451f90)') called at -e line 0
        eval {...} called at -e line 0


the key bit is that its going from Apache::Rewrite to Update::Static and failing to copy onto the directory html/en


The error is a missing "return OK" in EPrints::Apache::Rewrite after ln 274


This is in the handling for '/sword-app' URLS. Because the return is missing it falls through to treating the url as a static file. But by this time the path is empty. So in EPrints::Update::Static it tries to look for the file and update it if it's been changed. But because the filename is empty it is doing a comparison between directories (the first of the static dirs and html/en) and if the static dir is older it will do nothing and all works. If the static dir is newer, it will try to do a copy of the dir and fail with the above error message.


As I said, fixed in 3.3 but couldn't see it documented anywhere.


Cheers,


Ray.


The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.