[virt-tools-list] [libosinfo 7/8] rfc: Infer ISO language from label

Zeeshan Ali (Khattak) zeeshanak at gnome.org
Wed Dec 5 13:10:08 UTC 2012


On Wed, Dec 5, 2012 at 11:15 AM, Christophe Fergeau <cfergeau at redhat.com> wrote:
> On Tue, Dec 04, 2012 at 04:08:00PM +0200, Zeeshan Ali (Khattak) wrote:
>> On Tue, Dec 4, 2012 at 1:01 PM, Daniel P. Berrange <berrange at redhat.com> wrote:
>> > The values required for each of these setters
>> > is really OS-specific. To properly isolate apps from this, we need to
>> > have a data map concept, so libosinfo defines a canonical set of keyboard,
>> > language and timezone values, and then maps to the OS-specific values
>> > internally.
>> >
>> > This ISO language extraction is just another example of the need for
>> > a general datamap capability IMHO, and while we only see it for Windows
>> > currently, I would not be suprised if other OS we encounter in the future
>> > need it too.
>> >
>> > I did actually start hacking up datamap support, but never finished it.
>>
>> Not sure there is really a need to do mapping in the code for at least
>> the installers. Apart from app developers, we need to think about
>> non-C-hackers to be able to add data (including installer script
>> templates). If we put this in C, anyone wanting to add a new OS and/or
>> its installer will then be required to have to hack on libosinfo in C.
>
> They will need to make changes in the C code if they need a new datamap,
> they won't need to if they can reuse the existing one.

That might not be such a bad thing but is there a way to communicate
that to them. Perhaps comments in the XML saying these values get
mapped to XXX by libosinfo?

> Doesn't the
> alternative involve them writing some xslt instead?

For installers, yes but thats what they are supposed to do anyways in
there. For the other XML, i don't see how we can use XSLT but i'm no
XML/XSLT expert.

-- 
Regards,

Zeeshan Ali (Khattak)
FSF member#5124




More information about the virt-tools-list mailing list