Skip to content

local.conf gets replaced at every setup-environment call #8

@ricardosalveti

Description

@ricardosalveti

Our suggested step for users coming from repo is to use setup-environment to create the build environment, which is perfectly fine, but it is expected that local.conf remain untouched after it gets created, since that is where the user can extend with local modifications (path for download dir, sstate-cache, etc).

We should change the logic to respect local.conf if already there, and handle the remaining updates just via environment variable changes (e.g. MACHINE).

To reproduce:

rsalveti@evatuf:~/build/qli2$ source setup-environment --machine meta-qcom/ci/qcs9100-ride-sx.yml --distro meta-qcom/ci/qcom-distro-prop-image.yml --kernel meta-qcom/ci/linux-qcom-6.18.yml
INFO: Running validation checks.
INFO: Setting up bitbake configuration.
INFO: Generating temporary kas configuration.
INFO: Exporting environment variables from kas configuration.
INFO: Cleaning up temporary contents.
INFO: Initializing bitbake environment.
This is the default build configuration for the openembedded-core layer.

### Shell environment set up for builds. ###

You can now run 'bitbake <target>'

Common targets are:
    core-image-minimal
    core-image-full-cmdline
    core-image-sato
    core-image-weston
    meta-toolchain
    meta-ide-support

You can also run generated qemu images with a command like 'runqemu qemux86-64'.

Other commonly useful commands are:
 - 'devtool' and 'recipetool' handle common recipe tasks
 - 'bitbake-layers' handles common layer tasks
 - 'oe-pkgdata-util' handles common target package tasks

rsalveti@evatuf:~/build/qli2/build$ echo "FOO = 'bar'" >> conf/local.conf
rsalveti@evatuf:~/build/qli2/build$ cd ..

rsalveti@evatuf:~/build/qli2$ source setup-environment --machine meta-qcom/ci/qcs9100-ride-sx.yml --distro meta-qcom/ci/qcom-distro-prop-image.yml --kernel meta-qcom/ci/linux-qcom-6.18.yml
INFO: Running validation checks.
INFO: Setting up bitbake configuration.
INFO: Generating temporary kas configuration.
INFO: Exporting environment variables from kas configuration.
INFO: Cleaning up temporary contents.
INFO: Initializing bitbake environment.
This is the default build configuration for the openembedded-core layer.

### Shell environment set up for builds. ###

You can now run 'bitbake <target>'

Common targets are:
    core-image-minimal
    core-image-full-cmdline
    core-image-sato
    core-image-weston
    meta-toolchain
    meta-ide-support

You can also run generated qemu images with a command like 'runqemu qemux86-64'.

Other commonly useful commands are:
 - 'devtool' and 'recipetool' handle common recipe tasks
 - 'bitbake-layers' handles common layer tasks
 - 'oe-pkgdata-util' handles common target package tasks

rsalveti@evatuf:~/build/qli2/build$ tail conf/local.conf
BB_SIGNATURE_HANDLER = "OEBasicHash"

# uninative
INHERIT:remove = "uninative"

# virtualization
SKIP_META_VIRT_SANITY_CHECK = "1"
MACHINE ??= "qcs9100-ride-sx"
DISTRO ??= "qcom-distro"
BBMULTICONFIG ?= ""

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions