Item8988: LatexModePlugin changes $ENV{HOME}. This causes action-at-a-distance problems for installers

pencil
Priority: Urgent
Current State: New
Released In:
Target Release: n/a
Applies To: Extension
Component: LatexModePlugin
Branches:
Reported By: DiabJerius
Waiting For:
Last Change By: DiabJerius
LatexModePlugin changes $ENV{HOME}, which if not set in $Foswiki::cfg{Plugins}{LatexModePlugin}{home} is set to '/home/nobody', which messes up anything else which depends upon $ENV{HOME}.

For example, $EN{HOME} is used by File::HomeDir, which is called as part of CPAN::Shell, which is invoked by tools/extender.pl, which is called by the installer scripts.

Whatever it is using $ENV{HOME} for, it should be localized to this module.

Thanks!

-- DiabJerius - 07 May 2010

I've attached a patch which stores $ENV{HOME} in the LMPcontext, then uses it for only those sysCommand calls which it seems should require it. I've tried to localize it in as narrow a scope as possible. I added an extra parameter to Render::makePNGs to pass the value in for mimetex. I'm not familiar with that package, so if it doesn't need HOME, then one could remove that hack.

-- DiabJerius - 07 May 2010
 

ItemTemplate edit

Summary LatexModePlugin changes $ENV{HOME}. This causes action-at-a-distance problems for installers
ReportedBy DiabJerius
Codebase 1.0.9
SVN Range
AppliesTo Extension
Component LatexModePlugin
Priority Urgent
CurrentState New
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn
I Attachment Action Size Date Who Comment
home_env.patchpatch home_env.patch manage 10 K 07 May 2010 - 20:02 DiabJerius Patch File
Topic revision: r2 - 07 May 2010, DiabJerius
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy