Re: [Flightgear-devel] Bug in config file handling
Am 21.02.2012 15:32, schrieb Stefan Gofferje: During my tinkering with Sunrises 1.1, I added the following for the sim/ section: systems property-rule nameLocal Weather Rules/name pathEnvironment/local-weather-rules.xml/path /property-rule /systems Doing so replaces the property-rule defined in the global preferences.xml at index zero (METAR Interpolation Rule) with the Local Weather Rule. --config does not _add_ the elements defined there but to replace the existing elements. If you want to add a new property-rule, you have to specify the index like this. systems property-rule n=3 nameLocal Weather Rules/name pathEnvironment/local-weather-rules.xml/path /property-rule /systems This does make too much sense, however as the local weather rule is alread defined in preferences.xml. Torsten -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Bug in config file handling
Am 22.02.2012 10:47, schrieb Stefan Gofferje: Hm, in my preferences.xml are 2 property rules without any index. Shouldn't they replace each other then? Nope - this represents an entire tree and so end up implicitly with /sim/systems/property-rule[0]/ /sim/systems/property-rule[1]/ By adding your config.xml you build a (temporary) property tree containing just /sim/systems/property-rule[0]/ and overwrite the branch of the preferences tree. If you defined property-rule n=2 in your config.xml you end up with the temporary tree /sim/systems/property-rule[2]/ (note: there are no property-rule[0] and property-rule[1] which is perfectly legal) and this tree gets merged into the preferences tree, adding a third property-rule element. This is done by intention to allow overwriting elements and not just adding new ones. This does make too much sense, however as the local weather rule is alread defined in preferences.xml. That is a negative. I use the 2.6 packages from ThorstenB's OSBS repo. My preferences.xml did not contain the property rule for the local weather rules. And I never touch preferences.xml because in the next update all changes would be lost anyways. Hence I have my mypreferences.xml. Oh, yes. I was referring to next/master. This has not made it into the release. Sorry for the confusion. Torsten -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Bug in config file handling
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed 22 February 2012 11:26:11 Torsten Dreyer wrote: Nope - this represents an entire tree and so end up implicitly with ^^ That was the missing puzzle piece :). Tervehdys Suomesta / greetings from Finland, Stefan - -- Stefan Gofferje | Web: http://stefan.gofferje.net/ (sgofferj/OH-SW) | Projects: http://www.saakeskus.fi/ | Com1: IAX2/k-tanco.louhen-sudet.fi/stefan FG OSBS, Opensuse 12.1, GeForce GTX560, Phenom X4 3200, 8GB RAM -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAk9EyMoACgkQbQKZlCdPOMOyHQCgjh+5pGssxPoX9x2E+uKmlyCx O0MAoIq5cY2wddu7NgY8SD3Yxy9G3jLu =B3zT -END PGP SIGNATURE- -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
[Flightgear-devel] Bug in config file handling
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, sorry I didn't open a bug in the tracker for that. Normally I do but in this case, I'm not sure how to do write it. When trying to get Thorsten's Sunrises 1.1 to run under FG2.6, I found out that there might be a problem with including files via --config. I use my own ~/.fgfs/mypreferences.xml to set some properties like multitasking, my modifications to the fligh recorder and such because I use the OSBS repo with autoupdate which always breaks my changes in preferences.xml. During my tinkering with Sunrises 1.1, I added the following for the sim/ section: systems property-rule nameLocal Weather Rules /name pathEnvironment/local-weather-rules.xml/path /property-rule /systems This did activate the local weather rules but afterwards, there was no METAR being parsed any more. After testing, I found out that the property rules from preferences.xml property-rule nameEnvironment METAR Interpolation Rule/name pathEnvironment/metarinterpolator.xml/path /property-rule property-rule nameEnvironment Interpolation Rule/name pathEnvironment/interpolator.xml/path /property-rule were not in the property tree. After some more testing, I feel confident to say that putting the local weather rule to mypreferences.xml broke the property rules from preferences.xml. As far as I understand, files included with --config are to be merged in the property tree, hence I would classify the described behavior as a bug. Tervehdys Suomesta / greetings from Finland, Stefan - -- Stefan Gofferje | Web: http://stefan.gofferje.net/ (sgofferj/OH-SW) | Projects: http://www.saakeskus.fi/ | Com1: IAX2/k-tanco.louhen-sudet.fi/stefan FG OSBS, Opensuse 12.1, GeForce GTX560, Phenom X4 3200, 8GB RAM -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAk9DqxAACgkQbQKZlCdPOMM/GACeINYPQXlpOx6iW9nP9TnQ/AsL 0vgAoKttVZpj8fFsl1n8UkNBNeyNZH6w =/YL6 -END PGP SIGNATURE- -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel