aldebaran/qibuild

add-config overwrites host information if the config already exists

Opened this issue · 1 comments

seen on qibuild master (c88e566)
eg.

$ qibuild add-config toto
$ grep toto -A4 ~/.config/qi/qibuild.xml 
  <config name="toto">
    <env />
    <cmake />
    <profiles />
  </config>
$ qibuild set-host-config toto
$ grep toto -A4 ~/.config/qi/qibuild.xml 
  <config host="true" name="toto">
    <env />
    <cmake />
    <profiles />
  </config>
$ qibuild add-config toto
$ grep toto -A4 ~/.config/qi/qibuild.xml 
  <config name="toto">
    <env />
    <cmake />
    <profiles />
  </config>

The workaround is to use qibuild add-config toto --host

The thing is, qibuild add-config ignores any previous settings. This is because sometimes we need to do things like

qibuild add-config foo -GNinja

# Oups, Ninja does not work, let's remove Ninja from the foo config:
qibuild add-config foo

But maybe we need qibuild set-config foo --delete Ninja or something ...