[elbe-devel] [PATCH] preprocess: always set --variant=default

Manuel Traut manut at linutronix.de
Thu Dec 6 10:53:13 CET 2018


On 10:25 Thu 06 Dec     , John Ogness wrote:
> On 2018-12-05, Manuel Traut <manut at linutronix.de> wrote:
> >> With this change elbe uses --variant=default as default. So
> >> 
> >> <hostname variant="default">test</hostname>
> >> <hostname variant="ng">test-ng</hostname>
> >> 
> >> will work for both calls described above.
> >
> > while trying to cleanup the example directory using variants
> > (with this patch) i found a big limitation:
> >
> > <buildtype variant="default">amd64</buildtype>
> > <buildtype variant="arm">armhf</buildtype>
> > ..
> > <hostname variant="default">desktop</hostname>
> > <hostname variant="specialname">specialname</hostname>
> > ..
> > If i now specify --variant=arm i get an invalid XML because
> > hostname is not set. If a third OR element will be used it
> > becomes even worse..
> 
> Wouldn't it be easier to implement:
> 
> <hostname variant="">default when no --variant</hostname>
> <hostname variant="*">fallback when unknown --variant</hostname>

I'm afraid it will be confusing, e.g.:

<hostname variant="*">my</hostname>
<hostname variant="arm">myarm</hostname>
<pkg-list>
  <pkg variant="*">xterm</pkg>
  <pkg variant="audio">alsa</pkg>
  <pkg variant="audio">pavucontrol</pkg>
  <pkg variant="video">mplayer</pkg>
  <pkg>bash</pkg>

used with
--variant=arm,audio
would include the xterm package. However i would expect to have
xterm only if !audio and !video. Which brings me to sth like:

<hostname variant="!arm,!x86">my</hostname>
<hostname variant="arm">myarm</hostname>
<hostname variant="x86">myx86</hostname>

This makes specifying the default a bit harder, but wouldn't affect
other variants, like the pkg-list in the example above.

  Manu



More information about the elbe-devel mailing list