[Qbs] setup-android, no --system?

Christian Gagneraud chgans at gmail.com
Fri May 15 14:33:22 CEST 2020

On Sat, 16 May 2020 at 00:24, Richard Weickelt <richard at weickelt.de> wrote:
> > I find this quite useful when creating docker container.
> > The idea is that the container (name) completely define the whole
> > build config, and running "qbs build" in there build an APK with the
> > "right" configuration.
> > No env involved, no foreknowledge of the profile name, it just work
> > out of the box.
> >
> > My current solution is to add an hand crafted /etc/xdg/qbs/qbs.conf,
> > but i would prefer to generate it with qbs-setup-android and
> > qbs-config from the Dockerfile.
> A hand-crafted qbs.conf sounds like overkill. Why can't you just run
> something like
>     qbs setup-android --ndk-dir ${ANDROID_HOME}/ndk-bundle --sdk-dir
> ${ANDROID_HOME} --qt-dir ${QT_INSTALL_DIR} qbs_autotests-android-qt
>     qbs config defaultProfile qbs_autotests-android-qt
> in the Dockerfile? You need to install all the Android stuff and Qt anyway,
> so you must have that information already.

Because this file will end up in some "home" directory, which might
not be accessible to the end user (eg. custom UID, GID, home, ...)
Having a system wide qbs conf is bullet-proof in that regard.
So, yes i would prefer to run the above command, but with '--system'
and no, you cannot simply move the generated user's conf into
/etc/xdg/qbs, they don't use the same 'ini' namespace


More information about the Qbs mailing list