Opened 9 years ago

Last modified 9 years ago

#209 new defect

BarnOwl::ModuleLoader sometimes fails to load

Reported by: jgross@mit.edu Owned by:
Priority: major Milestone:
Component: internals Keywords:
Cc:

Description

I'm getting

    Can't load BarnOwl::ModuleLoader, loadable module support disabled:
    unable to create cache directory at /usr/share/perl5/PAR/SetupTemp.pm line 47.
    BEGIN failed--compilation aborted at perl//lib/BarnOwl/ModuleLoader.pm line 6.
    Compilation failed in require at perl//lib/BarnOwl/Hooks.pm line 156.

whenever I run the master version of BarnOwl on linerva. (For reference, line 6 of ModuleLoader.pm is use PAR;) :show errors tells me that

  private subdirectory /tmp/par-jgross is unsafe (please remove it and
  retry your operation) at /usr/share/perl5/PAR/SetupTemp.pm line 117.

rm -r /tmp/par-jgross fixes the problem---until I run the locker version of BarnOwl again. This suggests that all of our users will have this problem whenever we do the next release, or when we upgrade to a new version of perl, or something. (A brief google seach suggests that this is a result of switching from version < 1.003 of PAR to >= 1.003 of PAR; see http://cpansearch.perl.org/src/RSCHUPP/PAR-1.005/ChangeLog)

Change History (1)

comment:1 Changed 9 years ago by jgross@mit.edu

One possible (probably terrible) work-around is to wrap use PAR; in whatever the perl equivalent of a try ... catch block is (eval, I think), and then copy about half of the code in PAR::SetupTemp (which is largely devoted to finding a temporary directory) to execute on failure and calling File::Path::rmtree($temp_path) rather than warn.

Note: See TracTickets for help on using tickets.