[elbe-devel] XML Includes --- thoughts

ew.foe at nassur.net ew.foe at nassur.net
Tue Jul 4 16:14:45 CEST 2017


Hello all,

some time ago I read in the docs, that elbe now supports XML includes.

Reading, looking at the examples, and trying it out, I'm not sure,  
whether I like it.

What bothers me, is that it does not really support the "do not repeat  
yourself"
credo. For example:

The tag <pkg-list> can be separated out, so one file includes one version:
> x86_32-pc-hdimg-with-include-production.xml:            <xi:include  
> href="includes/prod/pkglist.xml"/>
> x86_32-pc-hdimg-with-include-development.xml:           <xi:include  
> href="includes/devel/pkglist.xml"/>

In this particular example the two included files are almost identical. Which
is not surprising given that xml-include didn't like my attempts to include
unbalanced snippets :-)



What I would like to have is

mybuild.xml
> <ns0:RootFileSystem xmlns:ns0="https://www.linutronix.de/projects/Elbe"
> ...
>
>     <pkg-list>
>         <!-- all variants -->
>         <pkg>linux-image-local1-4.9.18-rt14</pkg>
>         <pkg>ntp</pkg>
>         <pkg>openssh-server</pkg>
>     <pkg-list>
and for variants either *conditionally* include snippets
>     <pkg-list variant="devel">
>          <pkg>strace</pkg>
>     <pkg-list>
or *conditionally* include separate files
>     <include variant="devel">./include/pkg-devel.xml</include>
>     <include variant="customer1">./include/pkg-customer1.xml</include>
>     <include variant="customer2">./include/pkg-customer2.xml</include>
or similar. This way there needs to be only one build.xml and not
build-variant1.xml build-variant2.xml ...

I admit that this is heavily influenced from working with kiwi[1] for several
years in my last job. Your milage may vary. Me being illiterate in xml, and
mostly illiterate in python, I cannot even estimate how complex a change this
would be. But I suspect it to be rather large/fundamental.

Thank you for providing elbe!

Cheers,
Erich


[1] https://opensuse.github.io/kiwi/






More information about the elbe-devel mailing list