Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008560opensim[REGION] OpenSim Corepublic2019-07-11 04:452019-07-11 06:57
Assigned To 
PlatformOSOS Version
Product Version0.9.0.1 
Target VersionFixed in Version 
Summary0008560: Include directives do not take environment variables expansion
DescriptionDoing some overlaying configuration scheme, I discovered the Opensim configuration system does not use environment variable expansion to resolve included files (which is really handy to make a generic configuration scheme, for example putting in a folder with Opensim instance name a local ini file to overwrite global settings).

Checking the code, I found in Opensim/Region/Application/ConfigurationLoader.cs, line 239, that :
    string file = config.GetString(k);
could be replaced by :
    string file = config.GetExpanded(k);

Method referenced at [^]

I could not test myself as I never compiled Opensim and have not the correct environment to do so (in my todo list)
Steps To ReproduceIn main Opensim, Add an [Environment] section
In this section, reference an environment variable
Add a new Include directive to use that environment variable to resolve the path of the included file.

  CONFDIR = ""

  Include-Local = "${Environment|CONFDIR}/Local.ini
TagsNo tags attached.
Git Revision or version number
Run ModeStandalone (1 Region)
Physics EngineBulletSim
EnvironmentMono / Linux64
Mono Version5.x
Attached Files

- Relationships

-  Notes
TyphaineArtez (reporter)
2019-07-11 06:57
edited on: 2019-07-11 06:57

It seems the way environment variables are expanded (after reading the whole config files) does not match the solution given in my initial post.

I tried to compile and apply the fix, and the reference to the environment variable is expanded to the empty string.

I don't know enough how all this works to make a more complex fix.

- Issue History
Date Modified Username Field Change
2019-07-11 04:45 TyphaineArtez New Issue
2019-07-11 06:57 TyphaineArtez Note Added: 0035468
2019-07-11 06:57 TyphaineArtez Note Edited: 0035468 View Revisions

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker